star/net/nat_test.go

30 lines
498 B
Go
Raw Normal View History

2024-03-06 21:02:14 +08:00
package net
import (
"testing"
"time"
)
func TestNat(t *testing.T) {
var s = NatServer{
ListenAddr: "0.0.0.0:10020",
enableTCP: true,
2024-03-09 17:29:01 +08:00
enableUDP: true,
2024-03-06 21:02:14 +08:00
}
var c = NatClient{
2024-03-09 17:29:01 +08:00
ServiceTarget: "dns.b612.me:521",
2024-03-06 21:02:14 +08:00
CmdTarget: "127.0.0.1:10020",
enableTCP: true,
2024-03-09 17:29:01 +08:00
enableUDP: true,
2024-03-06 21:02:14 +08:00
}
go s.Run()
go c.Run()
for {
time.Sleep(time.Second * 20)
}
}
2024-03-18 10:48:49 +08:00
func TestTrace(t *testing.T) {
2024-04-28 08:37:32 +08:00
//Traceroute("b612.me", "", 32, time.Millisecond*800, "https://ip.b612.me/{ip}/detail")
2024-03-18 10:48:49 +08:00
}