feat: 支持拉起本地客户端 (#10865)

* perf: 拉起本地客户端应用接口提供更多数据

* fix: rdp客户端拉起后窗口标题中文乱码

* perf: ssh客户端连接选项显示优化

* feat: 增加本地sftp客户端选项

* perf: 合并支持sftp协议

* perf: sftp与ssh使用相同端口

---------

Co-authored-by: halo <wuyihuangw@gmail.com>
This commit is contained in:
fit2bot
2023-08-09 10:36:54 +08:00
committed by GitHub
parent 33ee84633f
commit f486c843bf
2 changed files with 12 additions and 5 deletions

View File

@@ -148,16 +148,25 @@ class RDPFileClientProtocolURLMixin:
if connect_method_dict is None:
raise ValueError('Connect method not support: {}'.format(connect_method_name))
endpoint = self.get_smart_endpoint(
protocol=connect_method_dict['endpoint_protocol'],
asset=token.asset
)
data = {
'id': str(token.id),
'value': token.value,
'name': f'{endpoint.host}-{str(token.id)[:18]}',
'protocol': token.protocol,
'host': endpoint.host,
'port': endpoint.get_port(token.asset, token.protocol),
'username': f'JMS-{str(token.id)}',
'value': token.value,
'command': '',
'file': {}
}
if connect_method_name == NativeClient.mstsc or connect_method_dict['type'] == 'applet':
filename, content = self.get_rdp_file_info(token)
filename = urllib.parse.unquote(filename)
data.update({
'protocol': 'rdp',
'file': {
@@ -166,10 +175,6 @@ class RDPFileClientProtocolURLMixin:
}
})
else:
endpoint = self.get_smart_endpoint(
protocol=connect_method_dict['endpoint_protocol'],
asset=token.asset
)
cmd = NativeClient.get_launch_command(connect_method_name, token, endpoint)
data.update({'command': cmd})
return data