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
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.