From 5faacd3328a88c264f92777ec66a55f499b70354 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Tue, 19 Nov 2019 15:19:53 -0800 Subject: [PATCH] try 9009 port by default #178 --- src/croc/croc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/croc/croc.go b/src/croc/croc.go index b66ed49..5348774 100644 --- a/src/croc/croc.go +++ b/src/croc/croc.go @@ -333,6 +333,10 @@ func (c *Client) Send(options TransferOptions) (err error) { go func() { log.Debugf("establishing connection to %s", c.Options.RelayAddress) var banner string + if !strings.Contains(c.Options.RelayAddress, ":") { + // try the default port, 9009 + c.Options.RelayAddress += ":9009" + } conn, banner, ipaddr, err := tcp.ConnectToTCPServer(c.Options.RelayAddress, c.Options.RelayPassword, c.Options.SharedSecret, 5*time.Second) log.Debugf("banner: %s", banner) if err != nil {