Fixed MeshCMD proxy when unknown host.

This commit is contained in:
Ylian Saint-Hilaire 2019-03-26 15:30:14 -07:00
parent 617363a6fb
commit 3f5062bb53
5 changed files with 3 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -125,8 +125,8 @@ function run(argv) {
if ((typeof args.proxy) == 'string') { if ((typeof args.proxy) == 'string') {
var proxy = args.proxy.split(':'), proxyport = (proxy.length == 2) ? parseInt(proxy[1]) : 0; var proxy = args.proxy.split(':'), proxyport = (proxy.length == 2) ? parseInt(proxy[1]) : 0;
if ((proxy.length != 2) || (proxy[0].length < 1) || (proxyport < 1) || (proxyport > 65535)) { console.log('Invalid \"proxy\" specified, use --proxy [hostname]:[port].'); exit(1); return; } if ((proxy.length != 2) || (proxy[0].length < 1) || (proxyport < 1) || (proxyport > 65535)) { console.log('Invalid \"proxy\" specified, use --proxy [hostname]:[port].'); exit(1); return; }
try { require('global-tunnel').initialize({ host: proxy[0], port: proxyport }); } catch (ex) { console.log(ex); exit(1); return; }
console.log('Proxy set to ' + proxy[0] + ':' + proxyport); console.log('Proxy set to ' + proxy[0] + ':' + proxyport);
require('global-tunnel').initialize({ host: proxy[0], port: proxyport });
} }
if (args.debug) { try { waitForDebugger(); } catch (e) { } } if (args.debug) { try { waitForDebugger(); } catch (e) { } }
if (args.noconsole) { settings.noconsole = true; } if (args.noconsole) { settings.noconsole = true; }

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "meshcentral", "name": "meshcentral",
"version": "0.3.1-k", "version": "0.3.1-m",
"keywords": [ "keywords": [
"Remote Management", "Remote Management",
"Intel AMT", "Intel AMT",