mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #3462] traffic reset regularly #2356
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#2356
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?
Originally created by @907739769 on GitHub (Sep 13, 2025).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3462
Is your feature request related to a problem?
I set a traffic limit, but I want to reset the traffic limit regularly, such as on the 15th of every month, to reset all inbound and client traffic.
Describe the solution you'd like
I set a traffic limit, but I want to reset the traffic limit regularly, such as on the 15th of every month, to reset all inbound and client traffic.
Describe alternatives you've considered
No response
Checklist
@TLCFEM commented on GitHub (Sep 18, 2025):
Before it is implemented, what you can do is the following.
Since it uses a sqlite database to store everything, it is possible to directly update the corresponding table in the database.
The following python code snippet will reset all traffic to zero.
Save it as, for example
reset_traffic.py, then you can call it with the following.Of course you need to find the correct path of
x-ui.dbfile, probably on the host, or in the docker container, depending on how it is deployed.To periodically perform the reset, just create a cron job.
@907739769 commented on GitHub (Sep 19, 2025):
I'm now a scheduled task calling API interface.
/panel/inbound/resetAllClientTraffics/-1/panel/inbound/resetAllTraffics