mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 23:33:44 +08:00
34 lines
1.3 KiB
Go
34 lines
1.3 KiB
Go
package option
|
|
|
|
type DNSOptions struct {
|
|
Servers []DNSServerOptions `json:"servers,omitempty"`
|
|
Rules []DNSRule `json:"rules,omitempty"`
|
|
Final string `json:"final,omitempty"`
|
|
ReverseMapping bool `json:"reverse_mapping,omitempty"`
|
|
FakeIP *DNSFakeIPOptions `json:"fakeip,omitempty"`
|
|
DNSClientOptions
|
|
}
|
|
|
|
type DNSServerOptions struct {
|
|
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"`
|
|
Detour string `json:"detour,omitempty"`
|
|
}
|
|
|
|
type DNSClientOptions struct {
|
|
Strategy DomainStrategy `json:"strategy,omitempty"`
|
|
DisableCache bool `json:"disable_cache,omitempty"`
|
|
DisableExpire bool `json:"disable_expire,omitempty"`
|
|
IndependentCache bool `json:"independent_cache,omitempty"`
|
|
}
|
|
|
|
type DNSFakeIPOptions struct {
|
|
Enabled bool `json:"enabled,omitempty"`
|
|
Inet4Range *ListenPrefix `json:"inet4_range,omitempty"`
|
|
Inet6Range *ListenPrefix `json:"inet6_range,omitempty"`
|
|
}
|