~# curl --haproxy-protocol --unix-socket /run/varnish-frontend.socket -k -v -H "X-Forwarded-Proto: https" http://127.0.0.1:80/
* Expire in 0 ms for 6 (transfer 0x55a23e318fb0)
* Trying /run/varnish-frontend.socket...
* Expire in 200 ms for 4 (transfer 0x55a23e318fb0)
* Connected to 127.0.0.1 (/run/varnish-frontend.socket) port 80 (#0)
> PROXY TCP4 /run/varnish-frontend.socket 0 0
* Send failure: Broken pipe
* Failed sending HTTP request
* Connection #0 to host 127.0.0.1 left intact
curl: (55) Send failure: Broken pipe
I expected the following
From the curl verbose output pasted above, you can see a wrongly formated PROXYv1 protocol request:
PROXY TCP4 /run/varnish-frontend.socket 0 0
From the PROXY v1 protocol spec https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt it should look like PROXY TCP4 IP IP PORT PORT or PROXY UNKNOWN. I guess that to be able to provide anything else than PROXY UNKNOWN an additional parameter should be implemented in curl to allow specifying the source IP of the connection.
I did this
I expected the following
From the curl verbose output pasted above, you can see a wrongly formated PROXYv1 protocol request:
From the PROXY v1 protocol spec https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt it should look like
PROXY TCP4 IP IP PORT PORT
orPROXY UNKNOWN
. I guess that to be able to provide anything else thanPROXY UNKNOWN
an additional parameter should be implemented in curl to allow specifying the source IP of the connection.curl/libcurl version
operating system
The text was updated successfully, but these errors were encountered: