mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5412] [MERGED] fix(traffic): prevent phantom quota consumption from stale node data #5874
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#5874
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5412
Author: @younesvatan78
Created: 6/17/2026
Status: ✅ Merged
Merged: 6/19/2026
Merged by: @MHSanaei
Base:
main← Head:main📝 Commits (2)
dd14e27fix(traffic): prevent phantom quota consumption from stale node data9e64231Merge branch 'main' into main📊 Changes
4 files changed (+122 additions, -43 deletions)
View changed files
📝
internal/web/service/client_traffic.go(+17 -10)📝
internal/web/service/inbound_node.go(+2 -2)📝
internal/web/service/inbound_traffic.go(+43 -15)📝
internal/web/service/node_client_traffic_sum_test.go(+60 -16)📄 Description
Summary
Changes
How the phantom happens (step by step)
Fix: seed new rows at `Up: 0`, record the current node value as the baseline. Future delta = `cs.Up − baseline` = only real traffic beyond that point.
Test plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.