You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
star/net/nat_test.go

30 lines
496 B
Go

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")
}