3x-ui/internal/web
MHSanaei dd9569478e fix(node): ignore a node's stats for clients detached from the inbound
Invariant: a node snapshot may move a master client's traffic state only
for emails the reporting inbound's settings still list.

A master detach calls the node's /detach endpoint, which keeps the stat
row (keepTraffic), and the node's GetInbounds preloads ClientStats by
inbound_id alone, so the node goes on reporting the detached email under
that inbound. setRemoteTrafficLocked merged every reported entry: it
copied the node's stale total onto the master's per-email row, after
which the matching limits made the node's enable=false look genuine and
latched the client disabled on the master. A master quota edit only
reaches inbounds the client is attached to, so the next sync (every 5s)
wrote the stale quota back.

The same unchecked loop also created a fresh client_traffics row for a
reported email the master no longer had once its tombstone expired.

Snapshot entries are now gated on the inbound's settings.clients. When
the settings cannot be parsed, membership is unknown and every entry is
merged as before.

Closes #6724
2026-10-05 20:37:35 +02:00
..
controller fix(api-token): let a node-sync master reach every node endpoint it calls 2026-10-05 13:31:02 +02:00
entity feat(sub): add Incy app-management parameters (#6650) 2026-09-27 01:06:17 +02:00
global refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
job fix(tuic): client speed display and certificate button layout (#6723) 2026-10-05 19:46:46 +02:00
locale feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
middleware fix(web): tighten database restore body-cap exemption (#5609) 2026-06-28 15:00:55 +02:00
network feat(tuic): implement native in-process Go TUIC v5 server (#6577) 2026-10-03 02:56:02 +02:00
runtime fix(node): don't delete clients when a node reports an empty snapshot (#6734) 2026-10-05 16:12:08 +02:00
service fix(node): ignore a node's stats for clients detached from the inbound 2026-10-05 20:37:35 +02:00
session refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
translation feat(tuic): implement native in-process Go TUIC v5 server (#6577) 2026-10-03 02:56:02 +02:00
websocket fix(tuic): client speed display and certificate button layout (#6723) 2026-10-05 19:46:46 +02:00
cadence_test.go Add remote routing URL support (#6168) 2026-08-18 16:02:11 +02:00
node_contract_test.go fix(node): don't delete clients when a node reports an empty snapshot (#6734) 2026-10-05 16:12:08 +02:00
routes_contract_test.go perf(tests): copy a migrated template DB instead of migrating per test 2026-09-27 03:04:50 +02:00
web.go feat(tuic): implement native in-process Go TUIC v5 server (#6577) 2026-10-03 02:56:02 +02:00
web_mtls.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
web_mtls_test.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
web_tuic_shutdown_test.go feat(tuic): implement native in-process Go TUIC v5 server (#6577) 2026-10-03 02:56:02 +02:00