3x-ui/internal/web
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
..
controller fix: make all self-managed file downloads/installs atomic, with real completion status (#5711) 2026-07-02 18:19:33 +02:00
entity feat: ldap skip tls verify (#5637) 2026-06-28 18:10:38 +02:00
global
job fix(node): stop one rejected inbound from starving a node's traffic sync 2026-07-03 09:47:30 +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(node): fully delete clients on nodes instead of only detaching them 2026-07-05 20:28:26 +02:00
service fix(db): clamp traffic counters below int64 max and repair overflowed rows 2026-07-05 20:33:09 +02:00
session
translation feat(ui): client-realtime-speed (#5687) 2026-07-05 01:57:03 +03:00
websocket feat(web): broadcast delta client stats above a snapshot threshold 2026-07-02 16:34:01 +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