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"` ClientIP *cfgcommon.Address `json:"clientIp"` Tag string `json:"tag"` QueryStrategy string `json:"queryStrategy"` 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 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 SkipFallback bool Domains []string ExpectIPs cfgcommon.StringList // 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.