diff --git a/testing/scenarios/dokodemo_test.go b/testing/scenarios/dokodemo_test.go index 4febc5976a0..4a1cafcc789 100644 --- a/testing/scenarios/dokodemo_test.go +++ b/testing/scenarios/dokodemo_test.go @@ -157,7 +157,7 @@ func TestDokodemoUDP(t *testing.T) { }, } - clientPort := uint32(tcp.PickPort()) + clientPort := uint32(udp.PickPort()) clientPortRange := uint32(5) clientConfig := &core.Config{ Inbound: []*core.InboundHandlerConfig{ diff --git a/testing/scenarios/feature_test.go b/testing/scenarios/feature_test.go index e25ff8e96c9..d7a18739a08 100644 --- a/testing/scenarios/feature_test.go +++ b/testing/scenarios/feature_test.go @@ -513,7 +513,7 @@ func TestUDPConnection(t *testing.T) { common.Must(err) defer udpServer.Close() - clientPort := tcp.PickPort() + clientPort := udp.PickPort() clientConfig := &core.Config{ Inbound: []*core.InboundHandlerConfig{ { diff --git a/testing/scenarios/shadowsocks_test.go b/testing/scenarios/shadowsocks_test.go index 5d6b0fc441c..acee366077c 100644 --- a/testing/scenarios/shadowsocks_test.go +++ b/testing/scenarios/shadowsocks_test.go @@ -216,7 +216,7 @@ func TestShadowsocksAES128GCMUDP(t *testing.T) { CipherType: shadowsocks.CipherType_AES_128_GCM, }) - serverPort := tcp.PickPort() + serverPort := udp.PickPort() serverConfig := &core.Config{ App: []*anypb.Any{ serial.ToTypedMessage(&log.Config{ @@ -246,7 +246,7 @@ func TestShadowsocksAES128GCMUDP(t *testing.T) { }, } - clientPort := tcp.PickPort() + clientPort := udp.PickPort() clientConfig := &core.Config{ App: []*anypb.Any{ serial.ToTypedMessage(&log.Config{ @@ -342,7 +342,7 @@ func TestShadowsocksAES128GCMUDPMux(t *testing.T) { }, } - clientPort := tcp.PickPort() + clientPort := udp.PickPort() clientConfig := &core.Config{ App: []*anypb.Any{ serial.ToTypedMessage(&log.Config{ diff --git a/testing/scenarios/transport_test.go b/testing/scenarios/transport_test.go index 9e31a732fef..837b2d58a62 100644 --- a/testing/scenarios/transport_test.go +++ b/testing/scenarios/transport_test.go @@ -24,6 +24,7 @@ import ( "github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound" "github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound" "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" "github.com/v2fly/v2ray-core/v4/transport/internet" "github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket" "github.com/v2fly/v2ray-core/v4/transport/internet/headers/http" @@ -258,7 +259,7 @@ func TestVMessQuic(t *testing.T) { defer tcpServer.Close() userID := protocol.NewID(uuid.New()) - serverPort := tcp.PickPort() + serverPort := udp.PickPort() serverConfig := &core.Config{ App: []*anypb.Any{ serial.ToTypedMessage(&log.Config{ diff --git a/testing/scenarios/vmess_test.go b/testing/scenarios/vmess_test.go index dff40316383..822de9a946d 100644 --- a/testing/scenarios/vmess_test.go +++ b/testing/scenarios/vmess_test.go @@ -404,7 +404,7 @@ func TestVMessGCMUDP(t *testing.T) { }, } - clientPort := tcp.PickPort() + clientPort := udp.PickPort() clientConfig := &core.Config{ App: []*anypb.Any{ serial.ToTypedMessage(&log.Config{