From 1ec6629a90765f193aa7f2c27238ca9c8c89d7f5 Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 8 Nov 2023 08:04:18 +0800 Subject: [PATCH] update haproxy.cfg --- proxyhub/haproxy.cfg | 19 ++++++++++++++----- proxyhub/proxy.txt | 3 +++ 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 proxyhub/proxy.txt diff --git a/proxyhub/haproxy.cfg b/proxyhub/haproxy.cfg index b3da61c..334339a 100644 --- a/proxyhub/haproxy.cfg +++ b/proxyhub/haproxy.cfg @@ -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 diff --git a/proxyhub/proxy.txt b/proxyhub/proxy.txt new file mode 100644 index 0000000..7130458 --- /dev/null +++ b/proxyhub/proxy.txt @@ -0,0 +1,3 @@ +127.0.0.1:8081 +127.0.0.1:8082 +127.0.0.1:8083