From 355847faa4e4dce6d8e3105ce58d57b64f7e208b Mon Sep 17 00:00:00 2001 From: ginuerzh Date: Wed, 1 Jan 2020 17:45:20 +0800 Subject: [PATCH] fix tests --- forward_test.go | 8 ++++---- ss_test.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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) }