[GH-ISSUE #7053] [Bug]: Client online status is inaccurate on v3.11.0 #6598

Open
opened 2026-11-07 14:33:25 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @sinasurvivalist-tech on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/7053

Describe the bug

Since i have upgraded to the latest from v3.10.2, the clients statuses are completely inaccurate, if one client connects and after sometime disconnects, the status won't get updated and it stocks showing the status Online.

I've attached a screenshot regarding the issue

Please fix the client status to be accurate.

How to reproduce the problem

1- upgrade to the latest version
2- connect your clients, analyze their status
3- after they got online check if after disconnecting the status updates.

Expected behavior

Kindly take a look on what happened on the latest version, or maybe somehow i'm the only one having this issue.

Actual behavior

No response

Relevant logs


Screenshots

Image

Check this out, the two online clients based on their speed column has no online connection but the status is stuck on showing them online!

3x-ui version

3.11.0

Xray-core version

26.10.21

How did you install 3x-ui?

Docker / Docker Compose

Operating system

Ubuntu 24.02

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

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @sinasurvivalist-tech on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/7053 ### Describe the bug Since i have upgraded to the latest from v3.10.2, the clients statuses are completely inaccurate, if one client connects and after sometime disconnects, the status won't get updated and it stocks showing the status Online. I've attached a screenshot regarding the issue Please fix the client status to be accurate. ### How to reproduce the problem 1- upgrade to the latest version 2- connect your clients, analyze their status 3- after they got online check if after disconnecting the status updates. ### Expected behavior Kindly take a look on what happened on the latest version, or maybe somehow i'm the only one having this issue. ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots <img width="2228" height="627" alt="Image" src="https://github.com/user-attachments/assets/d2e7070e-3239-48fb-80a7-adcae4fff58f" /> Check this out, the two online clients based on their speed column has no online connection but the status is stuck on showing them online! ### 3x-ui version 3.11.0 ### Xray-core version 26.10.21 ### How did you install 3x-ui? Docker / Docker Compose ### Operating system Ubuntu 24.02 ### 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 - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
Author
Owner

@github-actions[bot] commented on GitHub (Nov 3, 2026):

I can't confirm this yet. The panel's own online-detection code did not change between v3.10.2 and v3.11.0, so either the clients still have an open connection to Xray, or the newer Xray-core bundled with v3.11.0 behaves differently. A few details from you will tell which.

How "Online" is decided. On a core with the online-stats API (Xray 26.10.21 has it), a client counts as online if either of these is true:

  1. it moved bytes in the last traffic poll, or
  2. Xray's GetUsersStats RPC lists it as having a live connection.

The second signal is on purpose. It keeps an idle but still-connected client online even at zero speed (internal/web/job/xray_traffic_job.go:117-121):

// When the core supports the online-stats API, union in connection-based
// onlines. Neither signal alone covers everything: an idle-but-connected
// client moves no bytes between polls (the delta heuristic's blind spot),

So "Online" with an empty speed column means Xray still reports a connection for that user. Once Xray stops listing the user, the panel drops it after the 20 s grace window (internal/web/service/inbound_node.go:213, const onlineGracePeriodMs int64 = 20000). The panel counts every user GetUsersStats returns as online and does not look at the per-IP LastSeen values (internal/xray/api.go:1139-1157).

What changed between your two versions. The panel-side online path (process.go, api.go, xray_traffic_job.go, inbound_node.go) is the same in v3.10.2 and v3.11.0. The only change on that path is Xray-core: the Docker image went from Xray v26.10.10 to v26.10.21 (commit 61b129d5, "feat(xray): update xray-core to v26.10.21 and adapt panel"). I couldn't check here whether the upstream online-tracking behaviour changed between those two Xray builds.

I also couldn't open the screenshot. To settle this, please answer as text:

  1. Protocol and transport of the affected inbound(s), e.g. VLESS + Reality/TCP, VMess + WS, Hysteria2, TUIC, MTProto. Also say whether Mux is on in the client app.
  2. How long does a client stay "Online" after you disconnect it? A minute or two, or until Xray restarts? Does it go offline if you fully close the app or put the phone in airplane mode?
  3. After a client disconnects, does restarting Xray from the dashboard clear the stale status?
  4. If you can, switch Xray to an older version from the dashboard's Xray version dialog (the server keeps running v3.11.0) and say whether the problem goes away. That shows whether the new core causes it.
  5. Is this a single panel, or a master with nodes? If it uses nodes, are the affected clients on a node?

Verdict: Insufficient information
Severity: N/A
Confidence: Medium
Root cause: Not established. In API mode, "online" is the union of traffic deltas and Xray's GetUsersStats user list (internal/web/job/xray_traffic_job.go:122-131). An online client at zero speed is what you see while Xray still reports a connection for that user.
Same class: Not applicable
Already fixed: Not applicable. No later commit on main touches the online path.
Duplicate of: None (Related: #4970, #4869 are older online-display reports from before the API-based detection)
Evidence: git log v3.10.2..v3.11.0 shows no change to the online logic in internal/xray/process.go RefreshLocalOnline (:484-518), internal/xray/api.go GetOnlineUsers (:1128-1159) or xray_traffic_job.go. API-mode onlines date from 7bcc5830 (in v3.3.1+). The bundled core moved from v26.10.10 to v26.10.21 in 61b129d5. go.mod pin: 701af60772cd → 1b1647cd9ddf.
Not determined: Whether Xray 26.10.21's GetUsersStats keeps listing users after their connections close. Answer 4 (downgrading the core) settles it.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:6592219276 --> @github-actions[bot] commented on GitHub (Nov 3, 2026): I can't confirm this yet. The panel's own online-detection code did not change between v3.10.2 and v3.11.0, so either the clients still have an open connection to Xray, or the newer Xray-core bundled with v3.11.0 behaves differently. A few details from you will tell which. **How "Online" is decided.** On a core with the online-stats API (Xray 26.10.21 has it), a client counts as online if **either** of these is true: 1. it moved bytes in the last traffic poll, or 2. Xray's `GetUsersStats` RPC lists it as having a live connection. The second signal is on purpose. It keeps an idle but still-connected client online even at **zero speed** (`internal/web/job/xray_traffic_job.go:117-121`): ```go // When the core supports the online-stats API, union in connection-based // onlines. Neither signal alone covers everything: an idle-but-connected // client moves no bytes between polls (the delta heuristic's blind spot), ``` So "Online" with an empty speed column means Xray still reports a connection for that user. Once Xray stops listing the user, the panel drops it after the 20 s grace window (`internal/web/service/inbound_node.go:213`, `const onlineGracePeriodMs int64 = 20000`). The panel counts every user `GetUsersStats` returns as online and does not look at the per-IP `LastSeen` values (`internal/xray/api.go:1139-1157`). **What changed between your two versions.** The panel-side online path (`process.go`, `api.go`, `xray_traffic_job.go`, `inbound_node.go`) is the same in v3.10.2 and v3.11.0. The only change on that path is Xray-core: the Docker image went from Xray `v26.10.10` to `v26.10.21` (commit `61b129d5`, "feat(xray): update xray-core to v26.10.21 and adapt panel"). I couldn't check here whether the upstream online-tracking behaviour changed between those two Xray builds. I also couldn't open the screenshot. To settle this, please answer as text: 1. **Protocol and transport** of the affected inbound(s), e.g. VLESS + Reality/TCP, VMess + WS, Hysteria2, TUIC, MTProto. Also say whether **Mux** is on in the client app. 2. **How long** does a client stay "Online" after you disconnect it? A minute or two, or until Xray restarts? Does it go offline if you fully close the app or put the phone in airplane mode? 3. After a client disconnects, does **restarting Xray** from the dashboard clear the stale status? 4. If you can, switch Xray to an older version from the dashboard's Xray version dialog (the server keeps running v3.11.0) and say whether the problem goes away. That shows whether the new core causes it. 5. Is this a single panel, or a master with **nodes**? If it uses nodes, are the affected clients on a node? --- Verdict: Insufficient information Severity: N/A Confidence: Medium Root cause: Not established. In API mode, "online" is the union of traffic deltas and Xray's `GetUsersStats` user list (`internal/web/job/xray_traffic_job.go:122-131`). An online client at zero speed is what you see while Xray still reports a connection for that user. Same class: Not applicable Already fixed: Not applicable. No later commit on main touches the online path. Duplicate of: None (Related: #4970, #4869 are older online-display reports from before the API-based detection) Evidence: `git log v3.10.2..v3.11.0` shows no change to the online logic in `internal/xray/process.go` `RefreshLocalOnline` (`:484-518`), `internal/xray/api.go` `GetOnlineUsers` (`:1128-1159`) or `xray_traffic_job.go`. API-mode onlines date from `7bcc5830` (in v3.3.1+). The bundled core moved from `v26.10.10` to `v26.10.21` in `61b129d5`. go.mod pin: `701af60772cd` → `1b1647cd9ddf`. Not determined: Whether Xray 26.10.21's `GetUsersStats` keeps listing users after their connections close. Answer 4 (downgrading the core) settles it. *This reply was generated automatically; a maintainer may follow up.* <!-- claude-issue:analyst -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6598
No description provided.