Add support for PROXY protocol v2 in TCP listener (#13540) (#14404)
* 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 https://github.com/hashicorp/vault/issues/9462 by adding support for `PROXY UNKNOWN` for PROXY protocol v1. Closes https://github.com/hashicorp/vault/issues/3807 * Add changelog Co-authored-by:Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Showing
+296 -21
changelog/13540.txt
0 → 100644
... | ... | @@ -27,7 +27,6 @@ require ( |
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5 | ||
github.com/apple/foundationdb/bindings/go v0.0.0-20190411004307-cd5c9d91fad2 | ||
github.com/armon/go-metrics v0.3.10 | ||
github.com/armon/go-proxyproto v0.0.0-20210323213023-7e956b284f0a | ||
github.com/armon/go-radix v1.0.0 | ||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a | ||
github.com/aws/aws-sdk-go v1.37.19 | ||
... | ... | @@ -151,6 +150,7 @@ require ( |
github.com/ory/dockertest v3.3.5+incompatible | ||
github.com/ory/dockertest/v3 v3.8.0 | ||
github.com/patrickmn/go-cache v2.1.0+incompatible | ||
github.com/pires/go-proxyproto v0.6.1 | ||
github.com/pkg/errors v0.9.1 | ||
github.com/posener/complete v1.2.3 | ||
github.com/pquerna/otp v1.2.1-0.20191009055518-468c2dd2b58d | ||
... | ... |
Please register or sign in to comment