Simple TCP forwarding utility, written in Go.
tcp-bridge: [-h|--help] HOST PORTS...
Forwards all TCP connections to HOST, from a list of PORTS.
Arguments:
HOST destination host (e.g. "example.com", "192.168.1.42")
PORTS space-delimited list of ports to be forwarded (e.g. "8080")
-
tcp-bridge 192.168.1.150 8080 8081 8082
- forwards all local connections from ports8080
,8081
and8082
to to remote host192.168.1.150
-
tcp-bridge example.com 80 443
- forwards all local connections from ports80
and443
to remote hostexample.com
Prerequisites:
The simplest way to run tcp-bridge
is using go run
, e.g.:
go run github.com/paskozdilar/tcp-bridge@latest 192.168.1.150 8080 8081 8082
If you've set up GOPATH, you can install the binary locally:
go install github.com/paskozdilar/tcp-bridge@latest
To compile tcp-bridge from source:
git clone https://github.com/paskozdilar/tcp-bridge.git
cd tcp-bridge
go build