3x-ui/xray
MHSanaei 3af2da0142
fix(online): scope online status per node instead of a global union
The inbounds page and Nodes page checked each client's email against a
single deduped union of every node's online clients, so a client connected
to one node showed as online on every inbound across every node. The local
online set was also derived from the email-keyed client_traffics.last_online
column, which remote-node syncs bump too, leaking remote-only clients onto
local inbounds.

Track online clients per node: the local panel's own xray clients under key
0 (derived from live traffic-poll deltas via RefreshLocalOnline, kept in
memory and independent of the shared last_online column) and each remote
node under its id. Add GetOnlineClientsByNode plus a /clients/onlinesByNode
endpoint and onlineByNode WS field; node.go and the inbounds rollup now scope
online by node. The flat GetOnlineClients union is kept for client-centric and
total-count views (Clients page, dashboard, telegram).

Closes #4809
2026-06-02 18:33:21 +02:00
..
api.go feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
api_test.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
client_traffic.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
config.go Remove streamSettings for protocols that don't support it 2026-05-14 23:18:23 +02:00
config_test.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
inbound.go Remove streamSettings for protocols that don't support it 2026-05-14 23:18:23 +02:00
inbound_test.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
log_writer.go v3 2026-05-10 02:13:42 +02:00
online_test.go fix(online): scope online status per node instead of a global union 2026-06-02 18:33:21 +02:00
process.go fix(online): scope online status per node instead of a global union 2026-06-02 18:33:21 +02:00
process_other.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
process_test.go fix(xray): implement graceful shutdown for xray process and add tests (#4259) 2026-05-11 14:11:40 +02:00
process_windows.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
traffic.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00