package net import ( "testing" "time" ) func TestNat(t *testing.T) { var s = NatServer{ ListenAddr: "0.0.0.0:10020", enableTCP: true, enableUDP: true, } var c = NatClient{ ServiceTarget: "dns.b612.me:521", CmdTarget: "127.0.0.1:10020", enableTCP: true, enableUDP: true, } go s.Run() go c.Run() for { time.Sleep(time.Second * 20) } } func TestTrace(t *testing.T) { Traceroute("b612.me", "", 32, time.Millisecond*800, "https://ip.b612.me/{ip}/detail") }