outbound_detour.go 601 B

12345678910111213141516171819202122232425
  1. package json
  2. import (
  3. "encoding/json"
  4. proxyconfig "github.com/v2ray/v2ray-core/proxy/common/config"
  5. )
  6. type OutboundDetourConfig struct {
  7. ProtocolValue string `json:"protocol"`
  8. TagValue string `json:"tag"`
  9. SettingsValue json.RawMessage `json:"settings"`
  10. }
  11. func (this *OutboundDetourConfig) Protocol() string {
  12. return this.ProtocolValue
  13. }
  14. func (this *OutboundDetourConfig) Tag() string {
  15. return this.TagValue
  16. }
  17. func (this *OutboundDetourConfig) Settings() interface{} {
  18. return loadConnectionConfig(this.SettingsValue, this.ProtocolValue, proxyconfig.TypeOutbound)
  19. }