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