intranet support udp

This commit is contained in:
TenderIronh
2025-11-18 17:07:24 +08:00
parent a4c6668760
commit 471aa5e6ea
6 changed files with 229 additions and 136 deletions
+21
View File
@@ -0,0 +1,21 @@
package openp2p
import (
"os"
"path/filepath"
"testing"
)
func TestDialTCP(t *testing.T) {
baseDir := filepath.Dir(os.Args[0])
os.Chdir(baseDir) // for system service
gLog = NewLogger(baseDir, ProductName, LvDEBUG, 1024*1024, LogFile|LogConsole)
// ul, err := dialTCP("[240e:3b1:6f6:d14:1c0b:9605:554d:351c]", 3389, 0, LinkModeTCP6)
// if err != nil || ul == nil {
// t.Error("dialTCP error:", err)
// }
ul, err := dialTCP("192.168.3.9", 3389, 0, LinkModeTCP6)
if err != nil || ul == nil {
t.Error("dialTCP error:", err)
}
}