mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5103] [MERGED] fix: propagate inbound traffic reset to nodes #5783
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#5783
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/5103
Author: @rqzbeh
Created: 6/8/2026
Status: ✅ Merged
Merged: 6/8/2026
Merged by: @MHSanaei
Base:
main← Head:fix-reset-traffic-propagation-issue-5100📝 Commits (1)
296e28cfix: propagate inbound traffic reset to nodes📊 Changes
4 files changed (+38 additions, -2 deletions)
View changed files
📝
web/runtime/local.go(+4 -0)📝
web/runtime/remote.go(+5 -0)📝
web/runtime/runtime.go(+1 -0)📝
web/service/inbound.go(+28 -2)📄 Description
Issue
Fixes https://github.com/MHSanaei/3x-ui/issues/5100
Traffic resets initiated by the master panel were only executing a database update and were not propagating to remote nodes. This affected both manual resets per inbound and the periodic traffic reset job for all inbounds.
Solution
ResetInboundTraffic(ctx context.Context, ib *model.Inbound) errorto theRuntimeinterface and implemented it inRemote(callingPOST panel/api/inbounds/:id/resetTraffic) andLocal.InboundService.ResetInboundTraffic, the reset is now propagated viart.ResetInboundTraffic(...)to the node owning the inbound.InboundService.resetAllTrafficsLocked, the reset is now batched and propagated viart.ResetAllTraffics(ctx)to all active nodes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.