perf: add xrdp rdp7 port 3390

This commit is contained in:
Eric
2023-06-30 18:09:39 +08:00
parent 6b7df10d50
commit 6001175629
8 changed files with 120 additions and 5 deletions

View File

@@ -75,8 +75,9 @@ class RDPFileClientProtocolURLMixin:
rdp_options['screen mode id:i'] = '2' if full_screen else '1'
# 设置 RDP Server 地址
endpoint = self.get_smart_endpoint(protocol='rdp', asset=token.asset)
rdp_options['full address:s'] = f'{endpoint.host}:{endpoint.rdp_port}'
endpoint = self.get_smart_endpoint(protocol=token.protocol, asset=token.asset)
protocol_port = endpoint.get_protocol_port(token.protocol, 3389)
rdp_options['full address:s'] = f'{endpoint.host}:{protocol_port}'
# 设置用户名
rdp_options['username:s'] = '{}|{}'.format(token.user.username, str(token.id))