mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 10:01:28 +00:00
Fix some tests to use udp.PickPort() (#739)
This commit is contained in:
parent
3b31189f13
commit
ed39fc3b79
|
@ -156,7 +156,7 @@ func TestDokodemoUDP(t *testing.T) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
clientPort := uint32(tcp.PickPort())
|
clientPort := uint32(udp.PickPort())
|
||||||
clientPortRange := uint32(5)
|
clientPortRange := uint32(5)
|
||||||
clientConfig := &core.Config{
|
clientConfig := &core.Config{
|
||||||
Inbound: []*core.InboundHandlerConfig{
|
Inbound: []*core.InboundHandlerConfig{
|
||||||
|
|
|
@ -512,7 +512,7 @@ func TestUDPConnection(t *testing.T) {
|
||||||
common.Must(err)
|
common.Must(err)
|
||||||
defer udpServer.Close()
|
defer udpServer.Close()
|
||||||
|
|
||||||
clientPort := tcp.PickPort()
|
clientPort := udp.PickPort()
|
||||||
clientConfig := &core.Config{
|
clientConfig := &core.Config{
|
||||||
Inbound: []*core.InboundHandlerConfig{
|
Inbound: []*core.InboundHandlerConfig{
|
||||||
{
|
{
|
||||||
|
|
|
@ -215,7 +215,7 @@ func TestShadowsocksAES128GCMUDP(t *testing.T) {
|
||||||
CipherType: shadowsocks.CipherType_AES_128_GCM,
|
CipherType: shadowsocks.CipherType_AES_128_GCM,
|
||||||
})
|
})
|
||||||
|
|
||||||
serverPort := tcp.PickPort()
|
serverPort := udp.PickPort()
|
||||||
serverConfig := &core.Config{
|
serverConfig := &core.Config{
|
||||||
App: []*serial.TypedMessage{
|
App: []*serial.TypedMessage{
|
||||||
serial.ToTypedMessage(&log.Config{
|
serial.ToTypedMessage(&log.Config{
|
||||||
|
@ -245,7 +245,7 @@ func TestShadowsocksAES128GCMUDP(t *testing.T) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
clientPort := tcp.PickPort()
|
clientPort := udp.PickPort()
|
||||||
clientConfig := &core.Config{
|
clientConfig := &core.Config{
|
||||||
App: []*serial.TypedMessage{
|
App: []*serial.TypedMessage{
|
||||||
serial.ToTypedMessage(&log.Config{
|
serial.ToTypedMessage(&log.Config{
|
||||||
|
@ -341,7 +341,7 @@ func TestShadowsocksAES128GCMUDPMux(t *testing.T) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
clientPort := tcp.PickPort()
|
clientPort := udp.PickPort()
|
||||||
clientConfig := &core.Config{
|
clientConfig := &core.Config{
|
||||||
App: []*serial.TypedMessage{
|
App: []*serial.TypedMessage{
|
||||||
serial.ToTypedMessage(&log.Config{
|
serial.ToTypedMessage(&log.Config{
|
||||||
|
|
|
@ -23,6 +23,7 @@ import (
|
||||||
"github.com/xtls/xray-core/proxy/vmess/inbound"
|
"github.com/xtls/xray-core/proxy/vmess/inbound"
|
||||||
"github.com/xtls/xray-core/proxy/vmess/outbound"
|
"github.com/xtls/xray-core/proxy/vmess/outbound"
|
||||||
"github.com/xtls/xray-core/testing/servers/tcp"
|
"github.com/xtls/xray-core/testing/servers/tcp"
|
||||||
|
"github.com/xtls/xray-core/testing/servers/udp"
|
||||||
"github.com/xtls/xray-core/transport/internet"
|
"github.com/xtls/xray-core/transport/internet"
|
||||||
"github.com/xtls/xray-core/transport/internet/domainsocket"
|
"github.com/xtls/xray-core/transport/internet/domainsocket"
|
||||||
"github.com/xtls/xray-core/transport/internet/headers/http"
|
"github.com/xtls/xray-core/transport/internet/headers/http"
|
||||||
|
@ -257,7 +258,7 @@ func TestVMessQuic(t *testing.T) {
|
||||||
defer tcpServer.Close()
|
defer tcpServer.Close()
|
||||||
|
|
||||||
userID := protocol.NewID(uuid.New())
|
userID := protocol.NewID(uuid.New())
|
||||||
serverPort := tcp.PickPort()
|
serverPort := udp.PickPort()
|
||||||
serverConfig := &core.Config{
|
serverConfig := &core.Config{
|
||||||
App: []*serial.TypedMessage{
|
App: []*serial.TypedMessage{
|
||||||
serial.ToTypedMessage(&log.Config{
|
serial.ToTypedMessage(&log.Config{
|
||||||
|
|
|
@ -446,7 +446,7 @@ func TestVMessGCMUDP(t *testing.T) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
clientPort := tcp.PickPort()
|
clientPort := udp.PickPort()
|
||||||
clientConfig := &core.Config{
|
clientConfig := &core.Config{
|
||||||
App: []*serial.TypedMessage{
|
App: []*serial.TypedMessage{
|
||||||
serial.ToTypedMessage(&log.Config{
|
serial.ToTypedMessage(&log.Config{
|
||||||
|
|
Loading…
Reference in a new issue