dns.go 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. package option
  2. type DNSOptions struct {
  3. Servers []DNSServerOptions `json:"servers,omitempty"`
  4. Rules []DNSRule `json:"rules,omitempty"`
  5. Final string `json:"final,omitempty"`
  6. ReverseMapping bool `json:"reverse_mapping,omitempty"`
  7. FakeIP *DNSFakeIPOptions `json:"fakeip,omitempty"`
  8. DNSClientOptions
  9. }
  10. type DNSServerOptions struct {
  11. Tag string `json:"tag,omitempty"`
  12. Address string `json:"address"`
  13. AddressResolver string `json:"address_resolver,omitempty"`
  14. AddressStrategy DomainStrategy `json:"address_strategy,omitempty"`
  15. AddressFallbackDelay Duration `json:"address_fallback_delay,omitempty"`
  16. Strategy DomainStrategy `json:"strategy,omitempty"`
  17. Detour string `json:"detour,omitempty"`
  18. }
  19. type DNSClientOptions struct {
  20. Strategy DomainStrategy `json:"strategy,omitempty"`
  21. DisableCache bool `json:"disable_cache,omitempty"`
  22. DisableExpire bool `json:"disable_expire,omitempty"`
  23. }
  24. type DNSFakeIPOptions struct {
  25. Enabled bool `json:"enabled,omitempty"`
  26. Inet4Range *ListenPrefix `json:"inet4_range,omitempty"`
  27. Inet6Range *ListenPrefix `json:"inet6_range,omitempty"`
  28. }