rapiz1 / rathole

A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Apache License 2.0
8.8k stars 440 forks source link

Add proxy protocol support #352

Open shshekhar93 opened 2 months ago

shshekhar93 commented 2 months ago

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_addr would point to the go-mmproxy, and go-mmproxy would in turn point to the actual downstream server.

Change log:

Future enhancements:

shshekhar93 commented 2 months ago

Fixed lint error.

rapiz1 commented 2 months ago

This is interesting