proxy_protocol_port variable should store the PROXY_PORT rather than CLIENT_PORT

Janusz M janusz.m at
Sat May 13 21:35:24 UTC 2017

The problem with reading the correct port seems to be with nginx at
src/core/ngx_proxy_protocol.c somewhere between lines 70 and 120 , It just
reads the PROXY line, takes the first IP as the client IP and then skips to
ports and takes the first port. Instead it should skip the first one and
take the last according to Proxy Protocol specs.

See example mentioned before: PROXY TCP4 56324 443
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list