Commit Graph
174 Commits
Author SHA1 Message Date
Zakk dce69c22a8 refactor(settings): route backend actions to their owning pages 2026-10-02 02:41:08 +10:00
Zakk a5ae0689b0 fix(api): align honk v2.2 behavior and demo contracts
Report source read-only reasons and remove the obsolete destination policy error. Keep port zero invalid and describe independent recorder demand and grace.

Align demo recording, group identity, URL display and error precedence with honk df4801cc8. Vendor its native API fixture and regenerate types; retain the release binary pin because contract checks do not use it.
2026-10-02 00:07:03 +10:00
Zakk e900d6ac7b feat(appearance): allow node flag overrides
Expose a searchable Flag field in node details and the row action menu. Persist display overrides by node name and update shared views immediately.
2026-10-01 21:48:41 +10:00
Zakk 3003b70013 feat(appearance): show country flags by default
Share the Policies region detector with bounded flag lookups, and render added flags as unselectable, hidden decoration. Keep real names in clipboard content, accessible names, overflow tooltips, searches and configuration writes.

Declare node names explicitly across tables, policy members, pickers and chart labels. Enable decoration unless the browser stores an explicit off preference. Use one spacing token, give light flags a subtle edge, and explain the preference in all three languages.
2026-10-01 21:48:41 +10:00
Zakk 31597018aa fix(mock): keep demo selections and scenario assertions consistent 2026-10-01 17:09:32 +10:00
Zakk 8c044b0bde chore(mock): seed the demo from the regions routing template
Derive groups, policies and routing from writeTemplate. Keep gaming, office for a fixed work exit and backup for every node in the harbor subscription beside the template.

Resolve nested defaults consistently when the mock starts and reloads.
2026-10-01 17:09:32 +10:00
Zakk 52197023d8 feat(activity): guide first-run setup
Guide new installations through adding subscriptions or proxy nodes, choosing
routing and checking the selected connection. Evaluate written configuration
as a whole so DNS rules stay separate and presets survive split includes.

Remember completion or dismissal, then release the setup resource leases.
Use the kit close control with the existing localized accessible name.
2026-10-01 13:19:33 +10:00
Zakk 72472849dc fix(errors): explain configuration refusals by honk's reason
honk names why it refused a configuration write in details.reason. Map
each reason to a translated sentence and show it once without a second
prefix. When a configuration write carries no reason or an unknown one,
show the backend's message as is; other 403s keep the localized text.
2026-10-01 12:15:35 +10:00
Zakk b304c2ada3 feat(settings): choose the page doona opens at startup
Let users choose a main navigation page for bare URLs and the destination
after connecting their first backend. Keep Activity as the default and
preserve explicit routes through sign-in.

Use the existing preference storage for one page value. Drop last-page
tracking and ignore its previously stored value; each page already has a
shareable URL.
2026-10-01 12:07:21 +10:00
Zakk 52ecf9bbdb fix(rules): match every keyword in demo routing traces
Parse quoted domain arguments separately so multi-keyword rules use OR
matching in the demo. Reuse the DNS keyword labels in both Chinese locales.
2026-10-01 11:59:14 +10:00
Zakk cb015fa35c feat(dns): add a bypass cache query switch
Allow DNS queries to bypass cached answers while keeping normal mode as
the default. Pass the selected cache mode through every record type batch
and make the demo backend respect the same choice.
2026-10-01 11:59:14 +10:00
Zakk a476e1589d feat(rules): add domain keyword conditions
Expose domainKeyword in the routing editor and traffic add-rule flows so
keyword matches can be written through the same path as suffix and full.
Preserve keyword expressions when reading rules and round-tripping seeds.
2026-10-01 11:59:14 +10:00
Zakk dddc30e90b feat(activity): show the latency of a policy group's active node
The card followed the first measured node. It now shows the node a
policy group is using and its latency: by default the group with the
most connections, or one the user picks, remembered per browser.
2026-10-01 09:21:23 +10:00
Zakk e07792ae39 fix(events): defer count and revision formatting to the translator
Pass dropped counts as exact bigints and revisions as numbers so the
translator owns their language and grouping. Reuse its Params type.
2026-10-01 04:38:47 +10:00
Zakk 41bd366fdf feat(nodes): show an empty state with no subscription or node
When both lists load with no subscription and no node beyond the
built-in outbounds, the Nodes list gives way to the kit empty state: one
sentence, Add subscription as the primary action and Paste node link
beside it, so the two ways in stay reachable without the tables.
2026-10-01 03:19:38 +10:00
Zakk f5811614bd feat(nodes): set a subscription's download route
honk reads a route on each subscription entry (routing, direct or a
group), and the providers list reports it, but the edit dialog had no
control for it. Edit subscription now offers the route when the engine
reports one, writes it into the entry, and removes it when set back to
the routing rules. In the old block form a new route replaces
download_detour, since honk refuses an entry with both. The add dialog
has no route because create_options does not list one.

