From e651d25dbb606df815f45af88a9a1a67656c9321 Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Fri, 26 Nov 2021 14:43:43 +1100 Subject: [PATCH] remove unnecessary layer of tcp mode for stripping proxy, works just fine without it --- haproxy/haproxy.tor.cfg | 16 ++++------------ haproxy/no_captcha.map | 1 + 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/haproxy/haproxy.tor.cfg b/haproxy/haproxy.tor.cfg index 0f0d7cc..a2819a8 100644 --- a/haproxy/haproxy.tor.cfg +++ b/haproxy/haproxy.tor.cfg @@ -12,18 +12,8 @@ defaults timeout client 50000ms timeout server 50000ms -frontend tor-proxy - #this can be a unix socket to tor, too but not between separate docker containers - bind *:80 accept-proxy - mode tcp - default_backend strip-tor-proxy - -backend strip-tor-proxy - mode tcp - server forward unix@/var/run/haproxy-haproxy.sock check send-proxy - frontend http-in - bind unix@/var/run/haproxy-haproxy.sock accept-proxy + bind :80 accept-proxy #forwardfor sets the circuit identifier sent by tor daemon in haproxy PROXY protocol header as the x-forwarded-for header option forwardfor @@ -55,7 +45,9 @@ frontend http-in default_backend servers backend servers - server server1 nginx:80 + #can alternatively use a socket + #server server1 unix@/var/run/haproxy-nginx.sock check + server server1 nginx:80 check backend hcaptcha server hcaptcha hcaptcha.com:443 diff --git a/haproxy/no_captcha.map b/haproxy/no_captcha.map index 2fbb50c..250a2e6 100644 --- a/haproxy/no_captcha.map +++ b/haproxy/no_captcha.map @@ -1 +1,2 @@ localhost +ehbaiyb5cqqjgviglqcrbd3g7rj2gvc4jahiyyhupq6osz7hfrzgnzqd.onion