diff --git a/dial.go b/dial.go index cbb53df..02ec6b3 100644 --- a/dial.go +++ b/dial.go @@ -3,6 +3,7 @@ package tdx import ( "context" "github.com/injoyai/ios" + "github.com/injoyai/ios/module/tcp" "github.com/injoyai/logs" "math/rand" "net" @@ -10,6 +11,13 @@ import ( "time" ) +func NewTCPDial(addr string) ios.DialFunc { + if !strings.Contains(addr, ":") { + addr += ":7709" + } + return tcp.NewDial(addr) +} + func NewHostDial(hosts []string) ios.DialFunc { if len(hosts) == 0 { hosts = Hosts