try 9009 port by default #178

This commit is contained in:
Zack Scholl 2019-11-19 15:19:53 -08:00
parent 04cad7b9a5
commit 5faacd3328
1 changed files with 4 additions and 0 deletions

View File

@ -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 {