mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added DNS multi-tenancy support
This commit is contained in:
parent
69268dcd4a
commit
eb363f0cee
16 changed files with 2168 additions and 107 deletions
|
@ -1133,8 +1133,6 @@ var CreateAmtRedirect = function (module) {
|
|||
obj.user = null;
|
||||
obj.pass = null;
|
||||
obj.authuri = "/RedirectionService";
|
||||
obj.tlsv1only = 0;
|
||||
obj.inDataCount = 0;
|
||||
obj.connectstate = 0;
|
||||
obj.protocol = module.protocol; // 1 = SOL, 2 = KVM, 3 = IDER
|
||||
|
||||
|
@ -1154,9 +1152,7 @@ var CreateAmtRedirect = function (module) {
|
|||
obj.user = user;
|
||||
obj.pass = pass;
|
||||
obj.connectstate = 0;
|
||||
obj.inDataCount = 0;
|
||||
console.log('obj.tlsv1onlyx', obj.tlsv1only);
|
||||
obj.socket = new WebSocket(window.location.protocol.replace("http", "ws") + "//" + window.location.host + window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + "/webrelay.ashx?p=2&host=" + host + "&port=" + port + "&tls=" + tls + "&tls1only=" + obj.tlsv1only + ((user == '*') ? "&serverauth=1" : "") + ((typeof pass === "undefined") ? ("&serverauth=1&user=" + user) : "")); // The "p=2" indicates to the relay that this is a REDIRECTION session
|
||||
obj.socket = new WebSocket(window.location.protocol.replace("http", "ws") + "//" + window.location.host + window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + "/webrelay.ashx?p=2&host=" + host + "&port=" + port + "&tls=" + tls + ((user == '*') ? "&serverauth=1" : "") + ((typeof pass === "undefined") ? ("&serverauth=1&user=" + user) : "")); // The "p=2" indicates to the relay that this is a REDIRECTION session
|
||||
obj.socket.onopen = obj.xxOnSocketConnected;
|
||||
obj.socket.onmessage = obj.xxOnMessage;
|
||||
obj.socket.onclose = obj.xxOnSocketClosed;
|
||||
|
@ -1173,9 +1169,7 @@ var CreateAmtRedirect = function (module) {
|
|||
}
|
||||
|
||||
obj.xxOnMessage = function (e) {
|
||||
|
||||
obj.inDataCount++;
|
||||
if (typeof e.data == 'object') {
|
||||
if (typeof e.data == 'object') {
|
||||
var f = new FileReader();
|
||||
if (f.readAsBinaryString) {
|
||||
// Chrome & Firefox (Draft)
|
||||
|
@ -1389,18 +1383,8 @@ var CreateAmtRedirect = function (module) {
|
|||
|
||||
obj.xxOnSocketClosed = function () {
|
||||
//obj.Debug("Redir Socket Closed");
|
||||
|
||||
console.log('obj.tlsv1only', obj.tlsv1only);
|
||||
if ((obj.inDataCount == 0) && (obj.tlsv1only == 0)) {
|
||||
obj.tlsv1only = 1;
|
||||
obj.socket = new WebSocket(window.location.protocol.replace("http", "ws") + "//" + window.location.host + window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) + "/webrelay.ashx?p=2&host=" + host + "&port=" + port + "&tls=" + tls + "&tls1only=" + obj.tlsv1only + ((user == '*') ? "&serverauth=1" : "") + ((typeof pass === "undefined") ? ("&serverauth=1&user=" + user) : "")); // The "p=2" indicates to the relay that this is a REDIRECTION session
|
||||
obj.socket.onopen = obj.xxOnSocketConnected;
|
||||
obj.socket.onmessage = obj.xxOnMessage;
|
||||
obj.socket.onclose = obj.xxOnSocketClosed;
|
||||
} else {
|
||||
obj.Stop();
|
||||
}
|
||||
}
|
||||
obj.Stop();
|
||||
}
|
||||
|
||||
obj.xxStateChange = function(newstate) {
|
||||
if (obj.State == newstate) return;
|
||||
|
@ -33091,7 +33075,7 @@ if (typeof module !== "undefined" && module.exports) {
|
|||
var amtwirelessif = -1; // Set to the interface index for the wireless interface, -1 if no wireless.
|
||||
|
||||
var currentMeshNode = null;
|
||||
var webcompilerfeatures = ['AgentPresence','Alarms','AuditLog','Certificates','EventLog','EventSubscriptions','FileSaver','HardwareInfo','Look-MeshCentral','Mode-MeshCentral2','NetworkSettings','PowerControl','PowerControl-Advanced','RemoteAccess','Scripting','Scripting-Editor','Storage','SystemDefense','VersionWarning','Wireless','WsmanBrowser'];
|
||||
var webcompilerfeatures = ['AgentPresence','Alarms','AuditLog','Certificates','ComputerSelectorToolbar','EventLog','EventSubscriptions','FileSaver','HardwareInfo','Look-MeshCentral','Mode-MeshCentral2','NetworkSettings','PowerControl','PowerControl-Advanced','RemoteAccess','Scripting','Scripting-Editor','Storage','SystemDefense','VersionWarning','Wireless','WsmanBrowser'];
|
||||
var StatusStrs = ['Disconnected', 'Connecting...', 'Setup...', 'Connected'];
|
||||
|
||||
var scriptstate;
|
||||
|
@ -33463,7 +33447,7 @@ if (typeof module !== "undefined" && module.exports) {
|
|||
//if (amtversion > 5) query.push("IPS_IPv6PortSettings", "*CIM_KVMRedirectionSAP", "*IPS_OptInService");
|
||||
amtstack.BatchEnum("", query, processSystemStatus, true);
|
||||
|
||||
if (x == 1 && amtsysstate && amtsysstate['AMT_EthernetPortSettings'].responses.length > 1) PullWireless();
|
||||
if (x == 1) PullWireless();
|
||||
}
|
||||
|
||||
function processSystemTime(stack, name, responses, status) {
|
||||
|
@ -33637,9 +33621,9 @@ if (typeof module !== "undefined" && module.exports) {
|
|||
|
||||
for (var y in amtsysstate['AMT_EthernetPortSettings'].responses) {
|
||||
var z = amtsysstate['AMT_EthernetPortSettings'].responses[y];
|
||||
if ((y == 0) && (z["MACAddress"] == "00-00-00-00-00-00")) { continue; } // On computers with only wireless, the wired interface will have a null MAC, skip it.
|
||||
if (y == 0) systemdefense++;
|
||||
if (z['WLANLinkProtectionLevel'] || (y == 1)) { amtwirelessif = y; } // Set the wireless interface, this seems to cover new wireless only computers and older computers with dual interfaces.
|
||||
if ((y == 0) && (amtwirelessif != y) && (z["MACAddress"] == "00-00-00-00-00-00")) { continue; } // On computers with only wireless, the wired interface will have a null MAC, skip it.
|
||||
if (y == 0) systemdefense++;
|
||||
x += "<br><h2>" + ((amtwirelessif == y)?'Wireless':'Wired') + " Interface</h2>";
|
||||
x += TableStart();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue