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
+2 -3
View File
@@ -4,7 +4,6 @@ import (
"encoding/json"
v2net "github.com/v2ray/v2ray-core/common/net"
v2netjson "github.com/v2ray/v2ray-core/common/net/json"
"github.com/v2ray/v2ray-core/shell/point"
)
@@ -28,7 +27,7 @@ func (this *InboundDetourAllocationConfig) Concurrency() int {
type InboundDetourConfig struct {
ProtocolValue string `json:"protocol"`
PortRangeValue *v2netjson.PortRange `json:"port"`
PortRangeValue *v2net.PortRange `json:"port"`
SettingsValue json.RawMessage `json:"settings"`
TagValue string `json:"tag"`
AllocationValue *InboundDetourAllocationConfig `json:"allocate"`
@@ -43,7 +42,7 @@ func (this *InboundDetourConfig) Protocol() string {
}
func (this *InboundDetourConfig) PortRange() v2net.PortRange {
return this.PortRangeValue
return *this.PortRangeValue
}
func (this *InboundDetourConfig) Settings() []byte {