[反向代理]实验性添加TOA支持

This commit is contained in:
GoEdgeLab
2020-12-03 10:16:45 +08:00
parent abc503def2
commit 19e5ab85f1
2 changed files with 44 additions and 1 deletions

View File

@@ -27,6 +27,26 @@ func TestTOAConfig_RandLocalPort(t *testing.T) {
}
}
func TestTOAConfig_AsArgs(t *testing.T) {
toa := &TOAConfig{
IsOn: false,
Debug: true,
OptionType: 0xfe,
MinQueueId: 10,
MaxQueueId: 20,
AutoSetup: true,
MinLocalPort: 0,
MaxLocalPort: 0,
SockPath: "",
ByPassPorts: nil,
}
err := toa.Init()
if err != nil {
t.Fatal(err)
}
t.Log(toa.AsArgs())
}
func BenchmarkTOAConfig_RandLocalPort(b *testing.B) {
runtime.GOMAXPROCS(1)