diff --git a/main.go b/main.go index 67dbbde..aa3134d 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "net" + "os" "github.com/goburrow/netforward" "tailscale.com/tsnet" @@ -26,6 +27,11 @@ func (dialer Dialer) Dial() (net.Conn, error) { func main() { flag.Parse() + if !(host_proto != "" && hostname != "" && host_port != "" && dst_proto != "" && dst_addr != "") { + fmt.Println("Usage: tsnet-proxy PROTO HOSTNAME PORT DST-PROTO DST") + fmt.Println("Where PROTO is one of tcp, udp, unix") + os.Exit(1) + } s := &tsnet.Server{ Hostname: hostname,