The demo backend reports each subscription's route.
2026-10-01 00:23:15 +10:00
Zakk 2d7c6762b6 refactor(api): read log levels, event kinds and policy kinds from one list
The log level order was written out in five places, one of them reversed,
and the event kinds and policy kinds were re-listed beside the label maps
that already hold them. selectors.ts now exports logLevels in contract
order and derives eventKinds from eventKindLabels; the logs page, the
heatmap, the settings form, the flow demand check and the demo backend
read those instead of their own copies.
2026-10-01 00:09:39 +10:00
Zakk cef75c26d1 fix(settings): sign out of a profile connected with a saved token
Sign-out only appeared for a password session, so a profile that
connects with a saved token had no way out short of clearing the field
or deleting the profile. Settings now offers the same button there: it
removes the token from the profile, keeps the address, and reloads to
the sign-in page. Nothing is sent to the backend, because a token is a
configured secret rather than a session; a help line says so.

Password sign-out also drops a saved token after closing the session,
since the client falls back to that token and would sign the tab
straight back in.
2026-09-30 23:43:23 +10:00
Zakk 8ef10ae7a1 fix(api): pin history keys, older DNS page limits and backend code lookups
Chart history was stored under the key of the profile last saved in any
tab, while the client stays on the profile this tab opened with, so
another tab's edit sent this tab's samples into a different history. The
key now comes from pinnedProfile's id and api.

An older DNS log page was asked for at the head page's current limit. A
cursor is bound to the limit it was issued with, so after the head fell
back to a smaller page the next older page was refused. It now sends the
limit of the page that issued the cursor.

Backend codes such as constructor found inherited properties in the
message tables and threw; lookups are own-property only.
2026-09-30 22:58:45 +10:00
Zakk bd6f8b4e07 fix(demo): trace negations, write group defaults natively, recheck replace hash
The demo trace threw on a negated condition such as !domain(...) or on a
bare condition the validator accepts; it now inverts a leading ! and
reports anything it cannot read as indeterminate.

patchGroup wrote default_member_id and final_outbound into the native
text, so a later edit of default: lost to the stale API key on reload.
They now go through writeGroupEntry as default and final.

replaceConfigSource checks the source again after storing, so a
concurrent write returns 412 instead of being overwritten.
2026-09-30 22:58:45 +10:00
Zakk 9b54b63279 fix(events): name the queued operation status
honk reports an operation as queued before it runs, but only running,
succeeded and failed had labels, so Events showed the raw word
`queued` in every language. The statuses are read from one label table
through enumLabel, with ov.queued added to all three catalogues.
2026-09-30 22:48:38 +10:00
Zakk 1cb5f7c47d fix(api): leave a password session's end to the backend
The tab compared the session's expires_at with the browser clock. A router
without an RTC can run 12 hours or more behind the browser, so a token it had
just issued already looked expired: requests went out without a bearer, got 401
and returned to the sign-in page in a loop. The backend's 401 already ends a
lapsed session, so stop storing and checking the expiry in the browser.
2026-09-30 22:40:52 +10:00
Zakk 9d4b40aa8e feat(policies): edit a group's default member and final outbound
The Configuration list showed both settings read-only, so changing them
meant opening the editor. The Edit group dialog now offers them under the
filters and writes them as the group's default and final keys, through
the same source write, validation and reload as the policy and filters.
The Configuration list gets an Edit group button that opens the dialog on
these fields.

Both are searchable pickers. The final outbound lists None, direct and
block, the groups that would not lead back to this one through nesting
or finals, and every node with its latency; the default member lists the
group's direct members. honk reads default only under manual selection,
so the default member picker follows the policy selected in the dialog;
while it is hidden, the save leaves the file's default line as written.
The Activity node menu's search and virtual list move into the kit as
SearchList, which the new SearchSelect reuses.

