Hello,
As discussed, could you please add support for the PROXY protocol when connecting to the proxy ?
https://github.com/haproxy/haproxy/blob/master/doc/proxy-protocol.txt
I'm interested to use that with Squid, which supports both version 1 and version 2 of the PROXY protocol, so I'll leave it up to you to find which version to implement.
Thanks !