dns

package
v5.0.0-...-a740f93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 12 Imported by: 0

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.

func (*DNSConfig) Build

func (c *DNSConfig) Build() (*dns.Config, error)

Build implements Buildable

func (*DNSConfig) BuildV5

func (c *DNSConfig) BuildV5(ctx context.Context) (*dns.Config, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL