Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions
- "Internet like a home device" starts off on new servers: sending the tunnel through the home network costs speed. Both server wizards (the first one and "Add server") have the switch, and on it says what it costs. Servers that have it on keep it - With it off, Server → Access says what that means: DNS still goes through the router, its proxies and filters see the tunnel only once its interface is added to their source interfaces, and sites the router's DNS answers with proxy addresses won't open - With it on, established connections skip the second pass through netfilter in Dawnline's network namespace (a software flowtable): about 12% less router CPU per packet, and about a quarter more speed through a proxy on the router. Without kmod-nft-offload the old rules load and the service log says so - Its address at home stays the same when it is turned off and on again; it moved down by one each time (.254, .253, .252) - Less CPU for the same work: the background agent's once-a-second look at the tunnels, Status, Health and the portal no longer compile the same patterns again for each line, address and device. At idle the agent uses about a quarter of the CPU it did; a portal request 5-10 ms less - On LuCI's Bootstrap themes the admin looks as it does on Outline: cards and menus a step above the page, icon tiles that keep their colour, Outline's status colours in dark mode. The choices in Settings → Logs & history and Updates are LuCI's own controls in every theme - "Add from devices at home" keeps a device's name readable in a narrow window: its ports go under the name - DESIGN.md describes the portal's look, components and motion, and the rules send portal work there first. lint-ucode no longer ends a function at a brace inside a template literal
5.0 KiB
5.0 KiB
AGENTS.md — Dawnline
Guidance for coding agents working in this repository (tickcount/luci-app-dawnline): an AmneziaWG access server for OpenWrt with a LuCI admin UI and a personal portal. CLAUDE.md points here.
Rules
rules/code-standards.md— how all code is written: decomposition, one locked writer, fail closed, validation at the boundary, comments and commits.rules/backend.md— ucode on the router: module layers, conventions, what things cost there (CGI portal, rpcd, the agent's watcher).rules/frontend.md— TypeScript admin UI and portal: layout ofweb/src, pollers and the live revision.rules/shell.md— install, uninstall, init and CI scripts.rules/ui-design.md— how the admin UI and the portal look: modern product quality, mock first from the real CSS and components, verified in the browser.DESIGN.md— the personal portal's design system: tokens, components, layout and motion, measured on the live page. Read it before any work on the portal (web/src/portal, and what it uses fromweb/src/shared); a change to how the portal looks or moves updates it in the same change.rules/i18n.md— translations: every visible string and backend message wrapped, the catalogs, the Russian style guide and glossary. Anything added to the admin UI or the portal is localized in the same change; anything removed takes its catalog entries with it.
This repo usually sits inside the router-admin workspace (../AGENTS.md). Its rules apply to anything that touches the router: read-only first, backup before mutating, router shell as a literal stdin heredoc over SSH (../rules/).
Layout
package/luci-app-dawnline/root/— what lands on the router: ucode modules inusr/share/ucode/dawnline/(rpc/for the LuCI backend), the agent and updater inusr/libexec/dawnline/, the portal inusr/share/dawnline/portal/, the init script, rpcd ACL.web/— TypeScript sources of the admin UI (src/admin) and the portal (src/portal), shared code insrc/shared; the built bundles are committed underpackage/.web/i18n/— the string catalogs' tools (extract.ts,po.ts,lmo.ts).package/luci-app-dawnline/po/— the admin's catalog (templates/dawnline.pot,ru/dawnline.po): luci.mk builds theluci-i18n-dawnline-rupackage from it. The portal's catalog isweb/src/portal/i18n/ru.po, bundled into the portal.install.sh,uninstall.sh— the standalone installer and uninstaller (both have--dry-run).scripts/—lint-ucode.py,compile-ucode.sh(compiles every ucode file of a tree wherever ucode runs),check-ucode.sh(the same on the router, without installing),ucode-container.sh(compile and unit tests in the OpenWrt rootfs containers CI uses),deploy.sh(dev deploy over SSH),build-packages.sh,build-release.sh,release-notes.sh.tests/ucode/— unit tests of the ucode modules (run.ucruns every*.test.uc; fixtures for/etc/configand a stand-inawg), run in a container byrun.sh.
Checks before a commit or deploy
python3 scripts/lint-ucode.py(use before definition, exports, POSIX regexes, rpcd methods; layering notes are informational).scripts/ucode-container.sh(needs docker): compiles every ucode file and runstests/ucodeon OpenWrt 24.10 and 25.12, exactly what CI does.scripts/check-ucode.shcompiles on the router instead when there is no docker. New ucode entry points are added to the compile list inscripts/compile-ucode.sh, tolint-ucode.py, and to the executables list in.github/workflows/ci.yml; a pure function gets a case intests/ucode/<module>.test.uc.- In
web/:npm run format:check,npm run typecheck(sources and tests),npm run i18n:check(after changing visible text:npm run i18n, translate the new entries in eachru.po),npm test,npm run build— and commit the rebuilt bundles and the catalogs (CI fails on a changed or new file underpackage/). shellcheck -S warningfor the shell scripts (CI finds them by shebang).- A tag builds only after CI passes on it (
build.ymlcallsci.yml).
Releases
- A release is one commit on
maintitledDawnline X.Y.Z; its body is-points, which become the GitHub release notes and the Components "What's new". Work from a branch is squashed into that one commit. - Bump the version in
package/luci-app-dawnline/Makefile(PKG_VERSION),util.uc(VERSION),web/package.jsonandweb/package-lock.json(CI checks they agree). - No
Co-Authored-Byor other agent attribution in commits. - Push
main, then an annotated tagvX.Y.Z("Dawnline X.Y.Z"); the "Build packages" workflow publishes the.ipk,.apk(the app andluci-i18n-dawnline-ru) andsha256sums.txt. - Re-cutting a release (fixes before anyone installs) rewrites
main: force-push,gh release delete vX.Y.Z --cleanup-tag, cancel a running build of the old tag, tag again. Only with the user's go-ahead. - On the router, install a release the way Components does:
/usr/libexec/dawnline/updater install app@vX.Y.Z(verified against the release's sha256).