Documentation
¶
Overview ¶
Package ddns implements a simple DNS proxy for [D]etect DNS settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BackendCrc32Tab = crc32.MakeTable(0xEDB88320)
BackendCrc32Tab Python use 0xEDB88320
View Source
var ChannelCrc32Tab = crc32.MakeTable(0xD5828281)
ChannelCrc32Tab different to BackendCrc32Tab
Functions ¶
Types ¶
type Configurations ¶
type Configurations struct { // host:port Listen string // [host1:port1, host2:port2] NameServers []string // Seconds, dump stats to StatsFile periodically StatsPeriod int StatsFile string Backends map[int]string // backend connection pool numbers PoolNum int // channel numbers, must little than PoolNum ChanNum int // millseconds ConnectTimeout int // millseconds ReadTimeout int ExpiresIn int Debug bool }
Configurations for server
type Server ¶
type Server struct { ExpiresIn int // contains filtered or unexported fields }
Server implements a DNS server.
func NewServer ¶
func NewServer(c Configurations) (*Server, error)
NewServer creates a new Server with the given options.
func (*Server) ListenAndServe ¶
ListenAndServe runs the server
Click to show internal directories.
Click to hide internal directories.