dns

package
v5.0.0-...-470bbe4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 14 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"`
	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.

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 FakeDNSConfig

type FakeDNSConfig struct {
	// contains filtered or unexported fields
}

func (*FakeDNSConfig) Build

func (*FakeDNSConfig) UnmarshalJSON

func (f *FakeDNSConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON implements encoding/json.Unmarshaler.UnmarshalJSON

type FakeDNSConfigExtend

type FakeDNSConfigExtend struct {
	*FakeDNSConfig
}

func (*FakeDNSConfigExtend) UnmarshalJSON

func (f *FakeDNSConfigExtend) UnmarshalJSON(data []byte) error

type FakeDNSPoolElementConfig

type FakeDNSPoolElementConfig struct {
	IPPool  string `json:"ipPool"`
	LRUSize int64  `json:"poolSize"`
}

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

Jump to

Keyboard shortcuts

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