3x-ui/internal/database/model
Sanaei 22346eef78
fix(node): import a newly selected node inbound instead of sweeping it
Saving the node form writes the grown selection and marks the node dirty
in one transaction. On the next tick ReconcileNode runs before the
snapshot merge, and its delete sweep treats a selected tag with no
central row as "deleted on the master" — so an inbound the operator just
ticked in the picker (or every unselected one, when switching the node
to "all") is deleted from the node before the import that would have
created its row ever runs.

Nothing on disk separates "pending import" from "deleted while the node
was unreachable", but the pre-adoption guard already expresses the
former: while inbounds_adopted_at is zero the sweep waits for a clean
sync to adopt. A save that grows the managed set now zeroes it again,
and the same clean sync re-stamps it, so the offline-delete sweep is
only deferred by one successful sync, not disabled.

The trade: an inbound deleted on the master while the node was
unreachable is re-imported instead of swept if the operator grows the
node's selection during that same outage. That is visible and
recoverable, where the previous behaviour destroyed a live inbound.

Closes #6329
2026-09-13 22:44:50 +02:00
..
client_global_traffic.go fix: resolve a batch of open bug-tagged issues (traffic accounting, share strategy, sub address, CPU) (#5477) 2026-06-22 00:22:28 +02:00
host_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
hysteria_version_test.go fix(xray): reject configs xray-core refuses, and check the fixtures against it 2026-07-28 14:43:55 +02:00
model.go fix(node): import a newly selected node inbound instead of sweeping it 2026-09-13 22:44:50 +02:00
model_mtproto_test.go refactor(mtproto): manage ad-tags per client only 2026-07-07 12:19:26 +02:00
model_shadowsocks_removed_test.go feat(xray): update xray-core to v26.7.11 and adapt panel 2026-07-12 00:30:47 +02:00
model_test.go fix(inbound): strip XHTTP client-only fields from xray config, keep for subscriptions (#5349) 2026-06-15 16:35:43 +02:00
model_wireguard_peers_test.go fix(wireguard): build peers in GenXrayInboundConfig so node reconcile keeps clients (#5684) 2026-07-09 00:52:03 +02:00
model_wireguard_test.go feat(clients): let admins set PersistentKeepalive on tunnel clients (#6377) 2026-09-10 22:32:42 +02:00
node_client_ip.go feat(nodes): per-node client IP attribution for IP-limit 2026-06-15 23:50:05 +02:00
node_client_traffic.go