netboot

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package netboot makes the pure-Go binary self-sufficient for DNS and TLS on hosts that lack the files Go's stdlib expects — most notably Android/Termux, whose read-only /etc has no /etc/resolv.conf and no /etc/ssl/certs, so DNS lookups hit the dead loopback resolver and every outbound HTTPS fails x509 verification.

Termux keeps the real files under $PREFIX (e.g. $PREFIX/etc/resolv.conf, $PREFIX/etc/tls/cert.pem) — the same paths install.sh bind-mounts via proot for third-party CLIs. Setup points Go at those native files instead of embedding a CA bundle or guessing public DNS.

Setup runs as early as possible in each binary's main, before any DB connect or outbound HTTPS. It is a no-op on normal hosts (resolv.conf has a real nameserver; the system cert pool is populated).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup()

Setup installs the DNS + CA fallbacks once. Idempotent and safe to call from any entry point; no-op when the host is already usable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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