0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-13 03:49:35 +03:00

Make it easier to configure multiple listening ports

This commit is contained in:
lucifer9
2021-11-12 18:12:32 +08:00
committed by yuhan6665
parent c3298c38a0
commit d6ae4e9ba2
20 changed files with 394 additions and 381 deletions

View File

@ -231,10 +231,7 @@ func TestXrayConfig(t *testing.T) {
Inbound: []*core.InboundHandlerConfig{
{
ReceiverSettings: serial.ToTypedMessage(&proxyman.ReceiverConfig{
PortRange: &net.PortRange{
From: 443,
To: 443,
},
PortList: &net.PortList{Range: []*net.PortRange{net.SinglePortRange(443)}},
StreamSettings: &internet.StreamConfig{
ProtocolName: "websocket",
TransportSettings: []*internet.TransportConfig{
@ -281,10 +278,10 @@ func TestXrayConfig(t *testing.T) {
},
{
ReceiverSettings: serial.ToTypedMessage(&proxyman.ReceiverConfig{
PortRange: &net.PortRange{
PortList: &net.PortList{Range: []*net.PortRange{{
From: 443,
To: 500,
},
}}},
AllocationStrategy: &proxyman.AllocationStrategy{
Type: proxyman.AllocationStrategy_Random,
Concurrency: &proxyman.AllocationStrategy_AllocationStrategyConcurrency{