2130 Commits
Author SHA1 Message Date
Markson Hon 42ebb2968e Merge pull request #2004 from Zakkaus/readme-ru
docs: a Russian README
v2.5.1
2026-09-20 08:16:09 +08:00
Markson Hon 502716da00 Merge pull request #2003 from Zakkaus/hard-3-gui
gui: group members kept their subscription, keyboard-reachable settings rows, DNS rules keep their fields, WireGuard fields, SSR tab removed
2026-09-20 08:11:31 +08:00
Zakk 4e057909c6 docs: a Russian README
The GUI has shipped a Russian locale for years; the README did not. A
translation of the English file with the same structure and links, its
terms taken from the GUI's ru.js; the language line of all three
files points at all three.
2026-09-20 10:04:33 +10:00
Zakk 38f671a01e fix(gui): the status button keeps one width whatever it says
Its label changes between 就绪, 正在运行 and the hover text (启动/关闭),
so the group selector beside it moved every time and the two ended up
touching. Every label the button can show is laid out in the same grid
cell, visible or not, and the button takes the widest.
2026-09-20 10:04:29 +10:00
Zakk c818f01bf9 fix(gui): the RoutingA list tells a direct rule from a proxied one
Both outbound chips were tonal and, on the default seed, the same
beige; the text view colours the outbound. A direct rule's chip is
outlined and neutral, a proxied one tonal in the primary colour, block
stays red.
2026-09-20 10:04:29 +10:00
Zakk b03da1772d fix(gui): a backend that is slow to answer leaves a retry instead of a blank page; three smaller GLM findings
The login bootstrap retried only network errors; a timeout or an HTTP
error on the first request returned without a dialog, a notice or a way
back short of reloading. Timeouts are retried like network errors, and
when the retries are spent a banner names the address and carries a
retry.

A settings save the backend rejected kept the rejected values in the
form, so the next save resent them; the form reloads what is stored.
The "members only" chip on the proxies page was not focusable. A
WebSocket frame that is not JSON threw inside the handler.
2026-09-20 10:04:29 +10:00
Zakk 58291ba0d9 fix(gui): an edited DNS rule wins over its migrated alias
Keeping every stored field of a rule also kept upstream and domain, the
migrated aliases of server and domains that the generator prefers, so
an edit to the visible fields did not reach the running configuration.
The aliases fold into the form and are not sent back. The two SSR-only
locale keys are gone.
2026-09-20 10:04:29 +10:00
Zakk 98f97b9c6e fix(gui): the app-bar start button keeps the paused state the touch reports
After a start from the app bar the confirmed state came from a touch,
but only its running flag was read: a core whose network is paused was
shown as running. The state is derived the way the dashboard derives
it.
2026-09-20 10:04:29 +10:00
Zakk c99a2a71b1 chore(gui): the SSR editor tab, model, codec and fixtures go with the protocol
ShadowsocksR is no longer supported by the service; the editor has no
SSR tab and the share-link codec no longer knows the scheme. A stored
node the service still lists cannot be opened for editing, which the
editor reports and closes.
2026-09-20 10:04:29 +10:00
Zakk 3fc5748ed8 fix(gui): the WireGuard editor carries the fields the backend reads, and a node that fails to load is not saved over
The WireGuard form had DNS and Endpoint inputs that no share link and
no backend field carries, while workers, reserved and kernelMode —
which the backend parses and exports — were dropped on every edit. The
form now has the three real fields and the codec round-trips them.

When a node's link could not be loaded, the editor stayed open on a
default VMess model; saving replaced the node the user meant to edit.
The dialog now closes with the error.
2026-09-20 10:04:28 +10:00
Zakk af7c1475dd fix(gui): settings action rows work from the keyboard, DNS rules keep their module fields, the log buffer is bounded
The action rows on the settings page (RoutingA, ports, DNS, custom
inbounds, TUN, About) were list items with a click handler but no link
role, so they took no focus and Enter did nothing. They are links now.

The DNS dialog rebuilt each rule from its three editable fields, so a
save dropped the matchers the DNS module reads and only the API sets
(ip, queryType, clientIP, action, policy). The rows keep every field
they came with.

