diff --git a/forward_test.go b/forward_test.go index f8653de..2f9ab51 100644 --- a/forward_test.go +++ b/forward_test.go @@ -128,7 +128,7 @@ func BenchmarkTCPDirectForwardParallel(b *testing.B) { } func udpDirectForwardRoundtrip(t *testing.T, host string, data []byte) error { - ln, err := UDPDirectForwardListener("localhost:0", 0) + ln, err := UDPDirectForwardListener("localhost:0", nil) if err != nil { return err } @@ -172,7 +172,7 @@ func BenchmarkUDPDirectForward(b *testing.B) { sendData := make([]byte, 128) rand.Read(sendData) - ln, err := UDPDirectForwardListener("localhost:0", 0) + ln, err := UDPDirectForwardListener("localhost:0", nil) if err != nil { b.Error(err) } @@ -207,7 +207,7 @@ func BenchmarkUDPDirectForwardParallel(b *testing.B) { sendData := make([]byte, 128) rand.Read(sendData) - ln, err := UDPDirectForwardListener("localhost:0", 0) + ln, err := UDPDirectForwardListener("localhost:0", nil) if err != nil { b.Error(err) } @@ -279,7 +279,7 @@ func TestTCPRemoteForward(t *testing.T) { } func udpRemoteForwardRoundtrip(t *testing.T, host string, data []byte) error { - ln, err := UDPRemoteForwardListener("localhost:0", nil, 0) + ln, err := UDPRemoteForwardListener("localhost:0", nil, nil) if err != nil { return err } diff --git a/ss_test.go b/ss_test.go index ff91273..0fd6635 100644 --- a/ss_test.go +++ b/ss_test.go @@ -302,7 +302,7 @@ func BenchmarkSSProxyParallel(b *testing.B) { func shadowUDPRoundtrip(t *testing.T, host string, data []byte, clientInfo *url.Userinfo, serverInfo *url.Userinfo) error { - ln, err := ShadowUDPListener("localhost:0", serverInfo, 0) + ln, err := ShadowUDPListener("localhost:0", serverInfo, nil) if err != nil { return err } @@ -361,7 +361,7 @@ func BenchmarkShadowUDP(b *testing.B) { sendData := make([]byte, 128) rand.Read(sendData) - ln, err := ShadowUDPListener("localhost:0", url.UserPassword("chacha20-ietf", "123456"), 0) + ln, err := ShadowUDPListener("localhost:0", url.UserPassword("chacha20-ietf", "123456"), nil) if err != nil { b.Error(err) }