1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

More work on remote desktop sharing.

This commit is contained in:
Ylian Saint-Hilaire 2020-08-07 15:01:28 -07:00
parent 51f2c9b0a7
commit a9a037b073
71 changed files with 1870 additions and 1877 deletions

View file

@ -14,6 +14,7 @@
"use strict";
module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie) {
if (cookie && (cookie.nid != null)) { req.query.nodeid = cookie.nid; }
var obj = {};
obj.ws = ws;
obj.id = req.query.id;
@ -493,7 +494,7 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
// Send connection request to agent
const rcookie = parent.parent.encodeCookie({ ruserid: user._id }, parent.parent.loginCookieEncryptionKey);
if (obj.id == undefined) { obj.id = ('' + Math.random()).substring(2); } // If there is no connection id, generate one.
if (obj.id == null) { obj.id = ('' + Math.random()).substring(2); } // If there is no connection id, generate one.
const command = { nodeid: cookie.nodeid, action: 'msg', type: 'tunnel', userid: user._id, value: '*/meshrelay.ashx?id=' + obj.id + '&rauth=' + rcookie, tcpport: cookie.tcpport, tcpaddr: cookie.tcpaddr, soptions: {} };
if (typeof domain.consentmessages == 'object') {
if (typeof domain.consentmessages.title == 'string') { command.soptions.consentTitle = domain.consentmessages.title; }