Opened 6 years ago

Closed 5 years ago

Last modified 5 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


Would be nice if Nginx supported Proxy protocol in core:

Found some patches though:

Change History (12)

comment:2 Changed 6 years ago by

+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 Changed 6 years ago by

+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 Changed 6 years ago by tgabi333@…

+1 for this. There is already a solution:

It would be so great to merge that patch.

comment:5 Changed 6 years ago by mdounin

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

comment:6 Changed 6 years ago by

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 Changed 6 years ago by

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

comment:8 Changed 6 years ago by

+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 Changed 5 years ago by martin.schuerrer@…

+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 Changed 5 years ago by Roman Arutyunyan <arut@…>

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 Changed 5 years ago by arut

  • Resolution set to fixed
  • Status changed from new to closed

Committed, thanks.

comment:12 Changed 5 years ago by mackeyn@…

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

Note: See TracTickets for help on using tickets.