3x-ui/internal/web
Sanaei ea66aa4971
fix(traffic): push depletion changes to nodes off the serial writer
Node I/O on the traffic-accounting path must never stall accounting; the
serial writer states it ("Keep network I/O (node pushes) OUT of fn").

AddTraffic still applied the depletion UpdateInbound for every node
inbound inside the writer closure, one at a time with context.Background.
One hanging node held the single writer for each push, freezing traffic
polls, node snapshot merges and every client edit for the whole wave; a
client shared by 150 nodes expiring could hold it for tens of minutes.
The opt-in restart on client disable then ran node by node on the same
traffic job.

Remote plans now leave the writer and go through nodePushPlan and the 4s
nodePushContext, fanned out like client pushes: an offline or slow node
defers to the reconcile its dirty flag already schedules. The node restart
runs in its own goroutine, since nothing replays or waits on it.

TestTrafficDisableImmediatelyUpdatesNodeRuntime called addTrafficLocked
directly, which pinned the push inside the writer; it now calls AddTraffic
and still requires the push to have landed on return.
2026-09-15 19:04:55 +02:00
..
controller fix(logs): standardize logs (#6484) 2026-09-13 21:52:18 +02:00
entity feat(sub): add opt-in month-end expiry presentation (#6517) 2026-09-14 12:10:25 +02:00
global refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
job fix(node): push a node only the client IPs it hosts 2026-09-15 16:28:31 +02:00
locale feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
middleware fix(web): tighten database restore body-cap exemption (#5609) 2026-06-28 15:00:55 +02:00
network style: format struct literals and whitespace 2026-08-24 00:06:01 +02:00
runtime perf(nodes): reuse one pooled client per node instead of rebuilding it (#6548) 2026-09-15 15:29:49 +03:00
service fix(traffic): push depletion changes to nodes off the serial writer 2026-09-15 19:04:55 +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): restart when a diff strands a client's live session (#6550) 2026-09-15 15:39:40 +03:00
websocket fix(nodes): keep the credential-presence flag on the node heartbeat push 2026-07-28 17:38:46 +02:00
cadence_test.go Add remote routing URL support (#6168) 2026-08-18 16:02:11 +02:00
routes_contract_test.go docs(api): align OpenAPI with runtime contracts (#6409) 2026-09-04 15:23:41 +02:00
web.go feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +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