mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-13 16:03:20 -05:00
Merge branch 'master' of https://github.com/Ylianst/MeshCentral into master
This commit is contained in:
commit
784df4b1fd
Binary file not shown.
@ -446,6 +446,15 @@
|
||||
"fileName": { "type": "string", "default": "meshagent", "description": "The agent filename." }
|
||||
}
|
||||
},
|
||||
"assistantCustomization": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Use this section to customize the MeshCentral Assistant.",
|
||||
"properties": {
|
||||
"title": { "type": "string", "default": "MeshCentral Assistant", "description": "Name to show as MeshCentral Assistant dialog title." },
|
||||
"image": { "type": "string", "default": null, "description": "The filename of a image file in .png format located in meshcentral-data to display in MeshCentral Assistant, image should be square and from 64x64 to 128x128." }
|
||||
}
|
||||
},
|
||||
"userAllowedIP": { "type": "string" },
|
||||
"userBlockedIP": { "type": "string" },
|
||||
"agentAllowedIP": { "type": "string" },
|
||||
|
@ -45,7 +45,7 @@
|
||||
"express-ws": "^4.0.0",
|
||||
"ipcheck": "^0.1.0",
|
||||
"minimist": "^1.2.0",
|
||||
"multiparty": "^4.2.1",
|
||||
"multiparty": "^4.2.2",
|
||||
"nedb": "^1.8.0",
|
||||
"node-forge": "^0.10.0",
|
||||
"ws": "^7.4.6",
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
@ -4729,7 +4729,7 @@
|
||||
x += '<div id=aginsTypeDiv>';
|
||||
x += addHtmlValue("Installation Type", '<select id=aginsType onchange=addAgentToMeshClick() style=width:236px><option value=0>' + "Background & interactive" + '</option><option value=2>' + "Background only" + '</option><option value=1>' + "Interactive only" + '</option></select>');
|
||||
x += '</div><div id=asinsTypeDiv>';
|
||||
x += addHtmlValue("Installation Type", '<select id=asinsType onchange=addAgentToMeshClick() style=width:236px><option value=0>' + "Connect on user request" + '</option><option value=1>' + "Always connected" + '</option></select>');
|
||||
x += addHtmlValue("Installation Type", '<select id=asinsType onchange=addAgentToMeshClick() style=width:236px><option value=2>' + "Application, Connect on user request" + '</option><option value=3>' + "Application, Always connected" + '</option><option value=0>' + "System Tray, Connect on user request" + '</option><option value=1>' + "System Tray, Always connected" + '</option></select>');
|
||||
x += '</div><hr>';
|
||||
|
||||
// \/:*?"<>|
|
||||
|
12
webserver.js
12
webserver.js
@ -4637,7 +4637,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||
if ((domain.agentnoproxy === true) || (obj.args.lanonly == true)) { meshsettings += 'ignoreProxyFile=1\r\n'; }
|
||||
if (obj.args.agentconfig) { for (var i in obj.args.agentconfig) { meshsettings += obj.args.agentconfig[i] + '\r\n'; } }
|
||||
if (domain.agentconfig) { for (var i in domain.agentconfig) { meshsettings += domain.agentconfig[i] + '\r\n'; } }
|
||||
if (domain.agentcustomization != null) { // Add agent customization
|
||||
if ((req.query.id != '10006') && (domain.agentcustomization != null)) { // Add agent customization, not for Assistant
|
||||
if (domain.agentcustomization.displayname != null) { meshsettings += 'displayName=' + domain.agentcustomization.displayname + '\r\n'; }
|
||||
if (domain.agentcustomization.description != null) { meshsettings += 'description=' + domain.agentcustomization.description + '\r\n'; }
|
||||
if (domain.agentcustomization.companyname != null) { meshsettings += 'companyName=' + domain.agentcustomization.companyname + '\r\n'; }
|
||||
@ -4645,7 +4645,15 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||
if (domain.agentcustomization.filename != null) { meshsettings += 'fileName=' + domain.agentcustomization.filename + '\r\n'; }
|
||||
}
|
||||
if ((parent.agentTranslations != null) && (req.query.id != '10006')) { meshsettings += 'translation=' + parent.agentTranslations + '\r\n'; } // Translation strings, not for MeshCentral Assistant
|
||||
if ((req.query.id == '10006') && (req.query.ac == '1')) { meshsettings += 'AutoConnect=1\r\n'; } // Set AutoConnect=1 for MeshCentral Assistant if requested
|
||||
if (req.query.id == '10006') { // Assistant settings and customizations
|
||||
if ((req.query.ac != null)) { meshsettings += 'AutoConnect=' + req.query.ac + '\r\n'; } // Set MeshCentral Assistant flags if needed. 0x01 = Always Connected, 0x02 = Not System Tray
|
||||
if ((domain.assistantcustomization != null) && (typeof domain.assistantcustomization == 'object')) {
|
||||
if (typeof domain.assistantcustomization.title == 'string') { meshsettings += 'Title=' + domain.assistantcustomization.title + '\r\n'; }
|
||||
if (typeof domain.assistantcustomization.image == 'string') {
|
||||
try { meshsettings += 'Image=' + Buffer.from(obj.fs.readFileSync(parent.getConfigFilePath(domain.assistantcustomization.image)), 'binary').toString('base64') + '\r\n'; } catch (ex) { console.log(ex); }
|
||||
}
|
||||
}
|
||||
}
|
||||
setContentDispositionHeader(res, 'application/octet-stream', meshfilename, null, argentInfo.rname);
|
||||
obj.parent.exeHandler.streamExeWithMeshPolicy({ platform: 'win32', sourceFileName: obj.parent.meshAgentBinaries[req.query.id].path, destinationStream: res, msh: meshsettings, peinfo: obj.parent.meshAgentBinaries[req.query.id].pe });
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user