Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HijackZero returns the zero IP address to matching requests. HijackZero = iota // HijackEmpty returns an empty answer to matching requests. HijackEmpty // HijackHosts returns the value of the hoss entry to matching request. HijackHosts )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DNS DNSOptions
Resolver ResolverOptions
Hosts []Hosts
}
Config specifies is the zdns configuration parameters.
type DNSOptions ¶
type DNSOptions struct {
Listen string
Protocol string `toml:"protocol"`
CacheSize int `toml:"cache_size"`
CachePrefetch bool `toml:"cache_prefetch"`
CachePersist bool `toml:"cache_persist"`
HijackMode string `toml:"hijack_mode"`
RefreshInterval string `toml:"hosts_refresh_interval"`
Resolvers []string
Database string `toml:"database"`
LogModeString string `toml:"log_mode"`
LogMode int
LogTTLString string `toml:"log_ttl"`
LogTTL time.Duration
ListenHTTP string `toml:"listen_http"`
// contains filtered or unexported fields
}
DNSOptions controlers the behaviour of the DNS server.
type Hosts ¶
type Hosts struct {
URL string
Hosts []string `toml:"entries"`
Hijack bool
Timeout string
// contains filtered or unexported fields
}
Hosts controls how a hosts file should be retrieved.
type ResolverOptions ¶
type ResolverOptions struct {
Protocol string `toml:"protocol"`
TimeoutString string `toml:"timeout"`
Timeout time.Duration
}
ResolverOptions controls the behaviour of resolvers.
type Server ¶
type Server struct {
Config Config
// contains filtered or unexported fields
}
A Server defines parameters for running a DNS server.
func (*Server) ListenAndServe ¶
ListenAndServe starts a server on configured address and protocol.
Click to show internal directories.
Click to hide internal directories.