1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/proxyhub/haproxy.cfg
2023-11-08 08:04:32 +08:00

30 lines
709 B
INI

global
maxconn 4000
defaults
mode tcp
timeout connect 5000ms
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 *:3128
default_backend back
backend back
balance roundrobin
# 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