Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultDummyDNSPort = "5353"
DefaultDummyDNSPort is the port the dummy DNS server listens on (high port to avoid CAP_NET_BIND_SERVICE). Traffic to port 53 is DNAT'd to this port in the namespace.
View Source
const DummyA = "6.6.6.6"
DummyA is the IPv4 address returned for every A record query (arbitrary non-loopback).
View Source
const DummyAAAA = "2001:db8::1"
DummyAAAA is the IPv6 address returned for every AAAA record query (documentation prefix).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a minimal DNS server that responds to every query with a dummy A record. Used inside the network namespace to prevent DNS exfiltration.
func (*Server) ListenAndServe ¶
func (s *Server) ListenAndServe()
ListenAndServe starts the UDP and TCP servers in goroutines and returns immediately. Logger must be non-nil; server errors are logged via s.logger.
Click to show internal directories.
Click to hide internal directories.