mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #7039] [Question]: Can the switch be automatically turned on upon automatic data reset? #5659
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#5659
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 @xuexiaokang on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/7039
What are you trying to do?
Can the switch be automatically turned on upon automatic data reset?
Currently, after data depletion triggers switch-off, the switch stays off after the data quota resets. We need auto-enable of the switch together with data reset.
What have you already tried?
No response
3x-ui version
3.10.2
How did you install 3x-ui?
install.sh script
Operating system
No response
Screenshots or config snippets
No response
Before submitting
@github-actions[bot] commented on GitHub (Nov 1, 2026):
Yes. Updating from 3.10.2 to v3.11.0 gives you this. In that release, when the scheduled traffic reset runs, it also turns back on any client or inbound that was switched off only because it ran out of data.
Two commits did this, and both shipped first in
v3.11.0. Neither is inv3.10.2:1dbb3743fix(traffic): re-enable quota-disabled clients on inbound and reset-all resets (#6833)aedd8facfix(traffic): re-enable a quota-disabled inbound on its periodic reset (#6834)What gets switched back on (
internal/web/job/periodic_traffic_reset_job.go):ResetAllClientTraffics(internal/web/service/client_traffic.go:127) first lists the disabled clients that used up their quota (quotaDisabledEmails,internal/web/service/client_crud.go:154). It zeroes their traffic, then re-enables them:periodic_traffic_reset_job.go:157).ResetTrafficByEmailthen setsupdated.Enable = trueonce the counters are zero (client_traffic.go:47-59).Totalcap switched it off: (periodic_traffic_reset_job.go:48-51). A successful reset is then followed bySetInboundEnable(inbound.Id, true)(line 107).What stays off, on purpose:
c.Total > 0 && c.Used >= c.Total(client_crud.go:129), so one that still has quota left counts as switched off manually and is left alone (comment atperiodic_traffic_reset_job.go:155-156).ib.NodeID == nil). Clients on node inbounds are still reset and re-enabled through the client path.After you update, set Traffic Reset on the inbound or client (daily, weekly, monthly, etc.). Your depleted clients should then come back on by themselves at the next reset. If one is still off after a reset on v3.11.0, please post the inbound's
Total/Up/Down/ExpiryTimeand that client'sTotal/used/Enablevalues as text.Verdict: Already fixed
This reply was generated automatically; a maintainer may follow up.