(2.12) Add opt-in support for the PROXY protocol#7456
Merged
neilalexander merged 2 commits intomainfrom Nov 11, 2025
Merged
Conversation
35ffb4a to
f1760c6
Compare
3611fff to
8e1c8d9
Compare
server/client_proxyproto_test.go
Outdated
| opts.Port = -1 // Random port | ||
| opts.ProxyProtocol = true | ||
| opts.Port = -1 | ||
| opts.ProxiedPort = -1 |
Member
There was a problem hiding this comment.
Not a fan of this approach IMO. But I understand why we ended up here.
If we say proxy has to be TLS first enabled, would that resolve?
8e1c8d9 to
3864b90
Compare
kozlovic
requested changes
Nov 10, 2025
99a0d7f to
53f3d43
Compare
0b9a8ad to
fdd0d7e
Compare
kozlovic
requested changes
Nov 11, 2025
Member
kozlovic
left a comment
There was a problem hiding this comment.
Just a little update needed since we don't have to strip the CRLF anymore, and a comment about the v2 header that at least could be consumed as a 10 bytes (since it is 16 but we read the first 6 bytes) instead of reading 6+4. But ok if leaving the way it is.
Signed-off-by: Byron Ruth <byron@nats.io>
Signed-off-by: Neil Twigg <neil@nats.io>
fdd0d7e to
db6d661
Compare
neilalexander
added a commit
that referenced
this pull request
Nov 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The use case is to allow for transparent mapping of the source IP to the server for monitoring, auth callout, etc. See https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
Note, this was largely Claude generated since the spec is well defined.
Signed-off-by: Byron Ruth byron@nats.io