1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-02-12 11:01:52 +00:00

More RDP to desktop tab improvements.

This commit is contained in:
Ylian Saint-Hilaire 2022-05-03 16:24:43 -07:00
parent 1240733d6c
commit 706ca17151
6 changed files with 6 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -227,8 +227,12 @@ module.exports.CreateMstscRelay = function (parent, db, ws, req, args, domain) {
obj.relaynodeid = mesh.relayid; obj.relaynodeid = mesh.relayid;
obj.tcpaddr = node.host; obj.tcpaddr = node.host;
// Get the TCP port to use
var tcpport = 3389;
if ((obj.cookie != null) && (obj.cookie.tcpport != null)) { tcpport = obj.cookie.tcpport; } else { if (node.rdpport) { tcpport = node.rdpport } }
// Re-encode a cookie with a device relay // Re-encode a cookie with a device relay
const cookieContent = { userid: obj.userid, domainid: domain.id, nodeid: mesh.relayid, tcpaddr: node.host, tcpport: obj.cookie.tcpport }; const cookieContent = { userid: obj.userid, domainid: domain.id, nodeid: mesh.relayid, tcpaddr: node.host, tcpport: tcpport };
obj.infos.ip = parent.parent.encodeCookie(cookieContent, parent.parent.loginCookieEncryptionKey); obj.infos.ip = parent.parent.encodeCookie(cookieContent, parent.parent.loginCookieEncryptionKey);
} else if (obj.infos.ip.startsWith('node/')) { } else if (obj.infos.ip.startsWith('node/')) {
// Encode a cookie with a device relay // Encode a cookie with a device relay

View file

@ -88,6 +88,7 @@ var CreateRDPDesktop = function (canvasid) {
} }
obj.Stop = function () { obj.Stop = function () {
obj.Canvas.fillRect(0, 0, obj.ScreenWidth, obj.ScreenHeight);
if (obj.socket) { obj.socket.close(); } if (obj.socket) { obj.socket.close(); }
} }