3x-ui/internal
n0ctal 326009e9d3
fix(traffic): clear cross-panel rows only for clients actually renewed (#6263)
autoRenewClients collects every expired client that carries a reset interval,
but three of them never reach a new window: one may be missing from its
inbound's settings, one may resolve to no whole interval, and one may still
land in the past once the reset cap truncates the catch-up. All three keep
their counters and their expiry on purpose.

clearGlobalTraffic was still called with the full candidate list, so those
three lost their cross-panel rows while their local counters stayed. The next
push recreates the rows, and the expiry branch of the depletion check cuts
these clients regardless, so nothing is served past its limit — but between the
delete and the next push the cross-panel view under-reports them, and since the
expiry never advances that repeats on every poll.

Pass only the clients whose counters this pass reset. clearGlobalTraffic
already early-returns on an empty list, so a poll that renews nobody stays a
no-op rather than deleting every row. The renewed count returned to the caller
now counts the same set, instead of reporting candidates as renewals.

Tests cover both directions: a capped catch-up keeps its rows, and an actually
renewed client still loses them, since stale pushed totals would otherwise
re-deplete the fresh window at once.
2026-08-22 23:12:33 +02:00
..
config feat(nodes): opt-in encryption at rest for the outbound node API token (#6186) 2026-08-15 16:48:50 +02:00
crypto/nodetoken feat(pia): add PIA login-and-add WireGuard outbounds (#6272) 2026-08-22 23:11:06 +02:00
database perf(clients): write client_inbounds deltas and check identity from the clients table 2026-08-20 04:09:57 +02:00
eventbus chore: refresh dependencies, fix Linux tool tasks, modernize Go idioms 2026-07-25 16:08:09 +02:00
logger fix(inbounds): apply runtime changes after the DB commit (#5768) 2026-07-08 22:12:28 +02:00
mtproto fix(mtproto): synchronize child-process lifecycle (#6141) 2026-07-29 20:56:26 +02:00
pia feat(pia): add PIA login-and-add WireGuard outbounds (#6272) 2026-08-22 23:11:06 +02:00
sub Add remote routing URL support (#6168) 2026-08-18 16:02:11 +02:00
tunnelmonitor
util chore(lint): adapt to staticcheck v0.8.0 under golangci-lint v2.13.1 2026-08-20 19:37:40 +02:00
web fix(traffic): clear cross-panel rows only for clients actually renewed (#6263) 2026-08-22 23:12:33 +02:00
xray feat(pia): add PIA login-and-add WireGuard outbounds (#6272) 2026-08-22 23:11:06 +02:00