Skip to content

Commit

Permalink
Merge branch '65-add-udp-proxy-config-to-configgenerator' into 'main'
Browse files Browse the repository at this point in the history
Resolve "add udp proxy config to ConfigGenerator"

Closes #65

See merge request dependencies/oasis!71
  • Loading branch information
penglei0 committed Sep 13, 2024
2 parents 8585099 + 3bec18a commit 19ab6eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tools/cfg_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def _generate_tcp_proxy_cfg(self, node_ips, index):
return cnt, cfg

def _generate_port_forward_item(self, to_ip):
item = f"proxies.port_forward.cnt = 1\n"
item += f"proxies.port_forward.item0.listen_port = 5201\n"
item += f"proxies.port_forward.item0.svr_addr_port = {to_ip}:5201\n"
item += f"proxies.port_forward.item0.bats_svr_addr = {to_ip}\n"
item += f"proxies.port_forward.item0.forward_protocol = tcp,udp\n"
item = f"proxies.port_forward.proxy.cnt = 1\n"
item += f"proxies.port_forward.proxy.item0.listen_port = 5201\n"
item += f"proxies.port_forward.proxy.item0.svr_addr_port = {to_ip}:5201\n"
item += f"proxies.port_forward.proxy.item0.bats_svr_addr = {to_ip}\n"
item += f"proxies.port_forward.proxy.item0.forward_protocol = tcp,udp\n"
return item

def _generate_route_item(self, index, src, dst, gw, mask="255.255.255.255", metric=1):
Expand Down

0 comments on commit 19ab6eb

Please sign in to comment.