dns

package
v0.3.0-rc1 Latest Latest
Warning

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

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

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.

func Stop

func Stop()

Stop removes the DNS resolver container.

Types

This section is empty.

Jump to

Keyboard shortcuts

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