sing-box/option/dns.go

33 lines
1.3 KiB
Go
Raw Permalink Normal View History

2022-07-06 15:11:48 +00:00
package option
type DNSOptions struct {
2023-03-23 11:08:48 +00:00
Servers []DNSServerOptions `json:"servers,omitempty"`
Rules []DNSRule `json:"rules,omitempty"`
Final string `json:"final,omitempty"`
ReverseMapping bool `json:"reverse_mapping,omitempty"`
2023-03-25 04:03:23 +00:00
FakeIP *DNSFakeIPOptions `json:"fakeip,omitempty"`
DNSClientOptions
}
2022-07-06 15:11:48 +00:00
type DNSServerOptions struct {
2022-07-11 10:44:59 +00:00
Tag string `json:"tag,omitempty"`
Address string `json:"address"`
AddressResolver string `json:"address_resolver,omitempty"`
AddressStrategy DomainStrategy `json:"address_strategy,omitempty"`
AddressFallbackDelay Duration `json:"address_fallback_delay,omitempty"`
Strategy DomainStrategy `json:"strategy,omitempty"`
2022-07-11 10:44:59 +00:00
Detour string `json:"detour,omitempty"`
2022-07-06 15:11:48 +00:00
}
2023-03-25 04:03:23 +00:00
type DNSClientOptions struct {
Strategy DomainStrategy `json:"strategy,omitempty"`
DisableCache bool `json:"disable_cache,omitempty"`
DisableExpire bool `json:"disable_expire,omitempty"`
}
type DNSFakeIPOptions struct {
Enabled bool `json:"enabled,omitempty"`
Inet4Range *ListenPrefix `json:"inet4_range,omitempty"`
Inet6Range *ListenPrefix `json:"inet6_range,omitempty"`
}