mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-03 07:56:42 -05:00
add tag for inbound detour connection
This commit is contained in:
parent
641e5db851
commit
3a1c134f84
@ -26,6 +26,7 @@ type DnsConfig interface {
|
|||||||
type InboundDetourConfig interface {
|
type InboundDetourConfig interface {
|
||||||
Protocol() string
|
Protocol() string
|
||||||
PortRange() v2net.PortRange
|
PortRange() v2net.PortRange
|
||||||
|
Tag() string
|
||||||
Settings() interface{}
|
Settings() interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ type InboundDetourConfig struct {
|
|||||||
ProtocolValue string `json:"protocol"`
|
ProtocolValue string `json:"protocol"`
|
||||||
PortRangeValue *v2netjson.PortRange `json:"port"`
|
PortRangeValue *v2netjson.PortRange `json:"port"`
|
||||||
SettingsValue json.RawMessage `json:"settings"`
|
SettingsValue json.RawMessage `json:"settings"`
|
||||||
|
TagValue string `json:"tag"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *InboundDetourConfig) Protocol() string {
|
func (this *InboundDetourConfig) Protocol() string {
|
||||||
@ -25,3 +26,7 @@ func (this *InboundDetourConfig) PortRange() v2net.PortRange {
|
|||||||
func (this *InboundDetourConfig) Settings() interface{} {
|
func (this *InboundDetourConfig) Settings() interface{} {
|
||||||
return loadConnectionConfig(this.SettingsValue, this.ProtocolValue, proxyconfig.TypeInbound)
|
return loadConnectionConfig(this.SettingsValue, this.ProtocolValue, proxyconfig.TypeInbound)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *InboundDetourConfig) Tag() string {
|
||||||
|
return this.TagValue
|
||||||
|
}
|
||||||
|
@ -55,6 +55,11 @@ func (this *PortRange) To() v2net.Port {
|
|||||||
type InboundDetourConfig struct {
|
type InboundDetourConfig struct {
|
||||||
*ConnectionConfig
|
*ConnectionConfig
|
||||||
PortRangeValue *PortRange
|
PortRangeValue *PortRange
|
||||||
|
TagValue string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *InboundDetourConfig) Tag() string {
|
||||||
|
return this.TagValue
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *InboundDetourConfig) PortRange() v2net.PortRange {
|
func (this *InboundDetourConfig) PortRange() v2net.PortRange {
|
||||||
|
Loading…
Reference in New Issue
Block a user