1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-25 19:45:38 -05:00

simplify port range

This commit is contained in:
v2ray
2016-01-15 13:39:36 +01:00
parent 5ceac7a6e2
commit 393a64820f
10 changed files with 38 additions and 81 deletions

View File

@@ -39,19 +39,6 @@ func (this *LogConfig) LogLevel() log.LogLevel {
return this.LogLevelValue
}
type PortRange struct {
FromValue v2net.Port
ToValue v2net.Port
}
func (this *PortRange) From() v2net.Port {
return this.FromValue
}
func (this *PortRange) To() v2net.Port {
return this.ToValue
}
type InboundDetourAllocationConfig struct {
StrategyValue string
ConcurrencyValue int
@@ -72,7 +59,7 @@ func (this *InboundDetourAllocationConfig) Concurrency() int {
type InboundDetourConfig struct {
*ConnectionConfig
PortRangeValue *PortRange
PortRangeValue *v2net.PortRange
TagValue string
AllocationStrategy *InboundDetourAllocationConfig
}
@@ -86,7 +73,7 @@ func (this *InboundDetourConfig) Tag() string {
}
func (this *InboundDetourConfig) PortRange() v2net.PortRange {
return this.PortRangeValue
return *this.PortRangeValue
}
type OutboundDetourConfig struct {