3x-ui/internal/xray
Sanaei a84bbeab2e
fix(node): drop online clients and sub-nodes of nodes no longer synced
What the master derives from a node's reports (online clients, active
inbounds, learned sub-nodes) must live only while that node is still
synced; ClearNodeOnlineClients states it: a downed node must not keep its
clients listed as online.

Only a failed snapshot fetch cleared the online set, and only a failed
probe cleared sub-nodes. A disabled node (both jobs skip it), a node marked
offline before the sync tick reached it, a deleted node, and a node whose
snapshot fetched but failed to merge all kept their clients online in
onlineClients, onlineByGuid and activeInbounds, which the dashboard and a
parent master's /clients/onlines read. Disabled and deleted nodes also kept
their sub-nodes on the Nodes page until the panel restarted.

The traffic sync now keeps online sets only for enabled, online nodes in
its list, the heartbeat keeps sub-nodes only for enabled listed nodes, both
before the empty-list return, and a failed merge clears like a failed
fetch. The sync job's one-line call has no job-level test: that package
cannot install the xray process, so RetainSyncedNodeOnlineClients carries
the tested rule.
2026-09-15 19:27:38 +02:00
..
dnsconf feat(sub): let the panel set the JSON subscription DNS servers (#6485) 2026-09-13 11:51:56 +02:00
geodata chore(build): bump Go toolchain to 1.27.0 2026-08-23 21:57:03 +02:00
api.go fix(clients): keep a vless reverse client's handler across a re-add (#6558) 2026-09-15 18:00:54 +03:00
api_e2e_test.go feat(online): use xray online-stats API for onlines and access-log-free IP limit 2026-06-11 19:42:03 +02:00
api_reverse_test.go fix(clients): keep a vless reverse client's handler across a re-add (#6558) 2026-09-15 18:00:54 +03:00
api_shadowsocks_test.go fix(xray): stop the runtime user API from crashing xray-core 2026-07-28 13:52:10 +02:00
api_test.go Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
api_traffic_test.go fix(xray): stop the runtime user API from crashing xray-core 2026-07-28 13:52:10 +02:00
api_users_e2e_test.go chore: refresh dependencies and modernize Go test idioms 2026-07-30 03:14:22 +02:00
api_wireguard_test.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
client_traffic.go feat(clients): renew on a calendar day instead of a rolling interval (#6239) 2026-08-18 12:46:00 +02:00
config.go feat(xray): update xray-core to v26.7.11 and adapt panel 2026-07-12 00:30:47 +02:00
config_test.go
hot_diff.go fix(xray): restart when a diff strands a client's live session (#6550) 2026-09-15 15:39:40 +03:00
hot_diff_drops_users_test.go fix(xray): restart when a diff strands a client's live session (#6550) 2026-09-15 15:39:40 +03:00
hot_diff_test.go feat(amneziawg): add native AmneziaWG protocol support (#6105) 2026-08-24 02:41:15 +02:00
inbound.go
inbound_test.go
log_writer.go fix(xray): guard log-writer race and bound handler gRPC deadlines (#5442) 2026-06-20 18:10:18 +02:00
log_writer_race_test.go Use efficient APIs and simplify loops 2026-06-23 14:12:28 +02:00
mutation_audit_test.go refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
online_test.go feat(inbounds): improve multi-node online attribution (#6164) 2026-08-15 17:40:35 +02:00
outbound_validation_test.go feat(xray): update xray-core to v26.7.11 and adapt panel 2026-07-12 00:30:47 +02:00
pia_wireguard_outbound_test.go feat(pia): add PIA login-and-add WireGuard outbounds (#6272) 2026-08-22 23:11:06 +02:00
process.go fix(node): drop online clients and sub-nodes of nodes no longer synced 2026-09-15 19:27:38 +02:00
process_other.go
process_race_test.go Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
process_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
process_version_test.go fix(xray): synchronize lifecycle state (#6138) 2026-07-29 21:00:29 +02:00
process_windows.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
traffic.go docs(api): align OpenAPI with runtime contracts (#6409) 2026-09-04 15:23:41 +02:00