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

Fixed Web-RDP when used with non-default domain (#4271)

This commit is contained in:
Ylian Saint-Hilaire 2022-07-14 15:18:41 -07:00
parent 410ead461d
commit acb9a5bb6e
4 changed files with 10 additions and 8 deletions

View file

@ -5,9 +5,9 @@
*/
// Construct a RDP remote desktop object
var CreateRDPDesktop = function (canvasid) {
var CreateRDPDesktop = function (canvasid, domainUrl) {
var obj = {}
obj.m = { KeyAction: { "NONE": 0, "DOWN": 1, "UP": 2, "SCROLL": 3, "EXUP": 4, "EXDOWN": 5, "DBLCLICK": 6 } };
obj.m = { KeyAction: { 'NONE': 0, 'DOWN': 1, 'UP': 2, 'SCROLL': 3, 'EXUP': 4, 'EXDOWN': 5, 'DBLCLICK': 6 } };
obj.State = 0;
obj.canvas = Q(canvasid);
obj.CanvasId = canvasid;
@ -41,7 +41,7 @@ var CreateRDPDesktop = function (canvasid) {
delete credentials.height;
}
obj.render = new Mstsc.Canvas.create(obj.canvas);
obj.socket = new WebSocket('wss://' + window.location.host + '/mstscrelay.ashx'); // TODO: Support domains
obj.socket = new WebSocket('wss://' + window.location.host + domainUrl + 'mstscrelay.ashx');
obj.socket.binaryType = 'arraybuffer';
obj.socket.onopen = function () {
changeState(2); // Setup state