diff --git a/src/cli/cli.go b/src/cli/cli.go index d75fea9..dee5704 100644 --- a/src/cli/cli.go +++ b/src/cli/cli.go @@ -220,7 +220,7 @@ func relay(c *cli.Context) (err error) { continue } go func(portStr string) { - err = tcp.Run(debugString, portStr) + err = tcp.Run(debugString, portStr, c.GlobalString("ports")) if err != nil { panic(err) } diff --git a/src/croc/croc.go b/src/croc/croc.go index 61add9f..584f165 100644 --- a/src/croc/croc.go +++ b/src/croc/croc.go @@ -236,7 +236,7 @@ func (c *Client) Send(options TransferOptions) (err error) { if c.Options.Debug { debugString = "debug" } - err = tcp.Run(debugString, portStr) + err = tcp.Run(debugString, portStr, strings.Join(c.Options.RelayPorts, ",")) if err != nil { panic(err) } diff --git a/src/croc/croc_test.go b/src/croc/croc_test.go index 746904c..267a2d0 100644 --- a/src/croc/croc_test.go +++ b/src/croc/croc_test.go @@ -12,7 +12,7 @@ import ( func TestCroc(t *testing.T) { defer log.Flush() - go tcp.Run("debug", "8081") + go tcp.Run("debug", "8081", "8082,8083,8084,8085") go tcp.Run("debug", "8082") go tcp.Run("debug", "8083") go tcp.Run("debug", "8084")