citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.42k stars 2.01k forks source link

Support proxy protocol #1917

Open joelwurtz opened 1 year ago

joelwurtz commented 1 year ago

I'm wondering if you are open to support proxy protocol https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt to allow having the real ip of the client transfered to the server when using a proxy (such as nginx, it seems to be supported there : https://nginx.org/en/docs/stream/ngx_stream_proxy_module.html#proxy_protocol)

I also know there is some UDP proxy protocol done by cloudflare : https://developers.cloudflare.com/spectrum/reference/simple-proxy-protocol-header/ but it's less used and not supported by many servers, also this induce many complication (as were the socket should send back the data for udp : proxy adress / real ip address ?) so wouldn't do that

Will be glad to do a PR for that if wanted.

blattersturm commented 1 year ago

This was evaluated at some point but it seemed like a potential parsing headache.

jfastnacht commented 10 months ago

Stumbled over the same problem today. Is there any chance of this being reconsidered anytime soon?