3x-ui/web/service
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_token.go
bulk_clients_test.go perf(clients): batch bulk attach/detach to cut per-item DB work 2026-06-02 03:59:10 +02:00
client.go fix(clients): derive edit-form flow from per-inbound override 2026-06-02 15:32:48 +02:00
client_email_validation_test.go
client_flow_isolation_test.go fix(clients): derive edit-form flow from per-inbound override 2026-06-02 15:32:48 +02:00
client_group_node_sync_test.go fix(clients): persist group for node-inbound clients 2026-05-31 15:25:21 +02:00
client_sync_multiprotocol_test.go test: name temp sqlite db x-ui.db to match the real db filename 2026-05-31 15:25:05 +02:00
client_test.go
config.json fix(xray): default freedom finalRules to allow-all so reverse egress works 2026-06-02 15:58:48 +02:00
custom_geo.go
custom_geo_test.go
fallback.go fix(fallbacks): allow free-form dest entries for external servers (#4748) 2026-06-02 00:17:21 +02:00
inbound.go fix(online): scope online status per node instead of a global union 2026-06-02 18:33:21 +02:00
inbound_client_traffic_test.go fix(postgres): record client traffic when inbound_id is stale 2026-06-01 01:39:21 +02:00
inbound_migration_test.go fix(postgres): commit client traffic backfill in migration 2026-06-01 00:43:42 +02:00
inbound_update_tag_test.go fix(inbound): re-derive auto tags on edit and keep node tags consistent 2026-06-01 05:08:29 +02:00
metric_history.go
node.go fix(online): scope online status per node instead of a global union 2026-06-02 18:33:21 +02:00
node_client_traffic_sum_test.go fix(nodes): sum client traffic across nodes instead of overwriting 2026-06-01 22:54:56 +02:00
node_tag_sync_test.go fix(inbound): re-derive auto tags on edit and keep node tags consistent 2026-06-01 05:08:29 +02:00
node_test.go
nord.go
outbound.go
panel.go
panel_other.go
panel_test.go
panel_unix.go
port_conflict.go fix(inbounds): drop listen address from auto-generated inbound tag 2026-06-01 09:33:49 +02:00
port_conflict_test.go fix(inbounds): drop listen address from auto-generated inbound tag 2026-06-01 09:33:49 +02:00
server.go feat(postgres): in-panel backup/restore and consistent CLI backend 2026-05-31 17:53:34 +02:00
server_vlessenc_test.go
setting.go fix(sub): keep listen/bind IP out of subscription page URLs 2026-06-01 05:47:18 +02:00
setting_security_test.go
sub_uri_base_test.go style: gofmt -s (doc-comment list separator, struct field alignment) 2026-06-02 03:58:58 +02:00
tgbot.go fix(tgbot): send login notification asynchronously 2026-06-01 02:38:06 +02:00
tgbot_test.go
traffic_writer.go
traffic_writer_test.go
url_safety.go
user.go
warp.go fix(warp): persist client_id so WARP outbound gets reserved bytes (#4781) 2026-06-01 23:14:40 +02:00
websocket.go
xray.go
xray_metrics.go
xray_setting.go
xray_setting_test.go