-
Notifications
You must be signed in to change notification settings - Fork 368
Add proxy protocol v2 client-side support #979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
I have hereby read the F5 CLA and agree to its terms |
For the reference, here's the linter output from a platform I've been testing on:
|
@sindhushiv, this PR introduces a new 3rd party dependency ( |
@defanator Could you please resolve conflicts? |
@jjngx sorry for slow response - I'll try to address this ASAP. |
Proposed changes
This PR introduces support for proxy protocol v2 which is available in nginx starting from versions 1.13.11 (foss) and R16 (NGINX Plus).
Primary use case is running nginx-prometheus-exporter alongside with nginx or NGINX Plus sitting behind other load balancers like AWS NLB or Google's PNLB with proxy protocol enabled. Sometimes creating dedicated listeners just for stub_status or API could be undesired, and with the proposed changes the exporter will be able to reuse existing listeners without extra effort.
Changes were tested with the following combinations of listeners:
proxy_protocol
, IPv4 withoutproxy_protocol
.proxy_protocol
, IPv6 withoutproxy_protocol
.proxy_protocol
, unix socket withoutproxy_protocol
(not that common scenario, but still supported by standard).Implementation used: https://github.com/pires/go-proxyproto
Checklist
Before creating a PR, run through this checklist and mark each as complete.