mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Improved executable binary handling
This commit is contained in:
parent
4106b322d6
commit
65f99a3c31
11 changed files with 410 additions and 64 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -279,12 +279,12 @@ function startLms() {
|
|||
//console.log("WebSocket for " + req.url.split('?')[0]);
|
||||
switch (req.url.split('?')[0]) {
|
||||
case '/lms.ashx': // MeshCommander control channel (PTHI)
|
||||
socket.upgradeWebSocket();
|
||||
socket.on('data', processLmsControlData);
|
||||
socket.ws = socket.upgradeWebSocket();
|
||||
socket.ws.on('data', processLmsControlData);
|
||||
break;
|
||||
case '/webrelay.ashx': // MeshCommander data channel (LME)
|
||||
socket.upgradeWebSocket();
|
||||
amtLms.bindDuplexStream(socket, 'IPv4', 16992);
|
||||
socket.ws = socket.upgradeWebSocket();
|
||||
amtLms.bindDuplexStream(socket.ws, 'IPv4', 16992);
|
||||
break;
|
||||
default:
|
||||
socket.end();
|
||||
|
@ -295,9 +295,8 @@ function startLms() {
|
|||
//console.log("WebRequest for " + req.url.split('?')[0]);
|
||||
switch (req.url.split('?')[0]) {
|
||||
case '/': // Serve MeshCommander Web Application for LMS
|
||||
rsp.writeHead(200, 'OK', { Server: 'JSLMS', 'Cache-Control': 'max-age=0, no-cache', 'X-Frame-Options': 'DENY', 'Content-Type': 'text/html', 'Content-Encoding': 'gzip', ETag: _IntelAmtWebApp_etag });
|
||||
rsp.write(Buffer.from(_IntelAmtWebApp, 'base64'));
|
||||
rsp.end();
|
||||
rsp.writeHead(200, 'OK', { Server: 'JSLMS', 'Cache-Control': 'max-age=0, no-cache', 'X-Frame-Options': 'DENY', 'Content-Type': 'text/html', 'Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', ETag: _IntelAmtWebApp_etag });
|
||||
rsp.end(Buffer.from(_IntelAmtWebApp, 'base64'));
|
||||
break;
|
||||
default: // Unknown request
|
||||
rsp.statusCode = 404;
|
||||
|
|
|
@ -692,7 +692,7 @@ function createMeshCore(agent) {
|
|||
// Called when receiving control data on websocket
|
||||
function onTunnelControlData(data) {
|
||||
if (typeof data != 'string') return;
|
||||
//sendConsoleText('onTunnelControlData: ' + data);
|
||||
sendConsoleText('onTunnelControlData: ' + data);
|
||||
//console.log('onTunnelControlData: ' + data);
|
||||
|
||||
var obj;
|
||||
|
@ -729,7 +729,7 @@ function createMeshCore(agent) {
|
|||
this.webrtc.on('connected', function () { sendConsoleText('Tunnel #' + this.websocket.tunnel.index + ' WebRTC connected'); });
|
||||
this.webrtc.on('disconnected', function () { sendConsoleText('Tunnel #' + this.websocket.tunnel.index + ' WebRTC disconnected'); });
|
||||
this.webrtc.on('dataChannel', function (rtcchannel) {
|
||||
//sendConsoleText('WebRTC Datachannel open, protocol: ' + this.websocket.httprequest.protocol);
|
||||
sendConsoleText('WebRTC Datachannel open, protocol: ' + this.websocket.httprequest.protocol);
|
||||
rtcchannel.xrtc = this;
|
||||
this.rtcchannel = rtcchannel;
|
||||
this.rtcchannel.on('data', onTunnelWebRTCControlData);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue