3 ms·
Show HN: Simple TCP bridge written in Go
I often reached for `socat` when I needed to forward a TCP port from my local machine for testing, and I was curious how easy it was to write such a utility in Go.
At 105 lines of Go, it was easy enough. It has limited functionality - TCP only, no port mapping, binds to all local network interfaces - but it serves its purpose, so I wanted to share this with others.
- abcdlsj 3y agoI had written a tool similar to yours, which I have since extended to a tool similar to ngrok/frp (all of which is just a wrapper for `io.Copy()`...) . The source code is here, if interested (https://github.com/abcdlsj/gnar/tree/master https://github.com/abcdlsj/gnar/tree/master)
- abcdlsj 3y agoThis is the original `socat` version: https://github.com/abcdlsj/gnar/tree/socat https://github.com/abcdlsj/gnar/tree/socat