Skip to content

Commit

Permalink
fix config generation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
leleboys committed May 8, 2024
1 parent a92a644 commit bb8900f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ docker pull datamini/asktable-secure-tunnel

2. 启动 ATST 服务:
```bash
docker run -P -e ASKTABLE_TOKEN=<asktable_token> \
docker run -d -P -e ASKTABLE_TOKEN=<asktable_token> \
[-e SECURETUNNEL_ID=<securetunnel_id>] datamini/asktable-secure-tunnel
```
说明:
Expand Down
18 changes: 9 additions & 9 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def generate_config_and_send_client_info(st_id):
proxy = {
"name": link.id,
"type": "tcp",
"local_ip": link.target_host,
"local_port": link.target_port,
"remote_port": link.proxy_port
"localIP": link.target_host,
"localPort": link.target_port,
"remotePort": link.proxy_port
}
config["proxies"].append(proxy)

Expand All @@ -63,16 +63,16 @@ def generate_config_toml(config, config_path):
[[proxies]]
name = "mysql-tcp1"
type = "tcp"
local_ip = "10.1.1.3"
local_port = 3306
remote_port = 6000
localIP = "10.1.1.3"
localPort = 3306
remotePort = 6000
[[proxies]]
name = "mysql-tcp2"
type = "tcp"
local_ip = "10.2.2.3"
local_port = 3306
remote_port = 6002
localIP = "10.2.2.3"
localPort = 3306
remotePort = 6002
"""
try:
with open(config_path, 'w') as file:
Expand Down

0 comments on commit bb8900f

Please sign in to comment.