mirror of https://github.com/jumpserver/jumpserver
perf: add rdp connection speed option (#14641)
* perf: add rdp connection speed option * perf: remove print code --------- Co-authored-by: Eric <xplzv@126.com>pull/14646/head
parent
dddfc66efd
commit
ee5e97e860
|
@ -68,6 +68,36 @@ class RDPFileClientProtocolURLMixin:
|
|||
'bookmarktype:i': '3',
|
||||
'use redirection server name:i': '0',
|
||||
}
|
||||
|
||||
# copy from
|
||||
# https://learn.microsoft.com/zh-cn/windows-server/administration/performance-tuning/role/remote-desktop/session-hosts
|
||||
rdp_low_speed_broadband_option = {
|
||||
"connection type:i": 2,
|
||||
"disable wallpaper:i": 1,
|
||||
"bitmapcachepersistenable:i": 1,
|
||||
"disable full window drag:i": 1,
|
||||
"disable menu anims:i": 1,
|
||||
"allow font smoothing:i": 0,
|
||||
"allow desktop composition:i": 0,
|
||||
"disable themes:i": 0
|
||||
}
|
||||
|
||||
rdp_high_speed_broadband_option = {
|
||||
"connection type:i": 4,
|
||||
"disable wallpaper:i": 0,
|
||||
"bitmapcachepersistenable:i": 1,
|
||||
"disable full window drag:i": 1,
|
||||
"disable menu anims:i": 0,
|
||||
"allow font smoothing:i": 0,
|
||||
"allow desktop composition:i": 1,
|
||||
"disable themes:i": 0
|
||||
}
|
||||
|
||||
RDP_CONNECTION_SPEED_OPTION_MAP = {
|
||||
"auto": {},
|
||||
"low_speed_broadband": rdp_low_speed_broadband_option,
|
||||
"high_speed_broadband": rdp_high_speed_broadband_option,
|
||||
}
|
||||
# 设置多屏显示
|
||||
multi_mon = is_true(self.request.query_params.get('multi_mon'))
|
||||
if multi_mon:
|
||||
|
@ -116,6 +146,8 @@ class RDPFileClientProtocolURLMixin:
|
|||
rdp = token.asset.platform.protocols.filter(name='rdp').first()
|
||||
if rdp and rdp.setting.get('console'):
|
||||
rdp_options['administrative session:i'] = '1'
|
||||
rdp_connection_speed = token.connect_options.get('rdp_connection_speed', 'auto')
|
||||
rdp_options.update(RDP_CONNECTION_SPEED_OPTION_MAP.get(rdp_connection_speed, {}))
|
||||
|
||||
# 文件名
|
||||
name = token.asset.name
|
||||
|
|
|
@ -223,5 +223,9 @@
|
|||
"start time": "start time",
|
||||
"success": "success",
|
||||
"system user": "system user",
|
||||
"user": "user"
|
||||
}
|
||||
"user": "user",
|
||||
"Low Speed Broadband (256 Kbps - 2 Mbps)": "Low Speed Broadband (256 Kbps - 2 Mbps)",
|
||||
"High-speed broadband (2 Mbps – 10 Mbps )": "High-speed broadband (2 Mbps – 10 Mbps )",
|
||||
"Auto": "Auto",
|
||||
"RDP connection speed": "RDP connection speed"
|
||||
}
|
||||
|
|
|
@ -221,5 +221,9 @@
|
|||
"start time": "开始时间",
|
||||
"success": "成功",
|
||||
"system user": "系统用户",
|
||||
"user": "用户"
|
||||
}
|
||||
"user": "用户",
|
||||
"Low Speed Broadband (256 Kbps - 2 Mbps)": "低速宽带 (256 Kbps - 2 Mbps)",
|
||||
"High-speed broadband (2 Mbps – 10 Mbps )": "高速宽带 (2 Mbps - 10 Mbps)",
|
||||
"Auto": "自动",
|
||||
"RDP connection speed": "RDP 连接速度"
|
||||
}
|
||||
|
|
|
@ -225,5 +225,9 @@
|
|||
"start time": "開始時間",
|
||||
"success": "成功",
|
||||
"system user": "系統用戶",
|
||||
"user": "用戶"
|
||||
}
|
||||
"user": "用戶",
|
||||
"Low Speed Broadband (256 Kbps - 2 Mbps)": "低速寬帶 (256 Kbps - 2 Mbps)",
|
||||
"High-speed broadband (2 Mbps – 10 Mbps )": "高速寬帶 (2 Mbps - 10 Mbps)",
|
||||
"Auto": "自動",
|
||||
"RDP connection speed": "RDP 連接速度"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue