mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-13 05:49:07 +00:00
perf: 优化处理telnet协议资产端点的端口问题
This commit is contained in:
@@ -41,7 +41,7 @@ class Endpoint(JMSBaseModel):
|
|||||||
protocol == Protocol.oracle:
|
protocol == Protocol.oracle:
|
||||||
port = db_port_manager.get_port_by_db(target_instance)
|
port = db_port_manager.get_port_by_db(target_instance)
|
||||||
else:
|
else:
|
||||||
if protocol == Protocol.sftp:
|
if protocol in [Protocol.sftp, Protocol.telnet]:
|
||||||
protocol = Protocol.ssh
|
protocol = Protocol.ssh
|
||||||
port = getattr(self, f'{protocol}_port', 0)
|
port = getattr(self, f'{protocol}_port', 0)
|
||||||
return port
|
return port
|
||||||
|
Reference in New Issue
Block a user