Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WithCookieSecret = func(key []byte) ServerOption {
return func(s *server) {
s.cookieSecret = key
}
}
View Source
var WithGeoipDbPath = func(path string) ServerOption {
return func(s *server) {
s.geoipDbPath = path
}
}
View Source
var WithNoTCP = func() ServerOption { return func(s *server) { s.noTCP = true } }
View Source
var WithNoUDP = func() ServerOption { return func(s *server) { s.noUDP = true } }
View Source
var WithTCPAddr = func(addr string) ServerOption {
return func(s *server) {
s.tcpAddr = addr
}
}
View Source
var WithUDPAddr = func(addr string) ServerOption {
return func(s *server) {
s.udpAddr = addr
}
}
Functions ¶
func New ¶
func New(opts ...ServerOption) (*server, error)
Types ¶
type Handler ¶
type Handler interface {
Handle(w dns.ResponseWriter, req, resp *dns.Msg)
}
func BadCookieHandler ¶
func BadCookieHandler(clientCookie []byte, gen *cookies.CookieGenerator) Handler
func TSIGHanlder ¶
func ValidCookieHandler ¶
func ValidCookieHandler(gen *cookies.CookieGenerator, next Handler) Handler
type HandlerFunc ¶
type HandlerFunc func(w dns.ResponseWriter, req, resp *dns.Msg)
func (HandlerFunc) Handle ¶
func (f HandlerFunc) Handle(w dns.ResponseWriter, req, resp *dns.Msg)
type ServerOption ¶
type ServerOption func(*server)
Click to show internal directories.
Click to hide internal directories.