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.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
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);
} else if (obj.infos.ip.startsWith('node/')) {
// Encode a cookie with a device relay

View File

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