pires / go-proxyproto

A Go library implementation of the PROXY protocol, versions 1 and 2.
Apache License 2.0
478 stars 107 forks source link

[Feature] Support for policy on local address #107

Closed kmala closed 2 months ago

kmala commented 6 months ago

Currently we can apply policy to verify the upstream address https://github.com/pires/go-proxyproto/blob/e5b291b295b4a6e0425a134c8b3bfa6b2e692866/protocol.go#L70-L81. There could be scenarios where there are multiple interfaces the server is listening on and we may want to enable the proxy protocol on only 1 interface. It would help to have policy support verifying the local address. I can create a PR if the feature is okay to be implemented.