mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
601 B
26 lines
601 B
9 years ago
|
package json
|
||
|
|
||
|
import (
|
||
|
"encoding/json"
|
||
|
|
||
|
proxyconfig "github.com/v2ray/v2ray-core/proxy/common/config"
|
||
|
)
|
||
|
|
||
|
type OutboundDetourConfig struct {
|
||
|
ProtocolValue string `json:"protocol"`
|
||
|
TagValue string `json:"tag"`
|
||
|
SettingsValue json.RawMessage `json:"settings"`
|
||
|
}
|
||
|
|
||
|
func (this *OutboundDetourConfig) Protocol() string {
|
||
|
return this.ProtocolValue
|
||
|
}
|
||
|
|
||
9 years ago
|
func (this *OutboundDetourConfig) Tag() string {
|
||
|
return this.TagValue
|
||
9 years ago
|
}
|
||
|
|
||
|
func (this *OutboundDetourConfig) Settings() interface{} {
|
||
|
return loadConnectionConfig(this.SettingsValue, this.ProtocolValue, proxyconfig.TypeOutbound)
|
||
|
}
|