diff --git a/agents/MeshCmd-signed.exe b/agents/MeshCmd-signed.exe index eca883d4..8da34742 100644 Binary files a/agents/MeshCmd-signed.exe and b/agents/MeshCmd-signed.exe differ diff --git a/agents/MeshCmd64-signed.exe b/agents/MeshCmd64-signed.exe index 95208c85..a1337c72 100644 Binary files a/agents/MeshCmd64-signed.exe and b/agents/MeshCmd64-signed.exe differ diff --git a/agents/MeshService-signed.exe b/agents/MeshService-signed.exe index 539ede0a..5f351d89 100644 Binary files a/agents/MeshService-signed.exe and b/agents/MeshService-signed.exe differ diff --git a/agents/MeshService.exe b/agents/MeshService.exe index 6f5dd244..dce1d40e 100644 Binary files a/agents/MeshService.exe and b/agents/MeshService.exe differ diff --git a/agents/MeshService64-signed.exe b/agents/MeshService64-signed.exe index eb0b6136..0432a9b9 100644 Binary files a/agents/MeshService64-signed.exe and b/agents/MeshService64-signed.exe differ diff --git a/agents/MeshService64.exe b/agents/MeshService64.exe index 6f1acb8a..c6ee72c4 100644 Binary files a/agents/MeshService64.exe and b/agents/MeshService64.exe differ diff --git a/mpsserver.js b/mpsserver.js index 0e00588c..13dd0a38 100644 --- a/mpsserver.js +++ b/mpsserver.js @@ -226,7 +226,7 @@ module.exports.CreateMpsServer = function (parent, db, args, certificates) { var meshIdStart = '/' + username; obj.db.GetAllType('mesh', function (err, docs) { var mesh = null; - for (var i in docs) { if (docs[i]._id.indexOf(meshIdStart) > 0) { mesh = docs[i]; break; } } + for (var i in docs) { if (docs[i]._id.replace(/\@/g, 'X').replace(/\$/g, 'X').indexOf(meshIdStart) > 0) { mesh = docs[i]; break; } } if (mesh == null) { Debug(1, 'MPS:Mesh not found', username, password); SendUserAuthFail(socket); return -1; } // If this is a agent-less mesh, use the device guid 3 times as ID. diff --git a/package.json b/package.json index c0195ca6..047466fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.1.5-k", + "version": "0.1.5-r", "keywords": [ "Remote Management", "Intel AMT", diff --git a/public/scripts/agent-desktop-0.0.2.js b/public/scripts/agent-desktop-0.0.2.js index e502c598..24359a35 100644 --- a/public/scripts/agent-desktop-0.0.2.js +++ b/public/scripts/agent-desktop-0.0.2.js @@ -159,7 +159,7 @@ var CreateAgentRemoteDesktop = function (canvasid, scrolldiv) { } obj.ProcessScreenMsg = function (width, height) { - obj.Debug("ScreenSize: " + width + " x " + height); + //obj.Debug("ScreenSize: " + width + " x " + height); obj.Canvas.setTransform(1, 0, 0, 1, 0, 0); obj.rotation = 0; obj.FirstDraw = true; diff --git a/public/scripts/agent-redir-ws-0.1.0.js b/public/scripts/agent-redir-ws-0.1.0.js index b2581e54..d66bcbf5 100644 --- a/public/scripts/agent-redir-ws-0.1.0.js +++ b/public/scripts/agent-redir-ws-0.1.0.js @@ -70,7 +70,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort) { } } - function sendCtrlMsg(x) { if (obj.ctrlMsgAllowed == true) { try { obj.socket.send(x); } catch (e) { } } } + function sendCtrlMsg(x) { if (obj.ctrlMsgAllowed == true) { try { obj.socket.send(x); } catch (ex) { } } } function performWebRtcSwitch() { if ((obj.webSwitchOk == true) && (obj.webRtcActive == true)) { @@ -94,7 +94,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort) { //console.log('Recv', e.data, obj.State); if (obj.State < 3) { if (e.data == 'c') { - obj.socket.send(obj.protocol); + try { obj.socket.send(obj.protocol); } catch (ex) { } obj.xxStateChange(3); if (obj.attemptWebRTC == true) { @@ -109,7 +109,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort) { obj.webchannel.onclose = function (event) { /*console.log('WebRTC close');*/ if (obj.webRtcActive) { obj.Stop(); } } obj.webrtc.onicecandidate = function (e) { if (e.candidate == null) { - obj.socket.send(JSON.stringify(obj.webrtcoffer)); // End of candidates, send the offer + try { obj.socket.send(JSON.stringify(obj.webrtcoffer)); } catch (ex) { } // End of candidates, send the offer } else { obj.webrtcoffer.sdp += ("a=" + e.candidate.candidate + "\r\n"); // New candidate, add it to the SDP } @@ -177,23 +177,25 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort) { obj.send = function (x) { //obj.debug("Agent Redir Send(" + obj.webRtcActive + ", " + x.length + "): " + rstr2hex(x)); //console.log("Agent Redir Send(" + obj.webRtcActive + ", " + x.length + "): " + ((typeof x == 'string')?x:rstr2hex(x))); - if (obj.socket != null && obj.socket.readyState == WebSocket.OPEN) { - if (typeof x == 'string') { - if (obj.debugmode == 1) { - var b = new Uint8Array(x.length), c = []; - for (var i = 0; i < x.length; ++i) { b[i] = x.charCodeAt(i); c.push(x.charCodeAt(i)); } - if (obj.webRtcActive == true) { obj.webchannel.send(b.buffer); } else { obj.socket.send(b.buffer); } - //console.log('Send', c); + try { + if (obj.socket != null && obj.socket.readyState == WebSocket.OPEN) { + if (typeof x == 'string') { + if (obj.debugmode == 1) { + var b = new Uint8Array(x.length), c = []; + for (var i = 0; i < x.length; ++i) { b[i] = x.charCodeAt(i); c.push(x.charCodeAt(i)); } + if (obj.webRtcActive == true) { obj.webchannel.send(b.buffer); } else { obj.socket.send(b.buffer); } + //console.log('Send', c); + } else { + var b = new Uint8Array(x.length); + for (var i = 0; i < x.length; ++i) { b[i] = x.charCodeAt(i); } + if (obj.webRtcActive == true) { obj.webchannel.send(b.buffer); } else { obj.socket.send(b.buffer); } + } } else { - var b = new Uint8Array(x.length); - for (var i = 0; i < x.length; ++i) { b[i] = x.charCodeAt(i); } - if (obj.webRtcActive == true) { obj.webchannel.send(b.buffer); } else { obj.socket.send(b.buffer); } + //if (obj.debugmode == 1) { console.log('Send', x); } + if (obj.webRtcActive == true) { obj.webchannel.send(x); } else { obj.socket.send(x); } } - } else { - //if (obj.debugmode == 1) { console.log('Send', x); } - if (obj.webRtcActive == true) { obj.webchannel.send(x); } else { obj.socket.send(x); } } - } + } catch (ex) { } } obj.xxOnSocketClosed = function () { diff --git a/public/scripts/amt-desktop-0.0.2.js b/public/scripts/amt-desktop-0.0.2.js index cc4bb1b3..f4a8730a 100644 --- a/public/scripts/amt-desktop-0.0.2.js +++ b/public/scripts/amt-desktop-0.0.2.js @@ -8,6 +8,7 @@ var CreateAmtRemoteDesktop = function (divid, scrolldiv) { var obj = {}; obj.canvasid = divid; + obj.CanvasId = Q(divid); obj.scrolldiv = scrolldiv; obj.canvas = Q(divid).getContext("2d"); obj.protocol = 2; // KVM diff --git a/views/default.handlebars b/views/default.handlebars index 3648bfab..bd60a24b 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -115,6 +115,12 @@   Hostname +
+     +   + AutoConnect  +   +
   @@ -128,7 +134,8 @@
@@ -140,6 +147,15 @@  
+
+ Size + +   +