mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-26 20:26:36 +08:00
[反向代理]实验性添加TOA支持
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user