Documentation
¶
Overview ¶
Package dnsserver is lerd's built-in DNS server. It reads the dnsmasq-style config directory lerd has always written, so the format and every tool that rewrites lerd.conf stay the same.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
Port int
Domains map[string]Addrs
// Upstreams answer every other name, as host:port. A resolver that routes
// all queries here (systemd-resolved with ~.) relies on it.
Upstreams []string
// Routes sends names under a domain to that domain's own servers, from
// server=/d/ip. An empty route refuses the names instead of forwarding, and
// a defaultUpstreams entry stands for the default upstreams (server=/d/#).
Routes map[string][]string
// LogQueries prints every query to stderr, as dnsmasq's log-queries did.
LogQueries bool
// Unsupported holds the lines this server does not act on, so a directive
// someone added by hand for dnsmasq is reported rather than lost.
Unsupported []string
}
Conf is the subset of dnsmasq's syntax this server acts on: port=, address=, server= (plain and per-domain) and log-queries.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server answers A and AAAA queries for the domains in a config directory, reloading it whenever a file in it changes.
func (*Server) ServeTCP ¶
ServeTCP serves on ln until Shutdown. DNS clients fall back to TCP for large answers, and lerd's own diagnostics probe the port over TCP.
Click to show internal directories.
Click to hide internal directories.