The demo backend reads default and final, and like honk reports a default
member only where default names one, instead of deriving it from
fixed(0). The demo proxy group names hk-01 so the list and the dialog
agree.
2026-09-30 16:28:55 +10:00
Zakk d1bda2b9b3 fix(events): keep a malformed time on an unknown event out of the feeds
An event of an unknown kind whose observed_at was not a string reached the events page, where the time column tried to render the value itself. Such a time is now replaced with an empty string, which the page shows as a dash.
2026-09-30 12:25:23 +10:00
Zakk 4ebc497d3d fix(events): pass events of unknown kinds on to the feeds
The event stream dropped any kind outside eventKinds, so eventSummary's default branch for kinds from a newer backend was never reached. Frames of unknown kinds now reach the feeds when their payload is an object; the events page shows the raw kind and the resource the event names.
2026-09-30 12:25:23 +10:00
Zakk c3e48a2798 refactor(i18n): name placeholders and ambiguous labels by what they mean
{t}, {id}, {src}, {down} and {up} become {time}, {resourceId},
{connectionId}, {operationId}, {groupId}, {requestId}, {source},
{download} and {upload}, so a translator sees what each one holds.
The English for config.openSource and rule.openSource now says what
is opened; the Chinese already did.
2026-09-30 03:25:28 +10:00
Zakk 5962dfb071 fix(i18n): translate demo validation diagnostics by code
The demo validator wrote English sentences as diagnostic messages, and the
editor marks showed them as sent. Demo diagnostics now carry their code
and the values they name as params, and rows and editor marks share one
presenter that keeps any backend words as the detail.
2026-09-30 02:55:31 +10:00
Zakk e320195747 refactor(api): carry request IDs as error metadata
Toasts dropped the request note by matching request_id in the already
translated text. The ID now travels with the error and the notice, the
caller decides whether to show it before formatting, and a toast logs it
instead. What users see is unchanged: toasts without the ID, inline and
detail views with it.
2026-09-30 02:37:28 +10:00
Zakk cca31f3323 fix(dns): restart older pages on snapshot_unavailable at the same limit 2026-09-30 00:42:43 +10:00
Zakk 6c9bb3744c fix(api): finish the contract type migration 2026-09-30 00:42:43 +10:00
Zakk 2d645ce4de feat(api): report degraded and unknown activation outcomes 2026-09-30 00:42:43 +10:00
Zakk 0b88e8aa63 fix(settings): read geodata bounds from capabilities 2026-09-30 00:42:43 +10:00
Zakk eb01df6a87 feat(nodes): accept asynchronous node and provider writes 2026-09-30 00:42:43 +10:00
Zakk ee311b2032 fix(settings): follow the final recorder and settings shapes 2026-09-30 00:42:43 +10:00
Zakk ad11f65190 fix(probes): stop sending the probe purpose 2026-09-30 00:42:43 +10:00
Zakk 933c8d8320 feat(policies): edit groups through the config resource 2026-09-30 00:42:43 +10:00
Zakk cc59eadbdb fix(config): drop the withheld-content states 2026-09-30 00:42:43 +10:00
Zakk fdd0fae92a refactor(api): invalidate by the contract's event table 2026-09-30 00:42:43 +10:00
Zakk b42671329f fix(api): follow the final error and paging codes 2026-09-30 00:42:43 +10:00
Zakk d37a778fa6 feat(api): select the engine by version.engine.name 2026-09-30 00:42:43 +10:00
Zakk cf5a033a0c chore(api): pin api-standardize 1fb08ad 2026-09-30 00:42:43 +10:00
Zakk 090e1d4d24 fix(nodes): measure latency through the node over HTTP
tcp_connect only reaches the node's server endpoint, which Hysteria2 and TUIC never accept over TCP. Probe over HTTP to the configured check URL, as honk's own health check does, and fall back to tcp_connect when HTTP is not offered. Prefer a measurement through the node when ranking health, fold IPv4 and IPv6 rows with one rule shared by the table and the toast, and translate probe reasons instead of showing the code.
2026-09-29 23:05:03 +10:00
Zakk aec2ebae90 feat(rules): prefill the trace from a link and trace a connection
The trace tab reads its target, port, network and source IP from the
address, so a link fills the form in; the person still runs it. The
connection detail opens it for the shown connection.
2026-09-29 07:53:04 +10:00
Zakk cb48040a77 feat(overview): show hooks the engine does not check as not verified
honk attaches the cgroup, sk_lookup and dae0peer hooks without reading
them back, since that takes a BPF_PROG_QUERY per hook or a switch into
the daens namespace, so it reports the hooks value as unknown. The
page showed that as a plain Unknown with the generic explanation.

