Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSConfig ¶
type DNSConfig struct { Servers []*NameServerConfig `json:"servers"` Hosts map[string]*HostAddress `json:"hosts"` FakeDNS *FakeDNSConfig `json:"fakedns"` DomainMatcher string `json:"domainMatcher"` ClientIP *cfgcommon.Address `json:"clientIp"` Tag string `json:"tag"` QueryStrategy string `json:"queryStrategy"` CacheStrategy string `json:"cacheStrategy"` FallbackStrategy string `json:"fallbackStrategy"` DisableCache bool `json:"disableCache"` DisableFallback bool `json:"disableFallback"` DisableFallbackIfMatch bool `json:"disableFallbackIfMatch"` // contains filtered or unexported fields }
DNSConfig is a JSON serializable object for dns.Config.
type FakeDNSConfig ¶ added in v5.2.0
type FakeDNSConfig struct {
// contains filtered or unexported fields
}
func (*FakeDNSConfig) Build ¶ added in v5.2.0
func (f *FakeDNSConfig) Build() (*fakedns.FakeDnsPoolMulti, error)
func (*FakeDNSConfig) UnmarshalJSON ¶ added in v5.2.0
func (f *FakeDNSConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements encoding/json.Unmarshaler.UnmarshalJSON
type FakeDNSConfigExtend ¶ added in v5.2.0
type FakeDNSConfigExtend struct {
*FakeDNSConfig
}
func (*FakeDNSConfigExtend) UnmarshalJSON ¶ added in v5.2.0
func (f *FakeDNSConfigExtend) UnmarshalJSON(data []byte) error
type FakeDNSPoolElementConfig ¶ added in v5.2.0
type HostAddress ¶
type HostAddress struct {
// contains filtered or unexported fields
}
func (*HostAddress) UnmarshalJSON ¶
func (h *HostAddress) UnmarshalJSON(data []byte) error
UnmarshalJSON implements encoding/json.Unmarshaler.UnmarshalJSON
type NameServerConfig ¶
type NameServerConfig struct { Address *cfgcommon.Address ClientIP *cfgcommon.Address Port uint16 Tag string QueryStrategy string CacheStrategy string FallbackStrategy string SkipFallback bool Domains []string ExpectIPs cfgcommon.StringList FakeDNS FakeDNSConfigExtend // contains filtered or unexported fields }
func (*NameServerConfig) Build ¶
func (c *NameServerConfig) Build() (*dns.NameServer, error)
func (*NameServerConfig) BuildV5 ¶
func (c *NameServerConfig) BuildV5(ctx context.Context) (*dns.NameServer, error)
func (*NameServerConfig) UnmarshalJSON ¶
func (c *NameServerConfig) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.