[GH-ISSUE #5450] [Feature]: Support custom traffic reset dates for individual inbound servers #3813

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

Originally created by @yifeng623 on GitHub (Jun 20, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5450

Currently, the system only supports resetting inbound traffic on a fixed monthly basis. However, in real-world deployments, different servers/machines often have different billing cycles and reset dates.

Suggested Feature:
It would be incredibly useful to have an option to specify a custom traffic reset date (or day of the month) for each individual inbound machine, rather than a global or fixed monthly reset.

Use Case:
For example, Server A resets on the 5th of every month, while Server B resets on the 20th. Allowing per-server reset dates would make traffic management much more accurate.

Thank you for considering this request!

Describe the solution you'd like

It would be incredibly useful to have an option to specify a custom traffic reset date (or day of the month) for each individual inbound machine, rather than a global or fixed monthly reset.

Alternatives you've considered

No response

Concrete use case

No response

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 @yifeng623 on GitHub (Jun 20, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5450 ### Is your feature request related to a problem? Currently, the system only supports resetting inbound traffic on a fixed monthly basis. However, in real-world deployments, different servers/machines often have different billing cycles and reset dates. Suggested Feature: It would be incredibly useful to have an option to specify a custom traffic reset date (or day of the month) for each individual inbound machine, rather than a global or fixed monthly reset. Use Case: For example, Server A resets on the 5th of every month, while Server B resets on the 20th. Allowing per-server reset dates would make traffic management much more accurate. Thank you for considering this request! ### Describe the solution you'd like It would be incredibly useful to have an option to specify a custom traffic reset date (or day of the month) for each individual inbound machine, rather than a global or fixed monthly reset. ### Alternatives you've considered _No response_ ### Concrete use case _No response_ ### 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.
bsakaguchi 2026-10-31 20:35:08 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 20, 2026):

This is a duplicate of #5119, which tracks the same request and is already open and accepted into the backlog.

The current implementation (confirmed in internal/database/model/model.go and internal/web/web.go) supports only five fixed reset periods — never, hourly, daily, weekly, monthly — enforced by a model validation constraint and four statically-registered cron entries. There is no per-inbound day-of-month or arbitrary-date reset. The implementation notes in #5119 explain what changes would be needed (model/validation, scheduler, and frontend).

Workaround until this is implemented

The panel exposes REST endpoints (documented at /docs via the in-panel Swagger UI) that can be called from a host-level cron job:

  • Reset traffic for a single inbound: POST /panel/inbound/resetAllTraffics
  • Reset clients for a specific inbound: POST /panel/inbound/resetClientTraffics/{id}

Example: reset on the 5th of each month at midnight:

0 0 5 * *  curl -s -X POST -b 'session=YOUR_SESSION_COOKIE' 'https://YOUR_PANEL/panel/inbound/resetAllTraffics'

Closing in favor of #5119. Please subscribe to that issue for updates.

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

<!-- gh-comment-id:4758603958 --> @github-actions[bot] commented on GitHub (Jun 20, 2026): This is a duplicate of #5119, which tracks the same request and is already open and accepted into the backlog. The current implementation (confirmed in `internal/database/model/model.go` and `internal/web/web.go`) supports only five fixed reset periods — `never`, `hourly`, `daily`, `weekly`, `monthly` — enforced by a model validation constraint and four statically-registered cron entries. There is no per-inbound day-of-month or arbitrary-date reset. The implementation notes in #5119 explain what changes would be needed (model/validation, scheduler, and frontend). **Workaround until this is implemented** The panel exposes REST endpoints (documented at `/docs` via the in-panel Swagger UI) that can be called from a host-level cron job: - Reset traffic for a single inbound: `POST /panel/inbound/resetAllTraffics` - Reset clients for a specific inbound: `POST /panel/inbound/resetClientTraffics/{id}` Example: reset on the 5th of each month at midnight: ``` 0 0 5 * * curl -s -X POST -b 'session=YOUR_SESSION_COOKIE' 'https://YOUR_PANEL/panel/inbound/resetAllTraffics' ``` Closing in favor of #5119. Please subscribe to that issue for updates. *This reply was generated automatically; a maintainer may follow up.*
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#3813
No description provided.