Hi Dave,

I don't see the "send-proxy" directive in your config, have you tried it :
https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.2-send-proxy

Sorry if I'm misunderstanding something already...

Aaron West

Loadbalancer.org Limited
+44 (0)330 380 1064
www.loadbalancer.org

On 23 March 2017 at 12:38, Dave J <mr_wad...@hotmail.com> wrote:

> I've probably got lost in the masses of documentation on this subject, but
> I'm trying to configure my HAProxy process to send the PROXY protocol
> header as described at http://www.haproxy.org/download/1.8/doc/proxy-
> protocol.txt. This is because I am having to write support for the PROXY
> protocol into a C++ server (in order for it to have access to the client
> IP/port) and I want to test my code is working properly with the parsing of
> the PROXY header.
>
> Here is my minimal config file:
>
> -----------------------
>
> global
>    maxconn 4096
>
> defaults
>    log   global
>    mode   http
>    retries   3
>    option redispatch
>    maxconn   2000
>    timeout connect 5000
>    timeout client  50000
>    timeout server  50000
>
> frontend TestServerTest
>     bind 10.6.186.24:54781
>     mode tcp
>     default_backend TestServernodes
>
> backend TestServernodes
>     mode tcp
>     # Note there is no 'check' after the below line unlike the others as
> we don't want to send the
>     # healthcheck ("OPTIONS / HTTP/1.0"...) string to the TestServer as it
> doesn't understand it!
>     server TestServer01 10.6.186.24:48080
>
> -----------------------
>
> What I am finding is that when I start HAProxy and connect to 54781, the
> first data that TestServer at 48080 receives is the data which is sent from
> my client; it is not the PROXY header described at the link I posted.
>
> Can someone please tell me what I am missing in my configuration that is
> preventing the PROXY header being sent to my backend server?
>
> Thanks in advance.
>
> Dave J
>
>
>

Reply via email to