Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Network addresses
UDPAddr string // UDP listen address (e.g., ":53")
TCPAddr string // TCP listen address (e.g., ":53")
// Feature flags
DisableUDP bool
DisableTCP bool
// Cookie settings
CookieSecret []byte // 16-byte secret for DNS cookies (auto-generated if nil)
CookieTTL time.Duration // Cookie validity period (default: 1 hour)
// GeoIP settings
GeoIPPath string // Path to MaxMind GeoIP database (optional)
// Zone management
Zones *zone.Manager
// Timeouts
ReadTimeout time.Duration
WriteTimeout time.Duration
IdleTimeout time.Duration
}
Config holds the DNS server configuration.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a Config with sensible defaults.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a DNS server that handles queries, updates, and zone transfers.
func (*Server) ServeDNS ¶
func (s *Server) ServeDNS(w dns.ResponseWriter, req *dns.Msg)
ServeDNS implements the dns.Handler interface.
Click to show internal directories.
Click to hide internal directories.