Proxy Protocol Support

Maxim Dounin mdounin at
Tue Jul 19 12:46:44 UTC 2016


On Mon, Jul 18, 2016 at 07:58:13PM +0000, Michael Irwin wrote:

> I saw with 1.11.0 that support was added to support a variable named
> proxy_protocol_port.  Looking at the documentation, I see it makes the
> client port (from the protocol) available.  But, it looks like the proxy
> port is not being made available.
> I was working on a patch to submit, but figured I'd seek some input first,
> as I'm concerned that there will be some naming confusion.
>  proxy_protocol_port = client port (what it is now) and
> proxy_protocol_proxy_port is the new proxy port?  If I could start over,
> I'd say _port is the proxy port and _client_port is the client port, but
> that's a breaking change.  Still go with _proxy_port to differentiate the
> two?
> (ps... if anyone else wants to do the quick patch, I'm happy to pass it off
> too ;) )
> Thoughts?

PROXY protocol contains source and destination addresses and 
ports.  Neither destination address nor destination port are 
provided in nginx variables.

If you want to add some, consider using 
$proxy_protocol_server_addr and $proxy_protocol_server_port, to be 
in line with $server_addr and $server_port variables.

Maxim Dounin

More information about the nginx-devel mailing list