[PR #3387] [MERGED] Add all-time traffic for inbounds and clients #5404

Closed
opened 2026-10-31 20:46:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/3387
Author: @aliglzr
Created: 8/27/2025
Status: ✅ Merged
Merged: 8/27/2025
Merged by: @MHSanaei

Base: main ← Head: client-patch-2


📝 Commits (5)

  • 42ce9a3 feat(db): add allTime field to Inbound and ClientTraffic models
  • 85a580b feat(inbound): increment all_time for inbounds and clients on traffic updates
  • 6828ea3 feat(ui): show all-time traffic column for inbounds and its clients
  • 8b3650b i18n: add pages.inbounds.allTimeTraffic label across locales
  • fffdc72 Add All Time Traffic Usage in inbounds page top banner

📊 Changes

19 files changed (+86 additions, -7 deletions)

View changed files

📝 database/model/model.go (+1 -0)
📝 web/assets/js/model/dbinbound.js (+1 -0)
📝 web/html/component/aClientTable.html (+4 -0)
📝 web/html/inbounds.html (+29 -5)
📝 web/service/inbound.go (+24 -2)
📝 web/translation/translate.ar_EG.toml (+2 -0)
📝 web/translation/translate.en_US.toml (+2 -0)
📝 web/translation/translate.es_ES.toml (+2 -0)
📝 web/translation/translate.fa_IR.toml (+2 -0)
📝 web/translation/translate.id_ID.toml (+2 -0)
📝 web/translation/translate.ja_JP.toml (+2 -0)
📝 web/translation/translate.pt_BR.toml (+2 -0)
📝 web/translation/translate.ru_RU.toml (+2 -0)
📝 web/translation/translate.tr_TR.toml (+2 -0)
📝 web/translation/translate.uk_UA.toml (+2 -0)
📝 web/translation/translate.vi_VN.toml (+2 -0)
📝 web/translation/translate.zh_CN.toml (+2 -0)
📝 web/translation/translate.zh_TW.toml (+2 -0)
📝 xray/client_traffic.go (+1 -0)

📄 Description

What is the pull request?

Adds an all-time traffic counter to inbounds and client traffic that persists across traffic resets. Updates database models, services, UI, and translations to support storing, incrementing, and displaying this value.

This PR does not make any bug or bad effects on previous versions.

Users with previous version databases need to migrate if they need to have the correct All Time Traffic from now.
After Migration it will calculate correctly.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots

  • Before Reset
    image

  • After Reset
    image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/3387 **Author:** [@aliglzr](https://github.com/aliglzr) **Created:** 8/27/2025 **Status:** ✅ Merged **Merged:** 8/27/2025 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `client-patch-2` --- ### 📝 Commits (5) - [`42ce9a3`](https://github.com/MHSanaei/3x-ui/commit/42ce9a31d4a6cfc5a34c6c7112cba0f41b1996a7) feat(db): add allTime field to Inbound and ClientTraffic models - [`85a580b`](https://github.com/MHSanaei/3x-ui/commit/85a580bfdf34839b9c7cc0479a4aad051f9ac806) feat(inbound): increment all_time for inbounds and clients on traffic updates - [`6828ea3`](https://github.com/MHSanaei/3x-ui/commit/6828ea3a583101beaaec5b1a9a18873f012bb9ba) feat(ui): show all-time traffic column for inbounds and its clients - [`8b3650b`](https://github.com/MHSanaei/3x-ui/commit/8b3650b756e989d3b94379f59088f37ac184d3f5) i18n: add pages.inbounds.allTimeTraffic label across locales - [`fffdc72`](https://github.com/MHSanaei/3x-ui/commit/fffdc72c1ec59315397eb8f947bb15c8934d4d91) Add All Time Traffic Usage in inbounds page top banner ### 📊 Changes **19 files changed** (+86 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `database/model/model.go` (+1 -0) 📝 `web/assets/js/model/dbinbound.js` (+1 -0) 📝 `web/html/component/aClientTable.html` (+4 -0) 📝 `web/html/inbounds.html` (+29 -5) 📝 `web/service/inbound.go` (+24 -2) 📝 `web/translation/translate.ar_EG.toml` (+2 -0) 📝 `web/translation/translate.en_US.toml` (+2 -0) 📝 `web/translation/translate.es_ES.toml` (+2 -0) 📝 `web/translation/translate.fa_IR.toml` (+2 -0) 📝 `web/translation/translate.id_ID.toml` (+2 -0) 📝 `web/translation/translate.ja_JP.toml` (+2 -0) 📝 `web/translation/translate.pt_BR.toml` (+2 -0) 📝 `web/translation/translate.ru_RU.toml` (+2 -0) 📝 `web/translation/translate.tr_TR.toml` (+2 -0) 📝 `web/translation/translate.uk_UA.toml` (+2 -0) 📝 `web/translation/translate.vi_VN.toml` (+2 -0) 📝 `web/translation/translate.zh_CN.toml` (+2 -0) 📝 `web/translation/translate.zh_TW.toml` (+2 -0) 📝 `xray/client_traffic.go` (+1 -0) </details> ### 📄 Description ## What is the pull request? Adds an all-time traffic counter to inbounds and client traffic that persists across traffic resets. Updates database models, services, UI, and translations to support storing, incrementing, and displaying this value. This PR does not make any bug or bad effects on previous versions. Users with previous version databases need to migrate if they need to have the correct All Time Traffic from now. After Migration it will calculate correctly. ## Which part of the application is affected by the change? - [x] Frontend - [x] Backend ## Type of Changes - [ ] Bug fix - [x] New feature - [ ] Refactoring - [ ] Other ## Screenshots - Before Reset <img width="1110" height="357" alt="image" src="https://github.com/user-attachments/assets/062e16ae-933a-4332-a048-2f354e635a14" /> - After Reset <img width="1078" height="325" alt="image" src="https://github.com/user-attachments/assets/2278215a-33d3-4dc3-a940-ed693111c03f" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:46:44 +07:00
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#5404
No description provided.