mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #4317] [MERGED] fix: auto-renew does not re-enable client (settings JSON c["enable"] not reset) #5652
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#5652
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/4317
Author: @abdalrahmanx9
Created: 5/12/2026
Status: ✅ Merged
Merged: 5/12/2026
Merged by: @MHSanaei
Base:
main← Head:fix/auto-renew-re-enable-client📝 Commits (1)
c61dbddfix: auto-renew must re-enable client in inbound settings JSON📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
web/service/inbound.go(+1 -0)📄 Description
Since v2.9.4 (commit
6099a07f),disableInvalidClientswritesc["enable"] = falseinto the inbound settings JSON when a client hits its traffic/expiry limit and gets disabled. This JSON field is consumed by the Xray config generator (web/service/xray.go:148) as a "manual disabled flag."autoRenewClientsonly reset theclient_traffics.enablecolumn back totrue— it never flipped the correspondingc["enable"]field in the settings JSON. So after auto-renew:client_traffics.enable=true(correct)inbounds.settings.clients[].enable=false(stale from earlier disable)The Xray config generator checks both sources, and since the JSON still says
false, the client is excluded from the runtime config — it stays permanently disabled even after renewal.Fix: Added
c["enable"] = trueinautoRenewClientsright aftertraffics[traffic_index].Enable = true, so the inbound settings JSON is updated in sync with the database row when a client is re-enabled.Fixes: #4310
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.