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.
24 lines
334 B
Go
24 lines
334 B
Go
8 months ago
|
package net
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func TestNat(t *testing.T) {
|
||
|
var s = NatServer{
|
||
|
ListenAddr: "0.0.0.0:10020",
|
||
|
enableTCP: true,
|
||
|
}
|
||
|
var c = NatClient{
|
||
|
ServiceTarget: "139.199.163.65:80",
|
||
|
CmdTarget: "127.0.0.1:10020",
|
||
|
enableTCP: true,
|
||
|
}
|
||
|
go s.Run()
|
||
|
go c.Run()
|
||
|
for {
|
||
|
time.Sleep(time.Second * 20)
|
||
|
}
|
||
|
}
|