1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-21 18:06:36 +02:00

update haproxy.cfg

This commit is contained in:
kevin 2023-11-08 08:04:18 +08:00
parent e4ca25d79f
commit 1ec6629a90
2 changed files with 17 additions and 5 deletions

View File

@ -7,14 +7,23 @@ defaults
timeout client 50000ms
timeout server 50000ms
frontend stats
mode http
bind *:8404
stats enable
stats uri /stats
stats refresh 15s
stats admin if TRUE
frontend front
bind *:1080
bind *:3128
default_backend back
backend back
balance roundrobin
server s2 127.0.0.1:1982 check
server s3 127.0.0.1:1983 check
server s4 127.0.0.1:1984 check
server s5 127.0.0.1:1985 check
# sed -i '/proxy.txt/q' haproxy.cfg && sort -u proxy.txt | awk '{printf("\tserver %03d %s check inter 30s\n", ++idx, $0)}' >> haproxy.c
fg
server 001 127.0.0.1:8081 check inter 30s
server 002 127.0.0.1:8082 check inter 30s
server 003 127.0.0.1:8083 check inter 30s

3
proxyhub/proxy.txt Normal file
View File

@ -0,0 +1,3 @@
127.0.0.1:8081
127.0.0.1:8082
127.0.0.1:8083