diff --git a/package.json b/package.json index f0b184b1..6ef4c024 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.4.5-v", + "version": "0.4.5-w", "keywords": [ "Remote Management", "Intel AMT", diff --git a/public/scripts/agent-redir-ws-0.1.1.js b/public/scripts/agent-redir-ws-0.1.1.js index 7488a6e7..8c6e0c3d 100644 --- a/public/scripts/agent-redir-ws-0.1.1.js +++ b/public/scripts/agent-redir-ws-0.1.1.js @@ -69,6 +69,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au try { controlMsg = JSON.parse(msg); } catch (e) { return; } if (controlMsg.ctrlChannel != '102938') { obj.xxOnSocketData(msg); return; } //console.log(controlMsg); + if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirRecv', controlMsg); } if (controlMsg.type == 'console') { obj.consoleMessage = controlMsg.msg; if (obj.onConsoleMessageChange) { obj.onConsoleMessageChange(obj, obj.consoleMessage); } @@ -102,7 +103,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au if (obj.State < 3) { if ((e.data == 'c') || (e.data == 'cr')) { if (e.data == 'cr') { obj.serverIsRecording = true; } - if (obj.options != null) { delete obj.options.action; obj.options.type = 'options'; try { obj.socket.send(JSON.stringify(obj.options)); } catch (ex) { } } + if (obj.options != null) { delete obj.options.action; obj.options.type = 'options'; try { obj.sendCtrlMsg(JSON.stringify(obj.options)); } catch (ex) { } } try { obj.socket.send(obj.protocol); } catch (ex) { } obj.xxStateChange(3); @@ -119,7 +120,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au obj.webchannel.onclose = function (event) { if (obj.webRtcActive) { obj.Stop(); } } obj.webrtc.onicecandidate = function (e) { if (e.candidate == null) { - try { obj.socket.send(JSON.stringify(obj.webrtcoffer)); } catch (ex) { } // End of candidates, send the offer + try { obj.sendCtrlMsg(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 } @@ -215,7 +216,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au } else if (typeof data !== 'string') return; //console.log("xxOnSocketData", rstr2hex(data)); - if ((typeof args != 'undefined') && args.redirtrace) { console.log("RedirRecv", typeof data, data.length, data); } + if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirRecv', typeof data, data.length, (data[0] == '{')?data:rstr2hex(data).substring(0, 64)); } return obj.m.ProcessData(data); } @@ -227,7 +228,7 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au 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 ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirSend', typeof x, x.length, x); } + if ((typeof args != 'undefined') && args.redirtrace) { console.log('RedirSend', typeof x, x.length, (x[0] == '{') ? x : rstr2hex(x).substring(0, 64)); } try { if (obj.socket != null && obj.socket.readyState == WebSocket.OPEN) { if (typeof x == 'string') { diff --git a/public/styles/style.css b/public/styles/style.css index 097d6d7e..1c1eb49b 100644 --- a/public/styles/style.css +++ b/public/styles/style.css @@ -134,8 +134,8 @@ body { float: left; height: 66px; color: #c8c8c8; - padding-left: 20px; - padding-top: 8px; + padding-left: 14px; + padding-top: 7px; font-size: 46px; font-family: Arial,Helvetica,sans-serif; font-weight: bold; diff --git a/views/agentinvite.handlebars b/views/agentinvite.handlebars index 76711c8d..21a5bb46 100644 --- a/views/agentinvite.handlebars +++ b/views/agentinvite.handlebars @@ -48,7 +48,7 @@
{{{titlehtml}}}
-
+
{{{title1}}}
diff --git a/views/download.handlebars b/views/download.handlebars index 65fbf1f4..ee5b0127 100644 --- a/views/download.handlebars +++ b/views/download.handlebars @@ -14,7 +14,7 @@
{{{titlehtml}}}
-
+
{{{title1}}}
diff --git a/views/error404.handlebars b/views/error404.handlebars index d8a36d2a..1f396b1f 100644 --- a/views/error404.handlebars +++ b/views/error404.handlebars @@ -15,7 +15,7 @@
{{{titlehtml}}}
-
+
{{{title1}}}
diff --git a/views/message.handlebars b/views/message.handlebars index fec0df4f..cf28d05a 100644 --- a/views/message.handlebars +++ b/views/message.handlebars @@ -14,7 +14,7 @@
{{{titlehtml}}}
-
+
{{{title1}}}
diff --git a/views/terms.handlebars b/views/terms.handlebars index fd26f274..0e57f943 100644 --- a/views/terms.handlebars +++ b/views/terms.handlebars @@ -15,7 +15,7 @@
{{{titlehtml}}}
-
+
{{{title1}}}
diff --git a/webserver.js b/webserver.js index 3d34cee2..aa2a4849 100644 --- a/webserver.js +++ b/webserver.js @@ -2338,7 +2338,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { chnl.onData = function (ciraconn, data) { // CIRA ---> TLS parent.debug('webrelay', 'Relay TLS CIRA data', data.length); - if (data.length > 0) { try { ser.updateBuffer(Buffer.from(data, 'binary')); } catch (e) { } } + if (data.length > 0) { try { ser.updateBuffer(Buffer.from(data, 'binary')); } catch (ex) { console.log(ex); } } }; // Handle CIRA tunnel state change @@ -2438,7 +2438,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { } else { // Log to recording file data = Buffer.from(data, 'binary'); - recordingEntry(ws.logfile.fd, 2, 0, data, function () { try { ws.send(data); } catch (e) { } }); // TODO: Add TLS support + recordingEntry(ws.logfile.fd, 2, 0, data, function () { try { ws.send(data); } catch (ex) { console.log(ex); } }); // TODO: Add TLS support } } };