Documentation
¶
Overview ¶
Package dns manages wildcard *.obol.stack resolution on the host machine.
Two OS-specific strategies are used:
macOS: A dnsmasq Docker container on port 5553 + /etc/resolver/obol.stack. This is the native macOS approach for per-domain DNS resolution.
Linux: NetworkManager's built-in dnsmasq plugin resolves *.obol.stack → 127.0.0.1 directly. Two config files, no Docker container, no bridge/veth hacks, no systemd-resolved drop-ins. Works on any distro with NM (Ubuntu, Fedora, Debian desktop, Arch, RHEL, openSUSE, Mint, Pop!_OS).
Systems without NetworkManager get instructions to install it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureSystemResolver ¶
func ConfigureSystemResolver() error
ConfigureSystemResolver sets up the host OS to route *.obol.stack queries to localhost. Requires sudo on first run.
macOS: creates /etc/resolver/obol.stack Linux: configures NM dnsmasq plugin for wildcard resolution
func EnsureHostsEntries ¶ added in v0.8.1
EnsureHostsEntries adds /etc/hosts entries for the given hostnames. Always includes "obol.stack" plus any additional hostnames (e.g. openclaw subdomains). Entries are idempotent — existing managed block is replaced.
func EnsureRunning ¶
func EnsureRunning() error
EnsureRunning starts the DNS resolver. On macOS, this starts a dnsmasq Docker container. On Linux, this is a no-op — NM dnsmasq handles resolution without a container.
func IsResolverConfigured ¶
func IsResolverConfigured() bool
IsResolverConfigured checks whether the system resolver is already set up.
func RemoveHostsEntries ¶ added in v0.8.1
func RemoveHostsEntries()
RemoveHostsEntries removes the obol-stack managed block from /etc/hosts.
func RemoveSystemResolver ¶
func RemoveSystemResolver()
RemoveSystemResolver removes the host OS DNS configuration for *.obol.stack.
Types ¶
This section is empty.