Skip to content

Commit

Permalink
try 9009 port by default #178
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Nov 19, 2019
1 parent 04cad7b commit 5faacd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/croc/croc.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 5faacd3

Please sign in to comment.