Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
silversword411 committed Sep 22, 2022
2 parents 7353de1 + 4294e55 commit dd938c8
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 5 deletions.
2 changes: 1 addition & 1 deletion agents/meshinstall-linux.js
Expand Up @@ -156,7 +156,7 @@ if (process.argv.includes('-translations'))
console.log(JSON.stringify(translation));
process.exit();
}
if (process.argv.includes('-help') || (process.platform == 'linux' && process.env['XAUTHORITY']==null && process.env['DISPLAY'] == null))
if (process.argv.includes('-help') || (process.platform == 'linux' && process.env['XAUTHORITY'] == null && process.env['DISPLAY'] == null && process.argv.length == 1))
{
console.log("\n" + translation[lang].commands + ": ");
if ((msh.InstallFlags & 1) == 1)
Expand Down
4 changes: 2 additions & 2 deletions apprelays.js
Expand Up @@ -282,7 +282,7 @@ module.exports.CreateWebRelay = function (parent, db, args, domain) {

// Construct the HTTP request
var request = req.method + ' ' + req.url + ' HTTP/' + req.httpVersion + '\r\n';
const blockedHeaders = ['origin', 'cookie', 'upgrade-insecure-requests', 'sec-ch-ua', 'sec-ch-ua-mobile', 'dnt', 'sec-fetch-user', 'sec-ch-ua-platform', 'sec-fetch-site', 'sec-fetch-mode', 'sec-fetch-dest']; // These are headers we do not forward
const blockedHeaders = ['cookie', 'upgrade-insecure-requests', 'sec-ch-ua', 'sec-ch-ua-mobile', 'dnt', 'sec-fetch-user', 'sec-ch-ua-platform', 'sec-fetch-site', 'sec-fetch-mode', 'sec-fetch-dest']; // These are headers we do not forward
for (var i in req.headers) { if (blockedHeaders.indexOf(i) == -1) { request += i + ': ' + req.headers[i] + '\r\n'; } }
var cookieStr = '';
for (var i in parent.webCookies) { if (cookieStr != '') { cookieStr += '; ' } cookieStr += (i + '=' + parent.webCookies[i].value); }
Expand Down Expand Up @@ -331,7 +331,7 @@ module.exports.CreateWebRelay = function (parent, db, args, domain) {

// Construct the HTTP request
var request = req.method + ' ' + req.url + ' HTTP/' + req.httpVersion + '\r\n';
const blockedHeaders = ['origin', 'cookie', 'sec-websocket-extensions']; // These are headers we do not forward
const blockedHeaders = ['cookie', 'sec-websocket-extensions']; // These are headers we do not forward
for (var i in req.headers) { if (blockedHeaders.indexOf(i) == -1) { request += i + ': ' + req.headers[i] + '\r\n'; } }
var cookieStr = '';
for (var i in parent.webCookies) { if (cookieStr != '') { cookieStr += '; ' } cookieStr += (i + '=' + parent.webCookies[i].value); }
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/meshcentral/SSLnletsencrypt.md
Expand Up @@ -24,7 +24,7 @@ Make sure you match and/or adjust all the following settings appropriately in yo
}
```

If you need further clarification to know what each of these settings are
If you need further clarification to know what each of these settings are, check out [the config schema](https://github.com/Ylianst/MeshCentral/blob/master/meshcentral-config-schema.json).

Then restart meshcentral and it will get a cert for you, the process will need to restart to apply the cert.

Expand Down
2 changes: 2 additions & 0 deletions meshctrl.js
Expand Up @@ -579,6 +579,7 @@ if (args['_'].length == 0) {
console.log("\r\nOptional arguments:\r\n");
console.log(" --desc [description] - New group description.");
console.log(" --amtonly - New group is agent-less, Intel AMT only.");
console.log(" --agentless - New group is agent-less only.");
console.log(" --features [number] - Set device group features, sum of numbers below.");
console.log(" 1 = Auto-Remove 2 = Hostname Sync");
console.log(" 4 = Record Sessions");
Expand Down Expand Up @@ -1356,6 +1357,7 @@ function serverConnect() {
var op = { action: 'createmesh', meshname: args.name, meshtype: 2, responseid: 'meshctrl' };
if (args.desc) { op.desc = args.desc; }
if (args.amtonly) { op.meshtype = 1; }
if (args.agentless) { op.meshtype = 3; }
if (args.features) { op.flags = parseInt(args.features); }
if (args.consent) { op.consent = parseInt(args.consent); }
ws.send(JSON.stringify(op));
Expand Down

0 comments on commit dd938c8

Please sign in to comment.