[PR #5103] [MERGED] fix: propagate inbound traffic reset to nodes #5783

Closed
opened 2026-11-02 04:04:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • 296e28c fix: 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

  • Added ResetInboundTraffic(ctx context.Context, ib *model.Inbound) error to the Runtime interface and implemented it in Remote (calling POST panel/api/inbounds/:id/resetTraffic) and Local.
  • In InboundService.ResetInboundTraffic, the reset is now propagated via rt.ResetInboundTraffic(...) to the node owning the inbound.
  • In InboundService.resetAllTrafficsLocked, the reset is now batched and propagated via rt.ResetAllTraffics(ctx) to all active nodes.

🔄 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/5103 **Author:** [@rqzbeh](https://github.com/rqzbeh) **Created:** 6/8/2026 **Status:** ✅ Merged **Merged:** 6/8/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix-reset-traffic-propagation-issue-5100` --- ### 📝 Commits (1) - [`296e28c`](https://github.com/MHSanaei/3x-ui/commit/296e28c41ee3f04e5d52c31aec65515acba5bcb8) fix: propagate inbound traffic reset to nodes ### 📊 Changes **4 files changed** (+38 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `web/runtime/local.go` (+4 -0) 📝 `web/runtime/remote.go` (+5 -0) 📝 `web/runtime/runtime.go` (+1 -0) 📝 `web/service/inbound.go` (+28 -2) </details> ### 📄 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 - Added `ResetInboundTraffic(ctx context.Context, ib *model.Inbound) error` to the `Runtime` interface and implemented it in `Remote` (calling `POST panel/api/inbounds/:id/resetTraffic`) and `Local`. - In `InboundService.ResetInboundTraffic`, the reset is now propagated via `rt.ResetInboundTraffic(...)` to the node owning the inbound. - In `InboundService.resetAllTrafficsLocked`, the reset is now batched and propagated via `rt.ResetAllTraffics(ctx)` to all active nodes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:02 +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#5783
No description provided.