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:
		
							parent
							
								
									410ead461d
								
							
						
					
					
						commit
						acb9a5bb6e
					
				
					 4 changed files with 10 additions and 8 deletions
				
			
		|  | @ -775,7 +775,8 @@ module.exports.CreateMstscRelay = function (parent, db, ws, req, args, domain) { | |||
|                 const protocol = (args.tlsoffload) ? 'ws' : 'wss'; | ||||
|                 var domainadd = ''; | ||||
|                 if ((domain.dns == null) && (domain.id != '')) { domainadd = domain.id + '/' } | ||||
|                 const url = protocol + '://localhost:' + args.port + '/' + domainadd + (((obj.mtype == 3) && (obj.relaynodeid == null)) ? 'local' : 'mesh') + 'relay.ashx?p=10&auth=' + obj.infos.ip;  // Protocol 10 is Web-RDP
 | ||||
|                 var url = protocol + '://localhost:' + args.port + '/' + domainadd + (((obj.mtype == 3) && (obj.relaynodeid == null)) ? 'local' : 'mesh') + 'relay.ashx?p=10&auth=' + obj.infos.ip;  // Protocol 10 is Web-RDP
 | ||||
|                 if (domain.id != '') { url += '&domainid=' + domain.id; } // Since we are using "localhost", we are going to signal what domain we are on using a URL argument.
 | ||||
|                 parent.parent.debug('relay', 'RDP: Connection websocket to ' + url); | ||||
|                 obj.wsClient = new WebSocket(url, options); | ||||
|                 obj.wsClient.on('open', function () { parent.parent.debug('relay', 'RDP: Relay websocket open'); }); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue