From 706ca171517644f0dda1e87399dcb48b0be881e6 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 3 May 2022 16:24:43 -0700 Subject: [PATCH] More RDP to desktop tab improvements. --- agents/MeshCmd-signed.exe | Bin 4491408 -> 4491680 bytes agents/MeshCmd64-signed.exe | Bin 4104336 -> 4104608 bytes agents/MeshService-signed.exe | Bin 3686192 -> 3686192 bytes agents/MeshService64-signed.exe | Bin 3299120 -> 3299120 bytes apprelays.js | 6 +++++- public/scripts/agent-rdp-0.0.1.js | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/agents/MeshCmd-signed.exe b/agents/MeshCmd-signed.exe index 6d5c61874409f45fa305ae3d01751bac9e6cbcc8..ad7eb6a281f826886e5c7c5a59b0882c82db6ece 100644 GIT binary patch delta 1642 zcmZY5c{tR090zbS#+?{BY8{OnxtlT6I0nOnh_X4uYT}2{G-O89u+zw37A30bn35wT zQc9C8LV6tK+Adw{kwqjlyR^x+AG_M8efIl2uYW$z=kxx2o^Sq<0`$4U0`%ns6uNvv zVIs;2osxL44wY4hT7(AD00U%zERX~8KmjNMC9n)AgXKU4r~)id11o?!&;Xi13# zNPfm*j0s6C9Lv~^MC_z9qiD>1XB!X{f1@c6X9+r9>U)A+TtIGQGQJw%d`!9(viYfU-qSUM|o ze|V^8xD|uWVk1lw&SJj3XPRjm0w)RG3rYB_q(Ty~1NOiHI07oQCg|G7{7@?q>LdlY?q=;oJUAHCZSm2i8?EkkICk|QZRwgf(h_D@$ z71M;GGS}5vM*41IBYi4iE82@D4BkWK;ZHP$wDuHi&chDdt6W$3O}cJY)b`W0r=NN3 zHG%xD94zlT!6#cXMz8SGdz0kgct)&{NabSjvS#x)+rm>9-sBSM5Ah=cV>6rR44o_8 zH~o{ZJg(lI>s0)P+%T6qWfYpY+B&+!b5Vlh2L?K#=xMpE0b(}d^gK)y=IZ}tg&>YvB0CX zr?136$fJQjD7vEg>0H-z(W5Re`L?_%`e?H&+G#>)$ES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l20^NN+8;v=Y<>jIaa?$58PzfqS6{rf; zAQs}FI@Ex8s0lAXEvOB3pe`gpBD@IoAPMS2184}1pfS7zO`s_>gXZuuw1Ae-3L?-N z+CW=q2koH)yaLJaDs+StVJ?~)z`!|Cog7`9TxiafD@d{3TMgdtTbL|t z!2S6Cn?1JdA+_I-pVf)9Szd+Pk}XktxXoH#H6F#{qZp-3ue%{fIhnj0I1MH)pW#aE zZQ74FmlK0aUpkX?Df?pSj6gmn&!e?*q7?aoniI1gy-{BKYJ~fd`j+!L{ksmEwJ9Uz zypEc8+^=;Vgh&+|{WlqL>1z`hItp3(@axnF9+1H1Yg)O^R5*mxtFridn&o%ZL( ziFvL&&6SaVy0+J`B)d+}!NuG4<#QRHt$Q8S$uUg_0ojEKQ}f4b5hB!#F<;a>SF-9h z?52t&-kDvoK-TysSzOb@ddW>eMlvmFx!Y`{7%y{JAuRZ$*LSXC8>eH5xdmG-XOC-@ cE!JtXGvXJL=0S=@+j#z_8vC${gF>PH1G*|tXaE2J diff --git a/apprelays.js b/apprelays.js index f4142d12..3bc7c2bc 100644 --- a/apprelays.js +++ b/apprelays.js @@ -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 diff --git a/public/scripts/agent-rdp-0.0.1.js b/public/scripts/agent-rdp-0.0.1.js index 7558f816..afbb8250 100644 --- a/public/scripts/agent-rdp-0.0.1.js +++ b/public/scripts/agent-rdp-0.0.1.js @@ -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(); } }