pires / go-proxyproto

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

RemoteAddr from upstream #24

Closed navossoc closed 4 years ago

navossoc commented 4 years ago

Is it possible to get the upstream remote address?

https://github.com/pires/go-proxyproto/blob/7e550d33f6da67842d921e49cbba0f5648a72cce/protocol.go#L141

As far I can tell reading the docs and the code, if the PROXY PROTOCOL is enabled we can't get the upstream IP anymore.

Is that right?

pires commented 4 years ago

Correct.

navossoc commented 4 years ago

Any chance of this getting exposed or do I need to make my own changes?

Thanks.

pires commented 4 years ago

I suggest you go with your own changes and open a PR if you'd like so that I can take a look.