mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4859] [Bug]: All inbounds show clients as active #3390
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3390
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JohniGo76 on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4859
Describe the bug
When configuring multiple inbound connections for a client, it's not clear which inbound connection they're connected to. All are shown as active.
How to reproduce the problem
Expected behavior
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.2.26
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04
Which parts of the panel are affected?
Frontend (UI / panel pages)
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 3, 2026):
Thanks for the detailed report. This is a confirmed bug introduced in v3.1.0 when multi-inbound client support landed (#4469), and it differs from the cross-node bleeding fixed in #4809.
Root cause
Xray's stats API keys client traffic by email only — the counter names are
user>>>email>>>traffic>>>downlink/uplink— with no inbound attribution. There is no per-inbound breakdown for user-level traffic. The polling job (web/job/xray_traffic_job.go) therefore buildsactiveEmailsas a flat list of emails that had any traffic delta this tick, regardless of which inbound the traffic passed through. Those emails are stored in the local online set (xray/process.go→onlineClients), keyed by node (node 0 = local panel).The frontend rollup (
frontend/src/pages/inbounds/useInbounds.ts,rollupClients) marks a client online for a given inbound ifnodeOnline.has(client.email)— it only checks the node bucket, not which specific inbound the client is connected to. Because the node bucket contains all active emails regardless of inbound, every inbound that lists the client shows them as online.Example:
alice@example.comis attached to Inbound A and Inbound B (same panel, node 0).user>>>alice@example.com>>>traffic>>>downlink.activeEmailsincludesalice@example.com.alice@example.com.nodeOnline.has("alice@example.com")→true→ both show her online.Before multi-inbound each client lived in exactly one inbound, so an active email implicitly belonged to one inbound only — the bug was latent but harmless. With multi-inbound clients the mismatch is visible.
What a fix would require
Xray does not expose per-inbound user traffic stats, so the online signal cannot be attributed to a specific inbound via the stats API alone. Potential approaches for a proper fix:
inbound>>>tag>>>traffic>>>...) combined with knowledge of which clients belong to which inbound — but this is indirect and can double-count.Note on version: you reported
3.2.26— the latest release isv3.2.6. If that was a typo, the bug is present. If you are actually running a different version, please confirm withx-ui→ option to show version.@JohniGo76 commented on GitHub (Jun 3, 2026):
Sorry, typo 3.2.6 of course.
@JohniGo76 commented on GitHub (Jun 4, 2026):
3.2.7 not fix.
@JohniGo76 commented on GitHub (Jun 9, 2026):
3.3.0 not fix.
As before, when connecting clients to different inbounds, any of them shows the same number of connected clients.
@MHSanaei commented on GitHub (Jun 9, 2026):
Panel show online per email not per inbound