ssh_tunnels_config_util: support ssh_port option

This commit is contained in:
Evgeny Zinoviev 2022-09-22 17:51:03 +03:00
parent 5927e3cbd1
commit 8a9f526190
2 changed files with 3 additions and 1 deletions

View File

@ -10,11 +10,13 @@ ssh_bind_base = 21000
[nas1]
ipv4 = 100
http_port = 80
ssh_port = 22
bind_slot = 0
[nas2]
ipv4 = 101
http_port = 8080
ssh_port = 22
bind_slot = 1
```

View File

@ -26,7 +26,7 @@ if __name__ == '__main__':
target_host = f'{network_prefix}.{config[tun_host]["ipv4"]}'
buf.append(f'-R 127.0.0.1:{http_bind_port}:{target_host}:{config[tun_host]["http_port"]}')
buf.append(f'-R 127.0.0.1:{ssh_bind_port}:{target_host}:22')
buf.append(f'-R 127.0.0.1:{ssh_bind_port}:{target_host}:{config[tun_host]["ssh_port"]}')
i += 1