mirror of https://github.com/v2ray/v2ray-core
tag for default inbound and outbound
parent
ad3f450bce
commit
03d8c33fd1
|
@ -35,6 +35,7 @@ type InboundConnectionConfig struct {
|
||||||
StreamSetting *StreamConfig `json:"streamSettings"`
|
StreamSetting *StreamConfig `json:"streamSettings"`
|
||||||
Settings json.RawMessage `json:"settings"`
|
Settings json.RawMessage `json:"settings"`
|
||||||
AllowPassive bool `json:"allowPassive"`
|
AllowPassive bool `json:"allowPassive"`
|
||||||
|
Tag string `json:"tag"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *InboundConnectionConfig) Build() (*core.InboundConnectionConfig, error) {
|
func (this *InboundConnectionConfig) Build() (*core.InboundConnectionConfig, error) {
|
||||||
|
@ -67,6 +68,9 @@ func (this *InboundConnectionConfig) Build() (*core.InboundConnectionConfig, err
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
config.Settings = ts
|
config.Settings = ts
|
||||||
|
if len(this.Tag) > 0 {
|
||||||
|
config.Tag = this.Tag
|
||||||
|
}
|
||||||
return config, nil
|
return config, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +80,7 @@ type OutboundConnectionConfig struct {
|
||||||
StreamSetting *StreamConfig `json:"streamSettings"`
|
StreamSetting *StreamConfig `json:"streamSettings"`
|
||||||
ProxySettings *ProxyConfig `json:"proxySettings"`
|
ProxySettings *ProxyConfig `json:"proxySettings"`
|
||||||
Settings json.RawMessage `json:"settings"`
|
Settings json.RawMessage `json:"settings"`
|
||||||
|
Tag string `json:"tag"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *OutboundConnectionConfig) Build() (*core.OutboundConnectionConfig, error) {
|
func (this *OutboundConnectionConfig) Build() (*core.OutboundConnectionConfig, error) {
|
||||||
|
@ -111,6 +116,9 @@ func (this *OutboundConnectionConfig) Build() (*core.OutboundConnectionConfig, e
|
||||||
}
|
}
|
||||||
config.ProxySettings = ps
|
config.ProxySettings = ps
|
||||||
}
|
}
|
||||||
|
if len(this.Tag) > 0 {
|
||||||
|
config.Tag = this.Tag
|
||||||
|
}
|
||||||
return config, nil
|
return config, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue