Add support for PROXY protocol v2 in TCP listener#13540
Merged
hghaf099 merged 3 commits intohashicorp:mainfrom Mar 8, 2022
Merged
Add support for PROXY protocol v2 in TCP listener#13540hghaf099 merged 3 commits intohashicorp:mainfrom
hghaf099 merged 3 commits intohashicorp:mainfrom
Conversation
I did not find tests for this so I added one trying to cover different configurations to make sure I did not break something. As far as I know, the behavior should be exactly the same as before except for one thing when proxy_protocol_behavior is set to "deny_unauthorized", unauthorized requests were previously silently reject because of https://github.com/armon/go-proxyproto/blob/7e956b284f0a/protocol.go#L81-L84 but it will now be logged. Also fixes hashicorp#9462 by adding support for `PROXY UNKNOWN` for PROXY protocol v1. Closes hashicorp#3807
Contributor
|
Hi @remilapeyre - please don't forget a changelog entry. :) |
Contributor
|
@remilapeyre Thank you for submitting this PR. We would like to review and possibly merge it. Would you please rebase with main and resolve the conflicts? |
Contributor
|
Hi @remilapeyre - we're super excited to get this reviewed, so could you take a look at the merge conflicts and we can move forward? Thanks! :) |
Author
Hi @hsimon-hashicorp, all should be good now :) |
hghaf099
approved these changes
Mar 8, 2022
hghaf099
pushed a commit
that referenced
this pull request
Mar 8, 2022
* Add support for PROXY protocol v2 in TCP listener I did not find tests for this so I added one trying to cover different configurations to make sure I did not break something. As far as I know, the behavior should be exactly the same as before except for one thing when proxy_protocol_behavior is set to "deny_unauthorized", unauthorized requests were previously silently reject because of https://github.com/armon/go-proxyproto/blob/7e956b284f0a/protocol.go#L81-L84 but it will now be logged. Also fixes #9462 by adding support for `PROXY UNKNOWN` for PROXY protocol v1. Closes #3807 * Add changelog
hghaf099
added a commit
that referenced
this pull request
Mar 9, 2022
* Add support for PROXY protocol v2 in TCP listener I did not find tests for this so I added one trying to cover different configurations to make sure I did not break something. As far as I know, the behavior should be exactly the same as before except for one thing when proxy_protocol_behavior is set to "deny_unauthorized", unauthorized requests were previously silently reject because of https://github.com/armon/go-proxyproto/blob/7e956b284f0a/protocol.go#L81-L84 but it will now be logged. Also fixes #9462 by adding support for `PROXY UNKNOWN` for PROXY protocol v1. Closes #3807 * Add changelog Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
6 tasks
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.
I did not find tests for this so I added one trying to cover different
configurations to make sure I did not break something. As far as I know,
the behavior should be exactly the same as before except for one thing
when proxy_protocol_behavior is set to "deny_unauthorized", unauthorized
requests were previously silently reject because of https://github.com/armon/go-proxyproto/blob/7e956b284f0a/protocol.go#L81-L84
but it will now be logged.
Also fixes #9462 by adding
support for
PROXY UNKNOWNfor PROXY protocol v1.Closes #3807