dns

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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 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 RemoveSystemResolver

func RemoveSystemResolver()

RemoveSystemResolver removes the host OS DNS configuration for *.obol.stack.

func Stop

func Stop()

Stop removes the DNS resolver container (macOS only).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL