Files
doona/docs/guide.md
T
Zakk 3d1e9a9b92 fix: address feedback on 0.1.0-beta.2
Stop shipping a node_modules archive with releases; package recipes now
install the prebuilt program and font tarballs. State in the READMEs and
guides that the native API exists only on the feat/native-api branch of
Glassyiris/honk, and show a clear message when an engine answers 404 for
both discovery and capabilities instead of asking for a token.

Report the page language to the service worker only after it activates,
so an updated build keeps the language for offline start. Keep secondary
facts on a caption line under card values, keep cards in a row equal in
height, lay the capabilities list out in columns, frost sticky headers and
overlays in the glass palette, and fit Overview, DNS and the routing map on
tablets and phones. Localize backend datapath errors and the rule editor's
must switch.

List events received before the Events page opened. Fill the mock
backend with realistic connections, DNS records, logs, events, notices
and history for the public demo, with traffic shaped by destination.
Link the demo from the READMEs and refresh the screenshots.
2026-09-24 14:27:28 +10:00

15 KiB

doona guide

English · 简体中文 · 繁體中文

The parts of the README that are only needed once: what doona runs on, the other ways to serve it, what each page needs from the backend, where doona keeps its own settings, and the development tools.

Try the demo with sample data.

Requirements

Component Requirement
Backend An engine implementing the native API contract pinned in SOURCE.md, with its API listener enabled (see Install)
Browser Chrome or Edge 120, Firefox 121, Safari 17 or later. These are the CSS build targets; the JavaScript target is ES2022. Automated tests use Chromium
Build Node ^22.13.0 || ^24.0.0 || >=26.0.0 and pnpm 11.15.1; GNU tar, gzip and sha256sum for the archives

Install

Required honk build: doona needs the native API in Glassyiris/honk feat/native-api. No tagged daeuniverse/honk release includes it yet. The native_api and password_auth keys may change before upstream release. A released honk returns 404 for /api and /ui/. The README configuration block applies to that branch.

The release archives and the honk block are in the README.

Any static server or reverse proxy

Serve the extracted files at the web root or under a prefix such as /ui/; the pages use hash routes (/ui/#/activity), so no rewrite rules are needed. If the UI and engine have different origins, configure the engine to allow the UI's origin. Follow the engine's documentation for its native API listener, CORS and authentication settings.

A reverse proxy keeps the UI and engine same-origin. Forward the exact /api discovery endpoint and the /api/ subtree to the engine's listener; serve the files under /ui/. Preserve any configured proxy prefix for both API routes.

Distribution packages

None published yet. Each release carries architecture-independent deb, rpm, ipk and Arch packages built by nfpm from the prebuilt program and font archives. Recipes in install/ for OpenWrt, Alpine, Gentoo and Nix install the same archives. The AUR doona-bin recipe lives in a separate repository. Use make install DESTDIR=… PREFIX=/usr and make install-fonts when packaging a local build.

First run

Open /ui/ on the engine host. On a first visit doona asks the origin it was served from for /api and saves the engine as a backend. In password mode, the locked sign-in dialog offers first-time setup to create the administrator; complete setup from a loopback or private-network client, then sign in with the username and password. Served from elsewhere, or to reach another engine, open Settings and enter the server root (http://router:9527, without /api/v1); Test Connection checks discovery before saving, and saving reloads the page.

In token mode, doona asks for the token. Enter it in Settings with the server root, or use a pairing link to fill the form: /ui/#/settings?api=http://router:9527&token=…. Doona removes the token from the address bar on load.

The activity page then shows the running engine. The usual route through the rest:

  1. Nodes: add a subscription (a name and its URL) or paste share links; nodes appear with their protocol, latency and groups. Set how often a subscription refreshes, test a node, or add it to a group from its row.
  2. Policies: each group is a card with its members' latency. Pick a member of a selector group, pin one in an automatic group and release it again, test them all, or edit the group's policy and filters.
  3. Rules: the routing dictionary in evaluation order with the flows each rule decided. Add a rule from a kind and its values (a domain suffix, a geosite category, a port, a process name) or as an expression, before any rule or at the end.
  4. Configuration: the accepted sources with their diagnostics. Edit a file in place, validate, save and reload; a quick setup covers the main file's common settings.

Every configuration-source write goes through the engine: doona sends the hash it read the source at (If-Match; a file changed on disk answers 412 and nothing is written), the engine validates the whole source set before saving and reloading, and a failed reload keeps the previous generation active. Dry-run validation never writes, and redacted text is never written back. Runtime settings and group selection are separate endpoints with their own checks.

Pages

The policies page
Page Shows Needs
Activity Outbound mode, traffic and memory, active connections, node latency, outbound usage, top clients and notifications —
Overview Engine and eBPF state, traffic counters, backend capabilities, and the status as JSON runtime
Connections Live connections with source, destination, rule, chain and traffic; close one or all; filters from the URL connections
DNS Queries with their answers, the cache, and the log; a flush dns_query, dns_log, dns_cache
Policies Groups, their members and health; selection, pinning, probing and editing groups
Rules A routing tree from rules (or devices) through outbounds to the nodes they select, the rule list with hits, the flow log with a rule one click away, and a routing trace for a chosen target rules, flows, routing_trace
Nodes Subscriptions and their refresh interval, inline nodes, add and remove, probe and join a group nodes, providers
Configuration Sources with diagnostics, an editor with validation, quick setup and export config
Events The backend event stream events
Logs The log stream with level and module filters, pause and export logs
Settings Backends, runtime settings and backend actions, language, appearance and palette —

Every page remains in navigation. A page is marked unavailable only when every resource listed for it in registry.ts is unavailable; opening it shows an unavailable notice. Ctrl K searches pages, connections, nodes, groups, rules and sources from anywhere.

The rules page

Data and settings

doona has no server-side store for its own UI settings. Configuration and runtime changes are written through the engine; doona's UI settings live in the browser's localStorage for the site's origin:

Setting Key Values
Backends doona-profiles JSON list of {id, name, api, token}; api is a server root or proxy prefix, empty or mock for demo data. For password backends, token is empty and honk manages the session; doona keeps its session token in this tab's sessionStorage. In token mode, API requests send the token in the Authorization header. Pairing links may carry it in the URL fragment and remove it on load.
Active one doona-profile id of the selected backend
Language doona-lang zh-TW (default), zh-CN, en
Colour scheme doona-scheme system (default), light, dark
Palette doona-palette rose-pine/moon (default); the other ids are the PaletteId union in preferences.ts
Wordmark doona-wordmark gradient (default), plain

The saved theme and language are applied before the first paint, so a reload does not flash the default look.

Over HTTPS or on localhost a service worker precaches the application shell and caches fonts and icons, so the pages open offline and the site can be installed as an app. API responses are never cached. See SECURITY.md for reporting a vulnerability.

The activity page in dark mode

Development

The commands are in the README.

For a read-only pass against a live backend, run DOONA_API=http://router:9527 DOONA_TOKEN=… pnpm e2e:live from the repository root. DOONA_API is required; omit DOONA_TOKEN when authentication is not required. The command runs accessibility, mobile-navigation and keyboard specs, rejects backend overrides in fixture storage, and aborts control requests, including DNS queries. Ordinary pnpm e2e runs reject DOONA_API unless DOONA_LIVE_OBSERVE=1 is explicitly set.

pnpm dev serves the mock on Vite's dev server. Archive versions come from package.json locally and from the Git description on tags; timestamps use SOURCE_DATE_EPOCH or the HEAD commit time. node tools/screenshots.mjs <url> docs/screenshots captures pages and the palette sheet from a running build as lossless WebP; it requires cwebp. See CONTRIBUTING.md and CHANGELOG.md.

Path Purpose
src/features/ Pages, their hooks and messages, one folder each
src/shell/ Application shell, navigation and search
src/ui/ Shared components, theme and icons
src/api/ Client, backend profiles, mock backend and generated types
src/store/ Resource watching, cached reads and action hooks
src/i18n/ Translations and locale helpers
contract/ The vendored OpenAPI contract and its pin
public/ Static assets, fonts and the service worker
e2e/ Browser tests
tools/ Build, packaging, conformance and screenshot tools
install/ nfpm configs, OpenWrt, Alpine, Gentoo and Nix recipes

Contract

SOURCE.md records the pin of openapi.yaml. After moving the pin, run pnpm gen:api to regenerate src/api/types.ts. node tools/conformance.mjs http://router:9527 --token … checks a live backend's discovery, capabilities and read-only responses against the contract without sending a mutation.