Files
lt_quick_script/proxy_line/shell_start_s5.py
T
2025-11-14 23:38:58 +08:00

30 lines
795 B
Python

import ipaddress
def generate_commands(start_port, start_subnet, start_ip, count):
ip = ipaddress.ip_address(start_ip)
commands = []
for i in range(count):
port = start_port + i
subnet_num = 65 + i # 从 10.65.0.0/16 开始
subnet = f"10.{subnet_num}.0.0/16"
gateway = f"10.{subnet_num}.0.1"
use_ip = str(ip + i)
cmd = (f"nohup ./s5_multi_1.0.1 -listen \"{port}={use_ip}\" "
f"-report=true "
f"> /root/socket5_1.0.1/{port}.log 2>&1 &")
commands.append(cmd)
return commands
if __name__ == "__main__":
# 参数配置
START_PORT = 25715
START_IP = "45.86.235.163"
COUNT = 20
cmds = generate_commands(START_PORT, 65, START_IP, COUNT)
for c in cmds:
print(c)