mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5653] [Feature]: Current download speed of each client #3936
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#3936
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 @artslay on GitHub (Jun 29, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5653
Originally assigned to: @NikanZeyaei on GitHub.
Is your feature request related to a problem?
The download speed isn't showing up for the client; when the statistics display a overall download speed, I can't tell where it's coming from—whether it's the server itself or someone downloading a large amount of data.
Describe the solution you'd like
Display the client download speed in real-time, similar to the "Inbounds" tab.
Alternatives you've considered
No response
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
No response
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 29, 2026):
Per-client real-time speed is not currently implemented; only per-inbound real-time speed exists. This is a valid feature gap.
What exists today
frontend/src/pages/inbounds/useInbounds.tscomputes speed from 5-second deltas (bytes received divided byTRAFFIC_POLL_INTERVAL_S = 5), driven by WebSocket pushes frominternal/web/job/xray_traffic_job.go.up/downtotals from theclient_trafficsdatabase table. No per-client speed column is rendered anywhere in the frontend.Why adding it is feasible
The underlying data is already available:
user>>>email>>>traffic>>>(downlink|uplink)(internal/xray/api.go).internal/web/job/xray_traffic_job.go) already reads these deltas and broadcasts them over WebSocket as aMessageTypeClientStatspayload containingClientTrafficstructs with per-clientUp/Downdelta values.internal/web/websocket/hub.goalready delivers these messages to connected frontends.The frontend currently consumes the
client_statsWebSocket event but discards the delta information, displaying only the cumulative totals it fetches from the REST API. A per-client speed column would require tracking successive delta values on the frontend (analogous to howapplyTrafficEventworks for inbounds inuseInbounds.ts) and computing speed = delta bytes / 5 seconds, then displaying the result withSizeFormatter.speedFormat().Scope of a PR
The changes would be confined to the frontend (
frontend/src/— likely the clients/inbounds list component and the WebSocket event handler) with no backend or database schema changes required, since the delta data is already being transmitted.This reply was generated automatically; a maintainer may follow up.