The log stream kept every line since the page opened; it keeps the last
20000. The GFWList hint condition was named as if it meant stale; it
means the local file's date is ahead of the remote one, which is what
the text explains.
2026-09-20 10:04:28 +10:00
Zakk a89d43a0b1 fix(gui): the group member list keeps each subscription server's subscription
The dashboard's touch rows do not carry a subscription server's index,
so the member dialog keyed every subscription row as subscription 0: a
member of the second subscription showed unchecked, nodes with the same
id in two subscriptions shared one checkbox, and Save re-pointed every
chosen node at the first subscription's node with that id.
2026-09-20 10:04:28 +10:00
Zakk 67ed53fc9c fix(serverObj): two link shapes from the discussions
A VLESS or VMess link with type=raw — xray's new name for the tcp
transport — was rejected with "unexpected transport type: raw"
(discussion #1999). A vmess JSON whose port, aid or v is a number was
dropped as "not a JSON object"; v2rayN writes strings but most other
exporters write numbers, and one public subscription lost 152 of its
1625 nodes to it (#1957).
2026-09-20 10:04:25 +10:00
Zakk 84df3c26f1 fix(service): the findings of a cold read of the refactor and the scan fixes
Deleting nodes stored the renumbered connections, the subscriptions and
the servers in three commits; they are one transaction. Without a
catch-all DNS rule the module keeps its own fallback, as every earlier
release did. The login body is capped at 4 KiB, since it is now read
before the one-at-a-time semaphore. The apply-config error names a
failed restore, so every handler's message says whether the previous
value came back. The Windows system proxy reuses a snapshot pending
from an earlier run instead of refusing to start.
2026-09-20 10:04:24 +10:00
Zakk cb24e72381 fix(windows): the system proxy restores every user profile to its own settings
When elevated, saveProxyState captured the first readable profile's
proxy values and stopped, then the restore wrote those values into
every profile: users with different proxy settings got the first
user's, or none. The snapshot now holds one entry per SID (the current
user under "" when not elevated); restore writes each profile its own
values, a profile written at setup but not captured is left with the
proxy disabled, and a snapshot from an earlier release (one flat
profile) still restores the way it did.
2026-09-20 10:04:24 +10:00
Zakk 23a7c69eee fix(service): every state-changing handler takes the mutation turn; a truncated link cannot panic the parser
PostImport, PutPorts, PutDnsRules, PutRoutingA, PutGFWList,
DeleteGFWList, PutDomainsExcluded, PutTproxyWhiteIpGroups, PostOutbound
and PutOutbound wrote the store and regenerated the core outside the
mutation turn, so two of them could interleave core restarts with each
other or with a latency test. They take it like the rest.

ParseSSURL and ParseVmessURL sliced past the end of a link shorter than
its scheme prefix ("ss:", "vmess:x"), a panic reachable from a
subscription line.
2026-09-20 10:04:24 +10:00
Zakk ae58240c71 feat!: ShadowsocksR is no longer supported
The core has no ShadowsocksR outbound and the plugin that once served
one was removed in May, so every SSR node has been dead since. Instead
of keeping a protocol that cannot connect: an ssr:// link is refused at
import with "ShadowsocksR is not supported" and the Clash converter
skips ssr entries. A node stored by an earlier release still decodes so
it keeps its place in the list and its group ordinal; it shows as
"SSR (unsupported)", cannot be configured and can be deleted. Both
READMEs list the protocols the current core actually speaks. The GUI
side of the removal is in the GUI change that follows.
2026-09-20 10:04:24 +10:00
Zakk a45d2baafc fix(service): the confirmed findings of four independent backend scans
A custom latency test URL that http.NewRequest rejects made a spawned
goroutine dereference nil and exit the process; the URL is validated
before any goroutine starts and the request error is handled. A
Shadowsocks link whose plugin field has no ";" panicked the parser, and
from the automatic subscription update that goroutine was unrecovered;
the parser accepts it and each updater recovers and logs.

The DNS module took the last non-bootstrap upstream as the fallback
while the template emitted upstreams in rule order with deduplication,
so a catch-all rule anywhere but last, or one whose upstream was
deduplicated, was not the fallback. The template names the fallback in
a new default_upstream field and the module honours it.

PUT /routingA stored the rules without regenerating the running core.
It goes through ApplyCoreConfig like the other config writers, with
restore on failure. UpdateSubscription logged a failed core reload and
answered success; it returns the error. PATCH /subscription joins the
mutation turn.

Subscription fetching retried through a direct connection when the
selected proxy failed, leaking the subscription URL; it returns the
error. Subscription documents are capped at 32 MiB and downloaded
assets at 256 MiB. PUT /gfwList validates the downloaded file as a
geosite list before replacing the working one.

The login handler took its one-at-a-time semaphore before reading the
body, so a client sending headers and no body blocked every login; the
body is read first and the HTTP server has header and idle timeouts.

Share links: a VLESS or VMess link without a numeric port is rejected
at parse time instead of producing port 0; an SSR link with a password
that is not base64 is rejected instead of importing empty; the SIP003
path gets its leading slash prepended, not a trailing one appended.

The macOS system proxy quoted shell arguments with strconv.Quote,
which leaves $(...) live; values are single-quoted. The Windows system
proxy snapshot includes AutoConfigURL, which teardown deleted and never
restored. Latency test responses with a non-2xx status are closed. The
version response carries the docker flag the GUI's port hints read.
2026-09-20 10:04:24 +10:00
Zakk 160a97c8d6 fix(serverObj): HTTP proxy nodes use the core's http outbound; SSR nodes say they are unsupported
Commit 0baefc45 (2026-05-03) removed the plugin layer under
service/pkg/plugin and the code that started a plugin per node, but
left the HTTP and ShadowsocksR node types producing what that layer
consumed: a socks outbound to 127.0.0.1:<plugin port> plus a plugin
chain nothing reads. Every http/https proxy node and every SSR node
imported since then connected to a closed local port.

HTTP and HTTPS nodes now produce the core's native http outbound with
the credentials and, for https, TLS to the server name; they no longer
ask for a plugin port. The core has no ShadowsocksR outbound, so an SSR
node's configuration returns an "unsupported" error the latency test
and the automatic selection already understand; the node still parses,
displays and exports so nothing is lost from the store.
2026-09-20 10:04:24 +10:00
Zakk 9b97bc1d37 refactor(service): one apply-config path, NodeRef as a node's identity, typed SQLite stores
Three structural changes that share files, so one commit:

Settings, ports, DNS rules and custom inbounds each carried their own
copy of "store the new value, regenerate the core config, put the old
value back when that fails", and the outbound setting path had no
restore at all. ApplyCoreConfig takes a snapshot function and a store
function and does the sequence once for all five callers; the outbound
setting path restores like the others, and the error names which of
the three steps failed.

configure.Which was the persisted discriminator, the key that locates a
node, and the response row with its latency, link and selected flag at
once. NodeRef {type, id, sub, outbound} is the identity used by the
locator, EqualTo, the connected lists and the group operations; Which
embeds it and keeps the status fields. The JSON stays byte for byte
what it was (a test marshals a fixture before and after), stored
connected lists decode unchanged, and deduplication keys by identity
instead of by the whole row.

db.List* dispatched on "bucket/key" string literals to reach the
servers and subscriptions tables. The bodies are now Servers* and
Subscriptions* functions that configure calls directly; the List*
wrappers remain for the migration.
2026-09-20 10:04:24 +10:00
Markson Hon 97a2f6b7fa Merge pull request #2002 from Zakkaus/hard-2-service
service: HTTP proxy nodes dead since May, SSR removed, 20 scan findings, apply-config path, NodeRef
2026-09-20 08:04:20 +08:00
Zakk 1c7bd2de28 install: the OpenRC script gives the service time to stop and cleans an orphaned core
OpenRC's default stop escalates after a few seconds; the service stops
its core and removes the transparent-proxy rules on SIGTERM, so it gets
30 s before KILL. stop_post kills a core the service could not stop (it
had been killed), which would otherwise keep the inbound ports and fail
the next start. The log and config directories are created with
checkpath, the service is ordered after the firewall units, and the
per-user script creates its config directory the same way.
2026-09-20 10:04:20 +10:00
Zakk 61df71b0a4 fix(serverObj): two link shapes from the discussions
A VLESS or VMess link with type=raw — xray's new name for the tcp
transport — was rejected with "unexpected transport type: raw"
(discussion #1999). A vmess JSON whose port, aid or v is a number was
dropped as "not a JSON object"; v2rayN writes strings but most other
exporters write numbers, and one public subscription lost 152 of its
1625 nodes to it (#1957).
2026-09-20 09:59:30 +10:00
Zakk 2d16a92bbb fix(service): the findings of a cold read of the refactor and the scan fixes
Deleting nodes stored the renumbered connections, the subscriptions and
the servers in three commits; they are one transaction. Without a
catch-all DNS rule the module keeps its own fallback, as every earlier
release did. The login body is capped at 4 KiB, since it is now read
before the one-at-a-time semaphore. The apply-config error names a
failed restore, so every handler's message says whether the previous
value came back. The Windows system proxy reuses a snapshot pending
from an earlier run instead of refusing to start.
2026-09-20 09:59:29 +10:00
Zakk 6d744139d4 fix(windows): the system proxy restores every user profile to its own settings
When elevated, saveProxyState captured the first readable profile's
proxy values and stopped, then the restore wrote those values into
every profile: users with different proxy settings got the first
user's, or none. The snapshot now holds one entry per SID (the current
user under "" when not elevated); restore writes each profile its own
values, a profile written at setup but not captured is left with the
proxy disabled, and a snapshot from an earlier release (one flat
profile) still restores the way it did.
2026-09-20 09:59:29 +10:00
Zakk b1ca0c6edc fix(service): every state-changing handler takes the mutation turn; a truncated link cannot panic the parser
PostImport, PutPorts, PutDnsRules, PutRoutingA, PutGFWList,
DeleteGFWList, PutDomainsExcluded, PutTproxyWhiteIpGroups, PostOutbound
and PutOutbound wrote the store and regenerated the core outside the
mutation turn, so two of them could interleave core restarts with each
other or with a latency test. They take it like the rest.

ParseSSURL and ParseVmessURL sliced past the end of a link shorter than
its scheme prefix ("ss:", "vmess:x"), a panic reachable from a
subscription line.
2026-09-20 09:59:29 +10:00
Zakk 9cae52b9d1 feat!: ShadowsocksR is no longer supported
The core has no ShadowsocksR outbound and the plugin that once served
one was removed in May, so every SSR node has been dead since. Instead
of keeping a protocol that cannot connect: an ssr:// link is refused at
import with "ShadowsocksR is not supported" and the Clash converter
skips ssr entries. A node stored by an earlier release still decodes so
it keeps its place in the list and its group ordinal; it shows as
"SSR (unsupported)", cannot be configured and can be deleted. Both
READMEs list the protocols the current core actually speaks. The GUI
side of the removal is in the GUI change that follows.
2026-09-20 09:59:29 +10:00
Zakk ad509ce51b fix(service): the confirmed findings of four independent backend scans
A custom latency test URL that http.NewRequest rejects made a spawned
goroutine dereference nil and exit the process; the URL is validated
before any goroutine starts and the request error is handled. A
Shadowsocks link whose plugin field has no ";" panicked the parser, and
from the automatic subscription update that goroutine was unrecovered;
the parser accepts it and each updater recovers and logs.

The DNS module took the last non-bootstrap upstream as the fallback
while the template emitted upstreams in rule order with deduplication,
so a catch-all rule anywhere but last, or one whose upstream was
deduplicated, was not the fallback. The template names the fallback in
a new default_upstream field and the module honours it.

PUT /routingA stored the rules without regenerating the running core.
It goes through ApplyCoreConfig like the other config writers, with
restore on failure. UpdateSubscription logged a failed core reload and
answered success; it returns the error. PATCH /subscription joins the
mutation turn.

Subscription fetching retried through a direct connection when the
selected proxy failed, leaking the subscription URL; it returns the
error. Subscription documents are capped at 32 MiB and downloaded
assets at 256 MiB. PUT /gfwList validates the downloaded file as a
geosite list before replacing the working one.

The login handler took its one-at-a-time semaphore before reading the
body, so a client sending headers and no body blocked every login; the
body is read first and the HTTP server has header and idle timeouts.

Share links: a VLESS or VMess link without a numeric port is rejected
at parse time instead of producing port 0; an SSR link with a password
that is not base64 is rejected instead of importing empty; the SIP003
path gets its leading slash prepended, not a trailing one appended.

The macOS system proxy quoted shell arguments with strconv.Quote,
which leaves $(...) live; values are single-quoted. The Windows system
proxy snapshot includes AutoConfigURL, which teardown deleted and never
restored. Latency test responses with a non-2xx status are closed. The
version response carries the docker flag the GUI's port hints read.
2026-09-20 09:59:29 +10:00
Zakk 21948e1fd7 fix(serverObj): HTTP proxy nodes use the core's http outbound; SSR nodes say they are unsupported
Commit 0baefc45 (2026-05-03) removed the plugin layer under
service/pkg/plugin and the code that started a plugin per node, but
left the HTTP and ShadowsocksR node types producing what that layer
consumed: a socks outbound to 127.0.0.1:<plugin port> plus a plugin
chain nothing reads. Every http/https proxy node and every SSR node
imported since then connected to a closed local port.

HTTP and HTTPS nodes now produce the core's native http outbound with
the credentials and, for https, TLS to the server name; they no longer
ask for a plugin port. The core has no ShadowsocksR outbound, so an SSR
node's configuration returns an "unsupported" error the latency test
and the automatic selection already understand; the node still parses,
displays and exports so nothing is lost from the store.
2026-09-20 09:59:29 +10:00
Zakk ccfc5ca096 refactor(service): one apply-config path, NodeRef as a node's identity, typed SQLite stores
Three structural changes that share files, so one commit:

Settings, ports, DNS rules and custom inbounds each carried their own
copy of "store the new value, regenerate the core config, put the old
value back when that fails", and the outbound setting path had no
restore at all. ApplyCoreConfig takes a snapshot function and a store
function and does the sequence once for all five callers; the outbound
setting path restores like the others, and the error names which of
the three steps failed.

configure.Which was the persisted discriminator, the key that locates a
node, and the response row with its latency, link and selected flag at
once. NodeRef {type, id, sub, outbound} is the identity used by the
locator, EqualTo, the connected lists and the group operations; Which
embeds it and keeps the status fields. The JSON stays byte for byte
what it was (a test marshals a fixture before and after), stored
connected lists decode unchanged, and deduplication keys by identity
instead of by the whole row.

db.List* dispatched on "bucket/key" string literals to reach the
servers and subscriptions tables. The bodies are now Servers* and
Subscriptions* functions that configure calls directly; the List*
wrappers remain for the migration.
2026-09-20 09:59:29 +10:00
Zakk 2529557ea7 install: the OpenRC service files are the ones the gentoo-zh overlay ships
v2raya.initd / v2raya.confd for the root service and v2raya-user.initd /
v2raya-user.confd for the per-user lite service, taken from the overlay
that has run them on Gentoo since 2021 (the maintainer of both is the
same person); the description and the option list in the conf.d files
match the current binary. The same files serve Alpine.
2026-09-20 09:59:25 +10:00
Zakk aac5dbb9ac install: runit is not supported after all
The maintainer's call after the runit script came back: the niche init
systems (runit, dinit) are out; systemd and OpenRC stay.
2026-09-20 09:56:05 +10:00
Zakk 92b4d1579f install: an OpenRC service script, and the runit script's contact
Alpine, Gentoo and the other OpenRC systems had no service script in
the repository; the one Gentoo ships is now here as
install/universal/v2raya.initd with its conf.d file, the same shape
as the systemd unit (log file under /var/log/v2raya, options through
V2RAYA_OPTS). The runit script names the current maintainer's address.
2026-09-20 09:55:16 +10:00
Zakk b458a9ce26 Merge remote-tracking branch 'fork/hard-1-reliability' into hard-1-reliability 2026-09-20 09:54:15 +10:00
Zakk 57ba81420e chore: keep the runit service script
install/universal/v2raya.run is the runit run script users install by
hand on runit distributions (Void, Artix); it has no in-repository
caller by design. It went out with the dead code by mistake; back in.
2026-09-20 09:53:32 +10:00
Markson Hon 98a71dd45a Merge pull request #2001 from Zakkaus/hard-1-reliability
service: BoltDB upgrades keep their groups, crash recovery of host state, shutdown is not a crash, one build script
2026-09-20 07:47:43 +08:00
Markson Hon 5de684b11c Merge branch 'main' into hard-1-reliability
Signed-off-by: Markson Hon <50002150+MarksonHon@users.noreply.github.com>
2026-09-20 07:43:10 +08:00
Zakk f07adaaa8f fix(service): a core that exits during shutdown is not a crash
systemd sends the whole cgroup SIGTERM, so the core died before the
service and was recorded as a crash; the next boot then refused to
restore the proxy ("exited abnormally the last time", discussion
#1922). The signal handler marks the manager as shutting down before
anything else, a core exit in that state keeps the running flag, and
the units use KillMode=mixed so only the service receives the signal.
2026-09-20 09:17:58 +10:00
Zakk d537477a1c fix(service): the findings of a cold read of the upgrade and crash-recovery changes
A SQLite file that an earlier release's migration left empty next to an
intact bolt.db was taken as authoritative; a file without the system
settings a completed migration writes is discarded and the migration
runs again. A database migrated by that earlier release holds its
groups and outbound settings in the two tables the runtime never read;
opening it copies them into the keys it reads, for outbounds that have
none yet.

A start whose host-state recovery failed refused to run, and a start
that rolled back after its own stop tore the host state down a second
time; recovery is logged and retried at the next start, and a rollback
that stopped its process only clears the marker. A system-proxy
snapshot pending from an earlier run blocked every later system-proxy
start; it is reused as the original instead (Linux and macOS here; the
Windows side follows with its per-profile snapshot).

An empty /etc/resolv.conf was backed up as an empty file, which the
restore rejects as truncated; it is written as a marker and restored as
empty. db.Close resets the once so a reopen works.
2026-09-20 09:17:58 +10:00
Zakk 58acf7d40f fix(service): a start that never commits leaves nothing behind on the host
Start persisted running=false, stopped the old core, published the new
process and unlocked, installed the firewall rules, DNS hijack, TUN
routes or system proxy, and only then persisted running=true. A crash in
that window made the next start skip the core and clean only TUN
residue, so redirect rules, a hijacked resolver or the system proxy kept
pointing at a dead listener.

Before it installs anything, Start now stores a host-state marker (the
transparent type, API port and TUN teardown settings) and clears it once
the start commits or is rolled back; startup and the next Start tear
that state down when they find the marker. Every host mutation and the
final commit check that the process they started is still the manager's
current one, so a core that exits during afterStart fails the start
instead of leaving the UI and the store saying running. The system-proxy
implementations persist the user's original proxy settings when they
capture them and restore from that copy when the in-memory one is gone.
A recovery that fails is logged and retried at the next start; it never
blocks the service.
2026-09-20 09:17:11 +10:00
Zakk e24f102dc7 fix(db): an upgrade from BoltDB keeps its groups and can always restart
The migration wrote each outbound's connected servers and setting into
the outbound_connections and outbound_settings tables, while the runtime
reads both from system_config under outbound.<name>:connectedServers and
outbound.<name>:setting. Every upgrade from a BoltDB release therefore
came up with no group members and default outbound settings. The
migration now stores the Bolt values under the keys the runtime reads
(the ordinals are the ones configure.Which resolves at runtime) and the
verification checks those keys. The two tables are gone from the schema;
a database that still has them is left alone.

The migration also built v2raya.db in place, so an error before the
rename left a partial database that made the next start skip the
migration and then fail on the remaining bolt.db. It builds a temporary
file and renames it in after verification; a bolt.db found next to an
existing v2raya.db is moved to a numbered backup instead of blocking
every start. The v4 import no longer copies boltv4.db to bolt.db, which
produced exactly that pair.

A subscription update rewrote the connected ordinals and then replaced
the subscription in two commits; they are one transaction.
2026-09-20 09:17:11 +10:00
Zakk ae8e5a5047 chore: drop what nothing reaches
Three service packages outside the executable's dependency graph
(common/antiPollution, pkg/util/gopeed, kernel/vmessInfo), a blank
import of miekg/dns the core already imports, the --core-type flag no
code read, the PutAccount handler whose route was commented out, two GUI
API wrappers without a caller, two .SRCINFO files the release regenerates
and an unreferenced runit sample. The workflow path filters watched a
root go.mod that does not exist and the PR build skipped core/.
2026-09-20 09:17:11 +10:00
Zakk 90825094f8 fix(service): hook deadline, gated inbound writes, cleanup on a failed bind, atomic resolv backup
The core hooks ran under exec.Command with no deadline while Start held
the manager's lock, so a hook that never returned left the proxy stopped
and every status read blocked. They now run with the startup timeout as
their deadline in their own process group.

The custom-inbound POST and DELETE handlers did not take the mutation
turn; two concurrent additions read the same list and the last write
won. They take it like every other state-changing handler.

A failed HTTP bind ended in log.Fatal before the deferred cleanup, so
the core and the transparent-proxy rules stayed behind; run() now
returns the error through the same cleanup the shutdown path uses.

The resolv.conf backup was written in place; a crash mid-write left a
truncated file that the next start restored as the original. It is
written to a temporary file, synced and renamed, and an empty backup is
ignored on restore.
2026-09-20 09:17:11 +10:00
Zakk 56e734929f build: one local build entry point and one release workflow body
build.sh and build.ps1 each built the GUI, the core and the service
their own way, and nothing in the repository ran them; build.sh passed a
with_gvisor tag no source file declares. build.sh now runs the same
commands as _build_web.yml and _build_binaries.yml, takes the version as
an argument or from git describe, and stops at the first failing step;
build.ps1 is the same sequence for PowerShell.

release_main.yml and beta_release_main.yml duplicated every release job
and had drifted (the beta looked the release up in a hard-coded
repository). Both now call _release.yml with the tag, a prerelease flag
and whether to publish to the downstream package channels.
2026-09-20 09:17:11 +10:00
Markson Hon e2a362d501 Merge pull request #2000 from Zakkaus/busy-guard 2026-09-20 07:16:41 +08:00
Markson Hon 674213470c Merge pull request #1998 from Zakkaus/perf-locate 2026-09-20 07:13:52 +08:00
Zakk 98c7b0838e Merge branch 'busy-guard' into service-hardening 2026-09-20 05:19:24 +10:00
Zakk 3c7c6745b4 Merge branch 'perf-locate' into service-hardening 2026-09-20 05:19:24 +10:00
Zakk 6e6a7deed9 fix(controller): reads no longer wait for a mutation, writes wait for their turn
One `updating` flag guarded thirteen handlers, reads included: while a
subscription update or a latency test ran, GET /touch answered
REQUEST_IN_PROGRESS, so refreshing the page during a test failed at
random. A touch is a database read and needs no turn.

The flag becomes a turn that only the state-changing handlers take, and
a handler that finds it taken waits up to five seconds before answering
REQUEST_IN_PROGRESS instead of refusing at once; a client that leaves
while waiting is not answered.
2026-09-20 04:47:30 +10:00
Zakk a042a45f37 fix(db): rewrite a subscription's nodes in one transaction
ListSet deleted a subscription's node rows and re-inserted them with one
autocommit per row. A crash between the delete and the last insert left
the subscription without nodes, and the latency test, which stores its
results this way, paid a commit per node. The rewrite now runs inside
ReadModifyWrite: all or nothing, and 1000 nodes take 9 ms instead of
25 ms (BenchmarkSetSubscription).
2026-09-20 00:32:37 +10:00