Documentation
¶
Overview ¶
Package dns manages a local DNS resolver for wildcard *.obol.stack resolution.
It runs a dnsmasq Docker container that answers DNS queries for the obol.stack domain with 127.0.0.1, and configures the host OS to use it. This enables per-instance hostname routing (e.g., openclaw-myid.obol.stack) without manual /etc/hosts entries.
macOS: binds to port 5553, uses /etc/resolver/obol.stack (supports custom port). Linux: binds to 127.0.0.2:53, uses systemd-resolved drop-in (requires port 53).
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 our local DNS container. Requires sudo on first run.
macOS: creates /etc/resolver/obol.stack (port 5553) Linux: creates systemd-resolved drop-in pointing to 127.0.0.2
func EnsureRunning ¶
func EnsureRunning() error
EnsureRunning starts the DNS resolver container if not already running. Idempotent: no-ops if the container is already healthy.
func IsResolverConfigured ¶
func IsResolverConfigured() bool
IsResolverConfigured checks whether the system resolver is already set up.
func RemoveSystemResolver ¶
func RemoveSystemResolver()
RemoveSystemResolver removes the host OS DNS configuration for *.obol.stack.
Types ¶
This section is empty.