Commit b5fee611 authored by ibuler's avatar ibuler

[Update] 修改选择网关

parent 1e10d275
......@@ -91,10 +91,10 @@ class ProxyServer:
domain = self.app.service.get_domain_detail_with_gateway(
asset.domain
)
if not domain.gateways:
if not domain.has_ssh_gateway():
return None
for i in domain.gateways:
gateway = domain.random_gateway()
gateway = domain.random_ssh_gateway()
proxy_command = [
"ssh", "-p", str(gateway.port),
"{}@{}".format(gateway.username, gateway.ip),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment