From 31fcc0b3a318ee6fec4bbdbbf129e1eab7cfec76 Mon Sep 17 00:00:00 2001 From: injoyai <1113655791@qq.com> Date: Tue, 18 Mar 2025 16:43:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dial.go | 8 ++++++++ 1 file changed, 8 insertions(+) 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