Add proxy protocol support#352
Conversation
|
Fixed lint error. |
|
This is interesting |
|
Thanks for the support on this one, I got inspired and did some work over this branch @shshekhar93 supporting v2 as well |
|
What is the status of this feature and the next release? Support for proxy protocol would be very useful to me so I'm looking forward to being able to use it. |
|
I’ve published a docker image for those that want this feature using code contributed in this thread. |
|
Hi everyone, thank you for your contribution. AFAIK, the proxy protocol v2 also supports UDP. Could you add it as well ? |
|
anything that i can do to help push this along into main? looks like we're just stalled out, but the impl looks correct and i still see PRs being merged into this repo. any input from maintainers here on what would be helpful? |
I think we should resolve packaging/integration issues (e.g. #426 and #428) before adding features. Because if we add the features first we will potentially end up double handling the PRs - first at merge time and then we may have to check/test/review features after making packaging/integration changes. |
Adding support for Proxy Protocol V1.
The changes are limited to the server side, which generates and sends the Proxy Protocol header on data channel. The downstream server must be capable of parsing / handling the proxy protocol header.
Alternatively, an additional proxy protocol unwrapping server (for eg. go-mmproxy) could be setup on the client side. In this setup, rathole client's
local_addrwould point to the go-mmproxy, and go-mmproxy would in turn point to the actual downstream server.Change log:
enable_proxy_protocol) toServerServiceConfig.enable_proxy_protocolis set astrue, the proxy protocol header is written to data channel and flushed, before remainder of downstream protocol specific communication begins.Future enhancements: