Code layout¶
cmd/fr0ntier/ main.go (subcommands), daemon.go (serve, CLI socket, factory reset)
internal/config/ model, defaults & presets, schema upgrade, validation, section registry, store, diff
internal/render/ nftables, networkd, dnsmasq, DNS, Wi-Fi, WireGuard, OpenVPN + PKI, IPsec,
reverse proxy (nginx, ACME, certificates), system
internal/engine/ commit engine: preview, apply, commit-confirmed, rollback, FQDN sets
internal/analyze/ policy lookup simulator and rule analyzer
internal/dns/ DNS server: wire format, upstreams (UDP/TCP/DoT/DoH), cache, filter, stats
internal/monitor/ collectors, TSDB, log store, NFLOG/kmsg, sessions & talkers, gateways, alerts, exporters
internal/auth/ administrators, PBKDF2, TOTP, sessions, tokens
internal/vpnauth/ OpenVPN user authentication (management interface), 2FA, sessions, identity sets
internal/mail/ SMTP client (STARTTLS/TLS, PLAIN/LOGIN) and MIME builder
internal/api/ HTTPS server, REST handlers, WebSocket terminal and live events
internal/cli/ line editor, FortiOS-style command interpreter
internal/ws, pty, qr, hw, sysx, paths, version small support packages
internal/web/static/ web UI (ES modules, CSS, SVG) embedded with go:embed
scripts/ installer library and modules
packaging/ systemd units, fail-safe ruleset, sysctl, motd, ACME hook
tools/docgen/ regenerates the reference pages (make docs-ref)
docs/ this documentation (MkDocs Material)
Principles: renderers are pure; only the engine writes system files; every component supports the dry-run root; the UI talks only to the public API.