Enable PROXY procotol for proxy hosts and streams
As I see not too much progress in https://github.com/NginxProxyManager/nginx-proxy-manager/pull/3537, I decided to copy most of the code and (try to) fix the tests. In this PR I also included the code necessary to enable the PROXY protocol for Streams.
Thank you @jwklijnsma for the previous work
CI is reporting:
Integration Tests / Mysql / Hosts endpoints.Should be able to create a http host
Error Message:
data should NOT have additional properties, data should have required property 'proxy_support_enabled'
Cypress output:
[validateSwaggerSchema DEBUG] Endpoint: /nginx/proxy-hosts
[validateSwaggerSchema DEBUG] Response Schema: {
"id": 1,
"created_on": "2024-03-10T10:06:30.000Z",
"modified_on": "2024-03-10T10:06:30.000Z",
"owner_user_id": 1,
"domain_names": [
"test.example.com"
],
"forward_host": "1.1.1.1",
"forward_port": 80,
"access_list_id": 0,
"certificate_id": 0,
"ssl_forced": 0,
"caching_enabled": 0,
"block_exploits": 0,
"advanced_config": "",
"meta": {
"letsencrypt_agree": false,
"dns_challenge": false
},
"allow_websocket_upgrade": 0,
"http2_support": 0,
"forward_scheme": "http",
"enabled": 1,
"locations": [],
"hsts_enabled": 0,
"hsts_subdomains": 0,
"enable_proxy_protocol": 0,
"load_balancer_ip": "",
"certificate": null,
"owner": {
"id": 1,
"created_on": "2024-03-10T10:06:18.000Z",
"modified_on": "2024-03-10T10:06:18.000Z",
"is_deleted": 0,
"is_disabled": 0,
"email": "[email protected]",
"name": "Administrator",
"nickname": "Admin",
"avatar": "",
"roles": [
"admin"
]
},
"access_list": null,
"use_default_location": true,
"ipv6": true
}
[validateSwaggerSchema ERROR] data should NOT have additional properties, data should have required property 'proxy_support_enabled'
One question I do have: How should we show the user, that udp and proxy_protocol are exclusive options on a listener? Currently I just silently drop the proxy_protocol option for the UDP listener, but I am unsure that this is a good implementation.
I imagine that we could also disable the UDP button, when "Enable Proxy Protocol" is pressed.
Docker Image for build 6 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-3618
Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.
As I see not too much progress in #3537, I decided to copy most of the code and (try to) fix the tests. In this PR I also included the code necessary to enable the PROXY protocol for Streams.
Thank you @jwklijnsma for the previous work but thnx for it
The plan was to fix the test next week
what needs be done for mr @jc21
Any update on this?
Any latest news about proxy_protocol?
@jc21 would you be able to merge this PR when I resolve all the conflicts?
tbh, might be easier to start again from the current develop branch. I will close this PR and open a new one once I am done with the re-implementation.