You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
auto/archive/clash-multi/frpc_config.py

39 lines
778 B

import json
import toml
def load_config():
with open("config.json", "r") as f:
return json.load(f)
config = load_config()
PREFIX = "clash-multi-"
START = 1
END = config["total_container"]
START_PORT = config["start_port"]
data = {
"serverAddr": "erhe.top",
"serverPort": 17000,
"auth": {
"token": "aaaAAA111"
},
"transport": {
"tls": {
"enable": True
}
},
"proxies": []
}
for i in range(START, END + 1):
port = START_PORT + i - 1
data["proxies"].append({
"name": f"{PREFIX}{str(i).zfill(3)}",
"type": "tcp",
"localIP": "127.0.0.1",
"localPort": port,
"remotePort": port
})
with open("frpc.toml", "w") as toml_file:
toml.dump(data, toml_file)