The engine adapter now lists the hooks it does not check. When it
lists any, an unknown hooks value reads as Not verified and the hooks
row explains why. Attachment rows are unchanged: honk lists only the
TCX hooks there, each checked as attached or detached. An engine doona
does not know keeps the current wording.
2026-09-29 02:50:03 +10:00
Zakk c8cea51f1c fix(rules): show the query-mode DNS answer apart from the simulations
Query mode ran a DNS query, then one trace per simulated address, and
merged them into a single trace response with DNS evidence built from
the query. The page read as one backend-confirmed trace although the
query and the simulations are separate requests.

routingTrace now returns the query and the traces as they came. The
page shows the query first in one card titled with the queried name,
with a row per record type giving its answers and the address that
type simulated, and the status line gives the query time beside the
simulation time. Literal-IP and none runs are unchanged.
2026-09-29 02:50:03 +10:00
Zakk 1ea37b28fc fix(api): send Idempotency-Key only on operation starts
The client sent a key on every control write and replayed any keyed write
after a 429 or 503. The contract replays a repeated key only for operation
starts, the calls that can answer 202; both connection DELETEs and the
runtime settings PATCH accept a key but run again, so a refused bulk close
could close a second, different set of connections.

Operation starts now go through a second client typed to the paths and
methods whose contract responses include 202, and a middleware gives each
of those calls a fresh key. Synchronous writes carry no key and surface a
refusal instead of retrying.
2026-09-29 02:20:03 +10:00
Zakk 4294b06b33 fix(activity): read the outbound mode only on an engine whose syntax doona writes
The mode card read the outbound mode from the main source's text and
wrote it back as a dae routing rule on any engine. An engine doona does
not know may use another syntax, where the inferred mode is meaningless
and the write would corrupt its configuration. Engines now say whether
their configuration is dae text; honk does, an unknown engine does not,
and for the latter the card shows the mode as not provided. Until the
version names the engine, the card waits as it does for the configuration.
2026-09-29 01:37:52 +10:00
Zakk a107068d13 fix(dns): start from the newest page when an older-page cursor expires
A backend drops a log snapshot when it expires or is evicted and then
answers the older-page cursor with 400 invalid_request. The page showed
that as an error whose Retry asked for the same cursor again, which could
never succeed. That refusal now drops the held pages, reads the newest
page again and says so in a short notice; any other error is still shown.
2026-09-29 01:37:52 +10:00
Zakk d5d6ac2c73 fix(store): read baselines after stream.ready and carry flow demand on one stream
Resources read their first snapshot as soon as they were watched, so a
change that landed between that read and the event stream attaching was
never seen by event-only resources such as config and rules. The first
read now waits for the stream's first stream.ready, as the events
contract asks. Where no stream is coming (unavailable, refused, or
silent for five seconds, as behind a buffering proxy) it starts anyway;
while a stream stays silent the event-only resources poll every 30
seconds, and the ready that ends the silence reads the baselines again.

Flow demand opened a second events stream with kinds=flow.gap, which
counted against max_clients, dropped its refusal, and skipped backends
that list flow.updated but not flow.gap. The shared stream now names
its advertised kinds while a page holds the demand and resumes from its
last event id. The filter changed, so the ready that follows reads again
what the flow kinds invalidate; a refused cursor reads everything. The
mock binds an omitted kinds list to the same cursor as the full list,
as honk does.
2026-09-28 21:30:19 +10:00
Zakk 4fee0ea1fa refactor(api): drop stale type overrides
The contract now declares RuleSource.source_id as required, so the
optional override in model.ts only weakened it. The DNS log query's type
is a plain string, so the cast to never hid nothing.
2026-09-28 21:03:45 +10:00