## Problem / 问题
After #701, doona reads proxy chains and keeps their references intact,
but it gives no way to see or build one. A chain row shows the raw
protocol `chain` and no hops. Adding or editing a chain means editing
the configuration text, because honk's `POST /nodes` only takes share
links.
## How I fixed it / 解决方法
Display:
- A chain row shows the protocol as "Proxy chain" (代理鏈 / 代理链).
- Its detail lists the hops from entry to exit, with each hop's protocol
and health, and marks a hop that is missing or ambiguous.
- UDP is shown as "No" with the reason when the hop protocols rule it
out. Otherwise it reads "depends on node settings", because the catalog
does not expose UDP flags.
- The node-level TCP connect test is hidden for chains, since honk
returns 422. Group latency no longer counts a chain member's
`no_node_address` row as a failure.
Editing:
- The add-node dialog has a "Proxy chain" mode with an ordered picker of
2 to 4 existing non-chain nodes. Hops can be added, removed and moved up
or down.
- Editing a chain reopens the same dialog. `appendChainEntry` and
`writeChainEntry` write the configuration text through source PUT.
- Before writing, the dialog checks hop count, self reference, direct,
block or chain hops, and the protocol position rules from honk's
`nodes.md` that the catalog can show. honk's diagnostics are shown for
everything else.
- Creating and editing chains is offered only when the engine is honk
and the main source is editable.
`writeNodeEntry` and `writeChainEntry` share one edit helper.
`SearchSelect` gains optional `error` and `action` props, so a hop's
controls sit beside its picker and its error spans the row. Other call
sites are unchanged.
Group `exit` editing, the rejected subscription refresh notice and the
manual pages follow in a stacked PR.
## Screenshots
| | |
|---|---|
|

|

|
|

|

|
|

|

|
|

|

