Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#355 closed enhancement (fixed)

Proxy protocol support

Reported by: Taavi Kald Owned by:
Priority: minor Milestone: 1.5
Component: nginx-core Version: 1.3.x
Keywords: proxy protocol Cc:
uname -a:
nginx -V: nginx version: nginx/1.2.7

Description

Would be nice if Nginx supported Proxy protocol in core: http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt

Found some patches though:
https://wiki.bedis.eu/nginx/nginx_proxy_protocol_patch

Change History (12)

comment:2 by Holger Amann, 11 years ago

+1 We're losing the client's ip if we put haproxy in front of nginx with SSL termination _and_ SPDY support, for that haproxy has to act in TCP mode and can't add an X-Forwarded-For header.

comment:3 by Kurt Ericson, 11 years ago

+1 similar use case: using aws elb -> nginx on instances which proxy back to various services; used the suggested patch and got mixed results (seems unstable)

comment:4 by Gábor Tóth, 11 years ago

+1 for this. There is already a solution: https://wiki.bedis.eu/nginx/nginx_proxy_protocol_patch

It would be so great to merge that patch.

comment:5 by Maxim Dounin, 11 years ago

The patch in question needs to be greatly improved before it can be merged.

comment:6 by Nate Mackey, 11 years ago

Is anyone working on getting this integrated? I'd be happy to help. Please let me know what needs to be improved in order to get it merged.

comment:7 by James Lin, 11 years ago

+1 for this feature, pretty please, ASAP please.

comment:8 by launchpad.net/~chris-lea, 11 years ago

+1 for this feature from me as well. It would be incredibly useful for websocket applications running behind an Amazon ELB, or instances where you need to use an ELB but want SPDY support with your application.

comment:9 by Martin Schuerrer, 11 years ago

+1 from me too.

Nate, I'm not familiar enough with C and nginx to help, but the proxy patch does work but generates _a lot_ of warnings though it works well. Maybe a good first step would be to look into them?

comment:10 by Roman Arutyunyan <arut@…>, 11 years ago

In 3a72b1805c52c84a5567dcfa4562f44722bede40/nginx:

Added server-side support for PROXY protocol v1 (ticket #355).

Client address specified in the PROXY protocol header is now
saved in the $proxy_protocol_addr variable and can be used in
the realip module.

This is currently not implemented for mail.

comment:11 by Roman Arutyunyan, 11 years ago

Resolution: fixed
Status: newclosed

Committed, thanks.

comment:12 by Nate, 11 years ago

Awesome! I was just about to dive into working on this. Good timing!

Note: See TracTickets for help on using tickets.