3x-ui/internal/web
MHSanaei 789e92cddc
fix(clients): re-enable depleted clients on API renewal (#5619)
Renewing a subscription via POST /panel/api/clients/bulkAdjust extended a client's expiry/quota but left it disabled. The enforcement loop disables a depleted client across client_traffics, client_records and the inbound settings JSON (and pushes that to the node), while BulkAdjust only updated expiry/total and never cleared enable. On a node its UpdateUser push was built from the stale ClientRecord (Enable=false), which the next traffic poll merged back onto the master, so the client never recovered.

BulkAdjust now re-enables a client only when it was disabled because it was depleted and the adjustment lifts it back within limits, computed as a set-difference of the production depletedCond predicate and applied through the canonical BulkSetEnable (run after the per-inbound loop, since lockInbound is non-reentrant). Manually-disabled or still-depleted clients stay disabled.

Update now writes the clients.enable column explicitly so re-enabling sticks for inbound-less clients and stops feeding a stale record into node pushes.
2026-06-29 13:39:03 +02:00
..
controller fix(settings): require re-2FA confirmation for sensitive setting changes (#5610) 2026-06-28 15:17:15 +02:00
entity feat: ldap skip tls verify (#5637) 2026-06-28 18:10:38 +02:00
global refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
job feat: ldap skip tls verify (#5637) 2026-06-28 18:10:38 +02:00
locale style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
middleware fix(web): tighten database restore body-cap exemption (#5609) 2026-06-28 15:00:55 +02:00
network style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
runtime fix(runtime): refresh cached node remotes on identity change (#5614) 2026-06-28 15:01:18 +02:00
service fix(clients): re-enable depleted clients on API renewal (#5619) 2026-06-29 13:39:03 +02:00
session refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
translation fix(xray): clean stale routing references when a balancer or outbound is deleted (#5648) 2026-06-29 12:52:18 +02:00
websocket style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
cadence_test.go refactor(web): centralize background job cadences (#5269) 2026-06-14 22:50:24 +02:00
web.go fix(web): tighten database restore body-cap exemption (#5609) 2026-06-28 15:00:55 +02:00
web_mtls.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
web_mtls_test.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00