junkurihara/rust-rpxy-l4 ? reverse-engineered prompt
Reverse engineered prompt
Build me a Rust based layer 4 reverse proxy that can listen on one port and forward both TCP and UDP traffic to different backend servers.
I want it to handle normal forwarding, simple load balancing across multiple backends, and protocol based routing so it can recognize things like HTTP, TLS, SSH, Socks5, QUIC, and WireGuard and send each one to the right place. It should also support TLS and QUIC routing by SNI and ALPN, and if possible include support for the PROXY protocol so the backend can see the real client address.
Make it read settings from a TOML config file, reload changes automatically without restarting, and write access and error logs either to files or stdout. Please include a sample config, a Docker setup, and a few example configs for common use cases. If you need to check current Rust or protocol docs while implementing it, go ahead and look them up online.
Are you gonna build this?
make sure you review the code using coderabbit