3proxy
3proxy copied to clipboard
Support Haproxy's Proxy Protocol
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.
Hello, That is it possible to pass the user IP from haproxy to 3proxy?
at this time only using transparent proxying in iptables/nftables, otherwise this issue would be resolved.
@z3APA3A There is any new about this?
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.