nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Add support for proxy_protocol in proxy_hosts and streams

Open snordmann opened this issue 1 year ago • 8 comments

Closes #1114 Related To #1882 Related To #3537 Related To #3618

snordmann avatar Oct 23 '24 20:10 snordmann

Docker Image for build 4 is available on DockerHub as nginxproxymanager/nginx-proxy-manager-dev:pr-4105

Note: ensure you backup your NPM instance before testing this image! Especially if there are database changes Note: this is a different docker image namespace than the official image

@jc21 What does the requires-verification label mean? Is it that somebody should test this version manually by setting their tag to nginxproxymanager/nginx-proxy-manager-dev:pr-4105?

If so I am currently running this image an tested a few of the functions (both streams and proxy hosts work with and without the proxy procotol. Editing existing proxy_host and streams works (something that does need automated tests, because I only noticed my incomplete implementation when testing manually, not in the cypress tests/CI - but that is for another time).

Anyway, you probably shouldn't rely on my word alone, so maybe somebody else could verify my changes :)

snordmann avatar Oct 30 '24 20:10 snordmann

You're correct, in the absence of automated tests I do ask the community to verify changes, and I don't expect anyone to write those tests.

Also I need to manually test things myself and it's hard to find enough time to go through all of the PR's but over Xmas I intend to.

jc21 avatar Dec 16 '24 22:12 jc21

Hi @snordmann

Gave it a try pulled the image nginxproxymanager/nginx-proxy-manager-dev:pr-4105

First thing is that i cannot update existing settings. I'm getting the following js popup

Screenshot from 2025-01-14 19-25-00

Also if created from scratch with proxy_protocol, its always offline image

Otherwise saw no regression in terms of other functions.

Coolicky avatar Jan 14 '25 20:01 Coolicky

I've been using the nginxproxymanager/nginx-proxy-manager-dev:pr-4105 image successfully for several months without any issues. I have both hosts using with and without Proxy Protocol enabled. I'm hoping this PR can be merged soon so I can benefit from other changes being added to the main release. Let me know if there's any information that I can provide that will help with verification.

sansbyte avatar Feb 08 '25 17:02 sansbyte

Hi, I am very interested in this PR! I have setup a second NPM instance using the PR and it works! My setup is:

Internet <-> Gateway (proxy using streams) <-> Home-Server using NPM

Testing with a small whoami service, I can now see the external IP on my server, whereas before it showed me the IP of the gateway. One thing I haven't quite figured out yet:

While at home, I have a DNS redirect so that any request from a device in my LAN goes directly to the home-server, without taking the route through the gateway.

Without internal redirect: PC <-> Internet <-> Gateway <-> Home-Server With internal redirect: PC <-> Home-Server

Unfortunately, the services configured in NPM to accept the proxy protocol now won't load at all, because I don't go through a proxy which uses the protocol.

Can NPM accept proxied and un-proxied traffic at the same time? Or do I have to configure a second host for every service such that it can be also reached internally?

One workaround idea I have: setup another internal gateway which also uses the proxy protocol. But that does seems a bit over the top.

Xmoe avatar Mar 13 '25 13:03 Xmoe

I'd really like to use this feature. Is the only option at the moment to use the Docker image from October? How do we go about getting this merged or another image made based on this PR and the other changes to develop?

beatles1 avatar Jun 05 '25 14:06 beatles1

come on guys... please! this feature is a must!

DeusOpForge avatar Nov 10 '25 13:11 DeusOpForge