Go to file
2018-12-18 02:53:09 +08:00
.gitignore v1.0.0 2018-12-17 02:58:52 +08:00
actives.yaml 添加济南 2018-12-17 15:12:40 +08:00
alertover.go v1.0.0 2018-12-17 02:58:52 +08:00
area.json 添加City Code 2018-12-17 10:25:09 +08:00
dip.go set serverkeepalives is false 2018-12-18 02:53:09 +08:00
main.go v1.0.0 2018-12-17 02:58:52 +08:00
readme.md 添加说明 2018-12-17 10:48:26 +08:00
start.sh add start script 2018-12-17 03:00:31 +08:00
switch_test.go v1.0.0 2018-12-17 02:58:52 +08:00
switch.go set serverkeepalives is false 2018-12-18 02:53:09 +08:00

说明:

根据actives.yaml配置, 添加adsl拨号的主机. eg:
switch:
  192.168.6.100:8080: 
    group: ["10.10.10.70", "10.10.10.71"] # 苏州
    city: "3205"
  192.168.6.100:8082:
    group: ["10.10.10.74", "10.10.10.75"] # 天津
    city: "12"
  192.168.6.100:8083: 
    group: ["10.10.10.76", "10.10.10.77"] # 滨州
    city: "3716"
restart: 50
192.168.6.100:8080 为代理的ip地址
group: 内为adsl主机的vpn节点ip
city: 为城市代码
restart: 为切换时间


http:/{ipcenter_host}/ippool/switch/actives 可以获取当前可用ip地址的json信息. eg:

{"192.168.6.100:8080":{"city":"3205","group":["10.10.10.70","10.10.10.71"]},"192.168.6.100:8082":{"city":"12","group":["10.10.10.74","10.10.10.75"]},"192.168.6.100:8083":{"city":"3716","group":["10.10.10.76","10.10.10.77"]},"192.168.6.100:8085":{"city":"5328","group":["10.10.10.80","10.10.10.81"]},"192.168.6.100:8087":{"city":"1506","group":["10.10.10.84","10.10.10.85"]},"192.168.6.100:8088":{"city":"4601","group":["10.10.10.86","10.10.10.87"]},"192.168.6.100:8091":{"city":"4602","group":["10.10.10.93","10.10.10.92"]}}

启动例子:

git clone http:... 
go build
sh start.sh