3x-ui/internal
MHSanaei 837cf5f24e fix(db): clamp traffic counters below int64 max and repair overflowed rows
A counter pushed past int64 (multi-node setups hit this via historic
delta-compounding bugs) makes SQLite silently promote the INTEGER cell
to REAL. From then on the column no longer scans into the Go int64
field and every reader of client_traffics fails at once: the inbounds
page, xray restarts, and node traffic sync all return "converting
driver.Value type float64 to int64".

Two-part fix: every unbounded "up = up + ?" add (local traffic, node
delta merge, inbound counters, plus the Go-side outbound accumulation)
now saturates at TrafficMax, a cap safely below math.MaxInt64 so one
more delta cannot overflow; and a startup repair casts REAL-promoted
cells back to INTEGER and clamps all traffic counters into
[0, TrafficMax] across client_traffics, inbounds, outbound_traffics
and node_client_traffics, restoring access to already-corrupted panels
without manual sqlite surgery.

Closes #5762
2026-07-05 20:33:09 +02:00
..
config fix: make all self-managed file downloads/installs atomic, with real completion status (#5711) 2026-07-02 18:19:33 +02:00
database fix(db): clamp traffic counters below int64 max and repair overflowed rows 2026-07-05 20:33:09 +02:00
eventbus style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
logger style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
mtproto style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
sub feat(sub): show the announcement on the subscription info page 2026-07-03 09:38:37 +02:00
tunnelmonitor style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
util fix(link): sanitize numeric quicParams taken from a share link's fm= param 2026-07-05 20:16:57 +02:00
web fix(db): clamp traffic counters below int64 max and repair overflowed rows 2026-07-05 20:33:09 +02:00
xray fix(xray): reconcile client auto-disable through the API instead of a forced restart 2026-07-02 09:26:53 +02:00