diff --git a/tools/conf/v2ray.go b/tools/conf/v2ray.go index 313e5aecf..13f85c86e 100644 --- a/tools/conf/v2ray.go +++ b/tools/conf/v2ray.go @@ -35,6 +35,7 @@ type InboundConnectionConfig struct { StreamSetting *StreamConfig `json:"streamSettings"` Settings json.RawMessage `json:"settings"` AllowPassive bool `json:"allowPassive"` + Tag string `json:"tag"` } func (this *InboundConnectionConfig) Build() (*core.InboundConnectionConfig, error) { @@ -67,6 +68,9 @@ func (this *InboundConnectionConfig) Build() (*core.InboundConnectionConfig, err return nil, err } config.Settings = ts + if len(this.Tag) > 0 { + config.Tag = this.Tag + } return config, nil } @@ -76,6 +80,7 @@ type OutboundConnectionConfig struct { StreamSetting *StreamConfig `json:"streamSettings"` ProxySettings *ProxyConfig `json:"proxySettings"` Settings json.RawMessage `json:"settings"` + Tag string `json:"tag"` } func (this *OutboundConnectionConfig) Build() (*core.OutboundConnectionConfig, error) { @@ -111,6 +116,9 @@ func (this *OutboundConnectionConfig) Build() (*core.OutboundConnectionConfig, e } config.ProxySettings = ps } + if len(this.Tag) > 0 { + config.Tag = this.Tag + } return config, nil }