mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 06:05:53 -05:00
Updated Assistant & Router, fix for multi-domain servers, #2873.
This commit is contained in:
parent
27bd37f093
commit
27d76b0d7b
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1498,8 +1498,14 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
||||
if (typeof command.name != 'string') break;
|
||||
var info = parent.parent.meshToolsBinaries[command.name];
|
||||
if ((command.hash != null) && (info.hash == command.hash)) return;
|
||||
|
||||
// To build the connection URL, if we are using a sub-domain or one with a DNS, we need to craft the URL correctly.
|
||||
var xdomain = (domain.dns == null) ? domain.id : '';
|
||||
if (xdomain != '') xdomain += '/';
|
||||
|
||||
// Build the response
|
||||
const responseCmd = { action: 'meshToolInfo', name: command.name, tag: command.tag, sessionid: command.sessionid, hash: info.hash, size: info.size, url: info.url };
|
||||
if ((command.name == 'MeshCentralAssistant') && (command.msh == true)) { responseCmd.url = "*/meshagents?id=10006"; } // If this is Assistant and the MSH needs to be included in the executable, change the URL.
|
||||
if ((command.name == 'MeshCentralAssistant') && (command.msh == true)) { responseCmd.url = '*/' + xdomain + 'meshagents?id=10006'; } // If this is Assistant and the MSH needs to be included in the executable, change the URL.
|
||||
if (command.cookie === true) { responseCmd.url += ('&auth=' + parent.parent.encodeCookie({ download: info.dlname }, parent.parent.loginCookieEncryptionKey)); }
|
||||
if (command.pipe === true) { responseCmd.pipe = true; }
|
||||
if (parent.webCertificateHashs[domain.id] != null) { responseCmd.serverhash = Buffer.from(parent.webCertificateHashs[domain.id], 'binary').toString('hex'); }
|
||||
|
Loading…
Reference in New Issue
Block a user