config

package
Version: v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddress              string
	DebugHTTPAddress         string
	PrimaryDNS               []*common.DNSUpstream
	AlternativeDNS           []*common.DNSUpstream
	OnlyPrimaryDNS           bool
	IPv6UseAlternativeDNS    bool
	AlternativeDNSConcurrent bool
	IPNetworkFile            struct {
		Primary     string
		Alternative string
	}
	DomainFile struct {
		Primary            string
		Alternative        string
		PrimaryMatcher     string
		AlternativeMatcher string
		Matcher            string
	}
	HostsFile struct {
		HostsFile string
		Finder    string
	}
	MinimumTTL    int
	DomainTTLFile string
	CacheSize     int
	RejectQType   []uint16

	DomainTTLMap                map[string]uint32
	DomainPrimaryList           matcher.Matcher
	DomainAlternativeList       matcher.Matcher
	WhenPrimaryDNSAnswerNoneUse string
	IPNetworkPrimaryList        []*net.IPNet
	IPNetworkAlternativeList    []*net.IPNet
	Hosts                       *hosts.Hosts
	Cache                       *cache.Cache
}

func NewConfig

func NewConfig(configFile string) *Config

New config with json file and do some other initiate works

Source Files

Jump to

Keyboard shortcuts

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