|
All 32 variants (390 and 1280, en and zh-TW, light and dark) are kept
locally and available on request.
## Verified / 验证
- `pnpm typecheck`, `lint` (0 warnings), `check:i18n`, `format:check`,
`check:gen` and `build` all exit 0.
- `pnpm test` exits 0: 251 files, 4405 tests.
- `check:size`:
- Nodes route is 73162 B gzip against a 76000 B budget, up from 72320 B.
- The lazily loaded chain picker chunk is 812 B.
- Playwright `e2e/nodes.spec.ts` on chromium: 101 passed. The 6 other
specs that the new mock chain touched pass, but the full suite was not
rerun after the last change.
- A separate review ablated each key hunk, and every one is now caught
by a test.
Not verified:
- Writes against a live honk.
- Firefox and WebKit e2e.
Net shipped code is about 414 lines, over the 300-line feature budget.
The PR carries display, editing and the engine gate together; splitting
it is possible if wanted.
---
- [ ] I understand this change and answer for every line
- [x] This branch is based on the current main
- [x] I ran the repository's gates and recorded the results in Verified
- [x] Each commit is one coherent change
- [ ] If behaviour changed, I updated the documentation
- [x] If interface text changed, I updated `en.json` and every complete
language's catalogue
- [x] If interface appearance changed, I attached light and dark
screenshots
- [ ] If the API contract changed, I ran `pnpm gen:api` and `pnpm
check:gen`
- [ ] I checked the boxes above without reading them
- [ ] I am an AI agent, and this content was submitted without human
review
The connection detail panel listed about sixteen fields in one column,
each label above its value, many of them empty or unknown. It now groups
them into route, connection, traffic and source sections with the route
first, puts each value beside its label, leaves out fields a connection
lacks, and shows each traffic total with its rate. DNS and flow detail
panels use the same list.
A row under the chain names the subscription the node came from, read
from the nodes query the page already holds, and the connection filter
matches it. The demo's auto group flows now reach the subscription node
it selects.
honk reports the geodata update schedule as a cron expression and defaults to daily at 03:00. The settings page only knew the interval in hours, so it showed a nominal 24 hours, and picking an interval silently replaced the cron schedule.
A schedule of the form '0 H * * *' shows as an hour select. Any other expression shows read-only with a button that switches to daily. An interval schedule keeps its select and can switch to daily and back. An engine without the cron field gets the page it had.
The configuration export, import and revision routes, the export file
name, the store state, the restart command and the restart-only global
settings now come from src/api/engines instead of honk literals in the
app and in Lite.
- configOf(version) in engines/config.ts returns an engine's
configuration extension, or null for an engine without one; every
caller and the client methods take it, so an unknown engine offers
no configuration history and reports none of it off. The module does
not load the adapters, so the shell can use it at startup.
- Engine gains restartCommand and restartOnly. The restart notice and
Lite show the command only when the engine names one.
- Lite reads the version when Settings opens and takes the global
settings from engineOf; an engine doona does not know gets no forms.
- The suggested backend port is the native API's default, and the
retired API names that block sign-in are kept in one list.
Raises the startupActivity budget from 326250 to 326482 and routeConfig
from 196050 to 196062, with the owner's approval: the shell now asks
the engine whether it manages configuration, which adds 232 B to the
Activity start and 12 B to the config route (Node 22 gzip).
The demo reported honk v0.0.1.beta.81 and a honk/0.0.1-alpha subscription user agent. It now reports v0.1.0-beta.4, the release that embeds this doona, and honk/0.1.0, the user agent honk sends.
Remove the remaining dead lite helper and icon, 26 unused keys from each lite catalogue, and verified unconsumed exports. Keep live implementations and skip findings already addressed by round one.
Reject unavailable operations and invalid DNS-log source filters before state changes. Reuse endpoint parsing for bare and IPv6 addresses, and enforce DNS-log response budgets in UTF-8 bytes without serializing unlimited pages.
Cover capability refusals, address evidence and multibyte pagination. Keep contract traversal valid when a profile cannot start an operation, and clarify that generated DNS logs are samples rather than rule evaluations.
Lite kept a copy of the shared mock factory and swapped three of its
imports at build time. The shared factory now takes a fixtures option,
and lite passes its two extra subscriptions through it. The memoised
groupAdmits moves into src/dae/groupFilters.ts, and the demo no longer
rewrites config comments into Simplified Chinese.
Nodes from the node section have no subscription tag, as nodes the mock creates on activation already show, so manual-node group filters now match the seeded demo nodes.
createNode and createProvider inserted the entry only after an existing
`node {` or `subscription {` header. Without one the edit changed
nothing, the write still activated, and reading the new entry back
answered 404. A missing section is now appended at the end of the main
source, as a new group section is.
activateInventory parsed subscription blocks by hand to find tags and URLs while the routing step already used readSubscriptionEntries. It now reads the entries once and uses them for both.
Suspend, clear and switching to direct or global mode now ask first,
like reload does. Form errors show under the field they belong to, and
a disabled submit says why.
The startup budgets follow the size CI measures for this tree plus 0.3%:
login 239,900 and Activity 344,300 bytes gzip. CI builds about 0.7 KB and
1 KB larger than a local build.
honk masks listener secrets in a group's check_url as the literal
<redacted>, which SafeHttpUrl's format: uri rejects. GroupConfig.check_url
now reads as MaskedHttpUrl, and the check_url patch value says that a
test with the masked value fails with 409 and a write stores it as sent.
The mock pager answered every bad cursor with 400 invalid_request, except
flows (and dnsLog without a snapshot), which got 410. honk answers 410
snapshot_expired for an unknown, expired, exhausted, malformed or
noncanonical cursor and 400 invalid_request only for another page size or
other filters; flows also refuse an empty cursor with 400.
The pager now follows honk per resource: the same 410/400 split, the
page-grid and canonical-offset checks for nodes, providers and flows,
honk's eight held snapshots (oldest evicted, but a ninth DNS cache walk is
refused with 503 snapshot_unavailable), and a 400 for a noncanonical dnsLog
cursor. Tests cover each case in one table.
The trace form left pname out when the process field was blank, so honk treated
the process as unknown and every earlier pname() rule came back indeterminate,
even though forwarded LAN traffic, which has no process, routes fine. A blank
field now sends pname "", which honk evaluates as no process; the field says so.
The inline hk-01, hk-02 and sg-01 fixtures had no stream_transport, so the demo showed them without a transport until the configuration was applied, while honk reports tcp for these links.
Keep menu item identities stable as config-backed actions appear, and refresh config after node changes so editing does not require a reload. Separate menu choice IDs from internal commands and retain configured transports in demo nodes.
Display transport information reported by the backend while preserving protocol filters and compatibility with older responses. Keep XHTTP share links intact through node creation and editing.
Prepending live rows can move the viewport down while the user scrolls up. Yield anchoring during vertical wheel or touch movement and resume it after scrolling settles.
Seed the healthy demo with 200 visible Events and Logs records to exercise scrolling with a full table, and cover active and stationary anchoring.
A routing mode the backend refused only raised a toast with the error
count, so the reason and the line were lost; a refusal from the write
itself, which alone checks a file other than the main one, closed the
dialog. Both now keep the confirm dialog open and list each error in a
focused inline alert with the backend's words, by line in the file
being written and by file name and line in another file. Changing the
DNS choice or closing the dialog clears it.
Every routing mode with every option combination, with and without
the DNS split, is checked against the demo validator from a bare file
and from the demo configuration, and the DNS split may route only to
upstreams it declares.
Kit skeletons in one place: table placeholder rows at the real row height, block, rows, bars, fields and cards bodies, a fact strip loading state and a route-shaped PageSkeleton, all sharing the 150ms delay, one hidden status and still bars under reduced motion. The demo mock can hold calls with ?slow to show them.
Three widgets join the gallery of the dashboard and the panel, not the
default layout. Outbound failures ranks the outbounds whose failure
counter is above zero since counter_since, in their usage colours, and
says when none failed. Node availability counts each node once by its
preferred health: available of all, then unavailable and unmeasured
with a status light. DNS latency gives the median and p95 of lookups
that reached an upstream, a swarm of them, and one strip per upstream
when tall or large; under five such lookups it shows the count alone.
Each offers only the sizes it fills: no small outbound failures, no
large node availability, and no upstream strips in the key-value form.
A dot chart without rows takes the chart heights. The gallery falls
back to samples when live data has no failure or too few lookups, and
the demo now counts failures on two outbounds. Hidden-dot counts in a
swarm closer than a label's width share one label instead of
overprinting.
With an eBPF datapath the kernel forwards some direct connections on its own,
and a backend that observes traffic only in userspace leaves their bytes out of
the rates, the traffic history and the connection figures. When the runtime
reports traffic.observed_by userspace on an eBPF datapath, the Activity traffic
chart and the Connections traffic view now carry a help popover beside their
titles that says so. Mixed or eBPF observation shows no hint. The demo runtime
reports userspace observation, as honk does.
The geodata details list when the last update attempt finished and when
the next automatic one is due, from last_checked_at and next_check_at.
The demo's last check is moved to this morning so its next check lies
ahead.
The cache tab gains a Show expired switch that sends include_expired=true
on every page of the walk and keys the listing by it. A walk with expired
entries no longer stands in for the usage read. The demo backend hides
expired entries unless asked and carries one expired entry.
The rates widget's sparkline form stacked one sparkline per direction,
which with the panel's other default widgets overflowed its default
height. It now draws both in one plot on a shared scale with the Traffic
chart's component, without axis labels, at the height of one sparkline.
Combine upload and download charts in the panel menu, on by default,
restores the two sparklines.
The demo's upload rate swells on its own period and phase, so its curve
no longer copies download's.
The latency card's history moves from a module map into the persisted
ring store, keyed by group and node with the CPU ring's retention, so a
return visit or the dashboard editor shows the line at once. A card that
opens with fewer than two readings brings one node list read forward an
event gap after its first; steady polling is unchanged. The mock repeats
its first stream's opening ready a second later, so a first demo visit
draws CPU and latency within two seconds.