[GH-ISSUE #6771] [Feature]: Option to show network speed in bits per second (Mbit/s) on the dashboard #4508

Open
opened 2026-10-31 20:40:08 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Sorokinkir-ctrl on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6771

The dashboard shows network throughput only in bytes per second (KB/s, MB/s), both in the "Total traffic speed" chart and in the upload/download counters. ISPs, hosting providers and speed tests (Speedtest, iperf) all report bandwidth in bits per second (Mbit/s, Gbit/s), so I have to multiply every value by 8 in my head to compare the panel with my VPS port speed or a client's speed test. For example, a peak of 24.18 MB/s is actually ~193 Mbit/s, which is not obvious at a glance.

Describe the solution you'd like

Add a display setting (Panel Settings, or a small toggle on the chart itself) to choose the speed unit: bytes/s (current default) or bits/s.

  • When bits/s is selected, the dashboard network speed chart, its axis/tooltip, the current upload/download values and the "average for period" values are shown in bit/s, Kbit/s, Mbit/s, Gbit/s (value × 8, SI prefixes, 1000-based).
  • Traffic volumes (sent/received totals, client traffic, limits) stay in bytes — only rates change.
  • The choice can be stored per browser (localStorage) or as a panel setting; either is fine.
  • Default stays bytes/s, so nothing changes for existing users.

Alternatives you've considered

  • Multiplying by 8 manually — error-prone and inconvenient.
  • Exporting server metrics to Prometheus/Grafana (node_exporter) just to get a chart in Mbit/s — works, but it is a separate stack for a simple display preference.

Concrete use case

I run a small VPS (1 vCPU, 1 GB RAM, panel v3.9.0, Xray 26.9.30) with 3 VLESS/Reality inbounds shared by family members. The hosting port speed and the speed tests my users run on their phones are all in Mbit/s, while the panel shows MB/s. Being able to switch the dashboard to Mbit/s would let me compare the chart directly with the port limit and with speed test results

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

No response

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @Sorokinkir-ctrl on GitHub (Oct 8, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6771 ### Is your feature request related to a problem? The dashboard shows network throughput only in bytes per second (KB/s, MB/s), both in the "Total traffic speed" chart and in the upload/download counters. ISPs, hosting providers and speed tests (Speedtest, iperf) all report bandwidth in bits per second (Mbit/s, Gbit/s), so I have to multiply every value by 8 in my head to compare the panel with my VPS port speed or a client's speed test. For example, a peak of 24.18 MB/s is actually ~193 Mbit/s, which is not obvious at a glance. ### Describe the solution you'd like Add a display setting (Panel Settings, or a small toggle on the chart itself) to choose the speed unit: bytes/s (current default) or bits/s. - When bits/s is selected, the dashboard network speed chart, its axis/tooltip, the current upload/download values and the "average for period" values are shown in bit/s, Kbit/s, Mbit/s, Gbit/s (value × 8, SI prefixes, 1000-based). - Traffic volumes (sent/received totals, client traffic, limits) stay in bytes — only rates change. - The choice can be stored per browser (localStorage) or as a panel setting; either is fine. - Default stays bytes/s, so nothing changes for existing users. ### Alternatives you've considered - Multiplying by 8 manually — error-prone and inconvenient. - Exporting server metrics to Prometheus/Grafana (node_exporter) just to get a chart in Mbit/s — works, but it is a separate stack for a simple display preference. ### Concrete use case I run a small VPS (1 vCPU, 1 GB RAM, panel v3.9.0, Xray 26.9.30) with 3 VLESS/Reality inbounds shared by family members. The hosting port speed and the speed tests my users run on their phones are all in Mbit/s, while the panel shows MB/s. Being able to switch the dashboard to Mbit/s would let me compare the chart directly with the port limit and with speed test results ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? _No response_ ### Are you willing to help? - [ ] I'd like to implement this feature myself and open a PR. - [ ] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 8, 2026):

This is a valid feature request. The panel has no bits-per-second display mode today: every rate on the dashboard goes through one byte-based formatter, and there is no setting to switch it.

How rates are shown now

  • frontend/src/utils/index.ts:726-728, SizeFormatter.speedFormat, just adds /s to the size formatter:
    static speedFormat(bps: number | null | undefined): string {
      return SizeFormatter.sizeFormat(bps) + '/s';
    }
    
  • The dashboard throughput card, frontend/src/pages/index/ThroughputCard.tsx, uses it for the peak (line 45), the live up/down values (lines 52 and 57), the chart axis (yFormatter={SizeFormatter.speedFormat}, line 77) and the period averages (lines 96-97). The per-inbound and per-client speed tags (InboundSpeedTag.tsx, ClientSpeedTag.tsx) use the same function.

Because every rate goes through this one function, a unit toggle would only need to change one place. Traffic totals use sizeFormat directly, so they would stay in bytes, as you asked.

One detail affects your conversion example. sizeFormat uses 1024-based steps (ONE_KB = 1024, ONE_MB = ONE_KB * 1024, utils/index.ts:709-710), even though it labels them KB/MB. So the 24.18 "MB/s" in your example is 24.18 × 1,048,576 bytes/s, which is about 202.8 Mbit/s. Your estimate of ~193 Mbit/s assumes 1,000,000 bytes per MB. Until this feature exists, multiply the shown value by about 8.39, not 8, to get decimal Mbit/s.

I found no earlier issue asking for this.

Verdict: Feature request

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

<!-- gh-comment-id:6067145689 --> @github-actions[bot] commented on GitHub (Oct 8, 2026): This is a valid feature request. The panel has no bits-per-second display mode today: every rate on the dashboard goes through one byte-based formatter, and there is no setting to switch it. **How rates are shown now** - `frontend/src/utils/index.ts:726-728`, `SizeFormatter.speedFormat`, just adds `/s` to the size formatter: ```ts static speedFormat(bps: number | null | undefined): string { return SizeFormatter.sizeFormat(bps) + '/s'; } ``` - The dashboard throughput card, `frontend/src/pages/index/ThroughputCard.tsx`, uses it for the peak (line 45), the live up/down values (lines 52 and 57), the chart axis (`yFormatter={SizeFormatter.speedFormat}`, line 77) and the period averages (lines 96-97). The per-inbound and per-client speed tags (`InboundSpeedTag.tsx`, `ClientSpeedTag.tsx`) use the same function. Because every rate goes through this one function, a unit toggle would only need to change one place. Traffic totals use `sizeFormat` directly, so they would stay in bytes, as you asked. **One detail affects your conversion example.** `sizeFormat` uses 1024-based steps (`ONE_KB = 1024`, `ONE_MB = ONE_KB * 1024`, `utils/index.ts:709-710`), even though it labels them `KB`/`MB`. So the 24.18 "MB/s" in your example is 24.18 × 1,048,576 bytes/s, which is about **202.8 Mbit/s**. Your estimate of ~193 Mbit/s assumes 1,000,000 bytes per MB. Until this feature exists, multiply the shown value by about 8.39, not 8, to get decimal Mbit/s. I found no earlier issue asking for this. Verdict: Feature request *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#4508
No description provided.