github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/option/dns.go (about) 1 package option 2 3 type DNSOptions struct { 4 Servers []DNSServerOptions `json:"servers,omitempty"` 5 Rules []DNSRule `json:"rules,omitempty"` 6 Final string `json:"final,omitempty"` 7 ReverseMapping bool `json:"reverse_mapping,omitempty"` 8 FakeIP *DNSFakeIPOptions `json:"fakeip,omitempty"` 9 DNSClientOptions 10 } 11 12 type DNSServerOptions struct { 13 Tag string `json:"tag,omitempty"` 14 Address string `json:"address"` 15 AddressResolver string `json:"address_resolver,omitempty"` 16 AddressStrategy DomainStrategy `json:"address_strategy,omitempty"` 17 AddressFallbackDelay Duration `json:"address_fallback_delay,omitempty"` 18 Strategy DomainStrategy `json:"strategy,omitempty"` 19 Detour string `json:"detour,omitempty"` 20 } 21 22 type DNSClientOptions struct { 23 Strategy DomainStrategy `json:"strategy,omitempty"` 24 DisableCache bool `json:"disable_cache,omitempty"` 25 DisableExpire bool `json:"disable_expire,omitempty"` 26 IndependentCache bool `json:"independent_cache,omitempty"` 27 } 28 29 type DNSFakeIPOptions struct { 30 Enabled bool `json:"enabled,omitempty"` 31 Inet4Range *ListenPrefix `json:"inet4_range,omitempty"` 32 Inet6Range *ListenPrefix `json:"inet6_range,omitempty"` 33 }