sudo-gera/reverse_tcp_forwarding — reverse-engineered prompt

Reverse engineered prompt

Build me a small C plus plus project for reverse TCP forwarding.

I want something that lets a computer stuck behind NAT or a firewall open an outgoing connection to a public server, then use that connection so traffic hitting the public server gets forwarded back to a local TCP service on the private machine. Think simple use cases like exposing a local web app or SSH port without opening inbound ports on the home machine.

Please make it feel complete enough to actually try, with a server side mode and a client side mode, sensible command line arguments, basic logging, and clear error messages. It should be easy to build from the command line, and if it makes sense, also runnable in Docker since there is already container related setup here. Add a short README that explains what it does, how to build it, and a couple of example commands for both ends.

Keep it simple and practical, and look up current docs online if you need to.

Want more depth? Deep Reverse