#Port forwarding with Go
9 messages · Page 1 of 1 (latest)
- https://go.dev/doc/install
- Open terminal in source code directory
CGO_ENABLED=0 go build -ldflags "-X main.version=`git describe --tags` -X main.buildTime=`date +%FT%T%z`" -o portfwd- https://github.com/gaetanlhf/portfwd?tab=readme-ov-file#run
I doubt the compile-time vars are needed so they can probably be stripped if you don't have git
-ldflags "-X main.version=`git describe --tags` -X main.buildTime=`date +%FT%T%z`"
you don't need all these flags indeed
just go run github.com/gaetanlhf/portfwd@main if you trust the author
or replace run by install if you're going to actually use it/keep it
If you are looking for port forwarding you can aswell establish private network between peers or use for example ngrok if u want to forward it to public internet
look into tailscale maybe, it’s written in go and great
or zerotier