3x-ui/web
MHSanaei 5b9ed34009
fix(nodes): sum client traffic across nodes instead of overwriting
A client shared across multiple nodes has a single email-keyed client_traffics row, but each node reports its cumulative up/down. setRemoteTrafficLocked overwrote the row with one node's cumulative, so non-owning nodes hit the create branch and OnConflict-DoNothing, silently dropping their traffic and under-counting the client.

Make the shared row a pure accumulator (like the local path): a new node_client_traffics(node_id, email) baseline table stores each node's last cumulative; the node path converts cumulative to a per-node delta (clamped to the post-reset value on a negative delta) and does up = up + delta. First observation seeds the baseline and adds 0 so upgrades and newly-shared clients are not double-counted. Create-vs-accumulate now keys off global email existence. Baselines are cleaned in DelClientStat, the node sweeps, and NodeService.Delete.
2026-06-01 22:54:56 +02:00
..
controller feat(nodes): bulk panel self-update with live online indicator 2026-06-01 07:03:06 +02:00
entity fix(settings): sync generated schemas 2026-05-31 19:00:26 +02:00
global Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
job test(iplimit): align ban-policy tests with last-IP-wins (#4699) 2026-06-01 17:17:43 +02:00
locale v3 2026-05-10 02:13:42 +02:00
middleware feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
network docs: add comments for all functions 2025-09-20 09:35:50 +02:00
runtime feat(nodes): bulk panel self-update with live online indicator 2026-06-01 07:03:06 +02:00
service fix(nodes): sum client traffic across nodes instead of overwriting 2026-06-01 22:54:56 +02:00
session Security hardening: sessions, SSRF, CSP nonce, CSRF logout, trusted proxies (#4275) 2026-05-13 12:52:52 +02:00
translation feat(inbounds): attach existing clients to an inbound in one click 2026-06-01 07:26:30 +02:00
websocket fix(websocket): order register/unregister via single ops channel 2026-05-19 12:34:53 +02:00
web.go feat(frontend): TanStack Query + React Router migration & in-panel API docs (#4541) 2026-05-24 21:34:52 +02:00