3proxy icon indicating copy to clipboard operation
3proxy copied to clipboard

Support Haproxy's Proxy Protocol

Open nutinshell opened this issue 8 years ago • 4 comments

Using haproxy for load balance with multi 3proxy instances, the client's real IP should be able to pass to 3proxy, so could do do some thing better.

nutinshell avatar Oct 18 '15 09:10 nutinshell

Hello, That is it possible to pass the user IP from haproxy to 3proxy?

Al-Bsharat avatar Jun 14 '21 18:06 Al-Bsharat

at this time only using transparent proxying in iptables/nftables, otherwise this issue would be resolved.

Nothing4You avatar Jun 14 '21 19:06 Nothing4You

@z3APA3A There is any new about this?

Al-Bsharat avatar Dec 04 '21 23:12 Al-Bsharat

I was able to address this by using another tool, which makes apps (like 3proxy) that don't understand PROXY protocol, receive original client IP by spoofing it. The tool is https://github.com/cloudflare/mmproxy or Ubuntu's https://github.com/path-network/go-mmproxy , so the schema as follows:

Proxy_client>Haproxy>Mmproxy>3proxy>Web.

  • Proxy endpoint is http://srv1:8080 and https://srv1:8443
  • Haproxy listens on srv1:8080 (TCP) and srv1:8443 (TLS)
  • .. that forwards to mmproxy on srv2:8080, using PROXY protocol
  • .. that forwards to 3proxy on localhost:8081

So 3proxy finally receives orig client IP.

ezbik avatar May 22 '22 15:05 ezbik