3x-ui/internal
MHSanaei 440833382d fix(node): apply a pushed inbound's client changes in place instead of rebuilding it
A master pushes the whole inbound to its node whenever a client on it is
auto-disabled, renewed or reset, and the node-sync reconcile re-sends every
inbound whose payload changed (all of them after a master restart). The
node's UpdateInbound answered every push with DelInbound + AddInbound, so
Xray closed the listener and every open connection on that port dropped.
On a node inbound with ~2,700 clients that was dozens of times a day.

UpdateInbound now diffs the config Xray is running against the new one.
When only settings.clients differ (vless, vmess, trojan, hysteria, masque)
it applies per-user RemoveUser/AddUser through the runtime, and when
nothing the core sees changed it does nothing. Any other change, or any
per-user failure (a handler the core lost included), still rebuilds as
before. AmneziaWG joins MTProto and TUIC on rt.UpdateInbound, whose
in-place Ensure keeps the device and its peers; Del+Add tore it down.

A pushed removal does not consult the node's own
restartXrayOnClientDisable: it defaults to on, and the master already
restarts its nodes from its own setting (restartRemoteNodesOnDisable).
Nodes on an older release keep rebuilding until they update; the master
side needs no change.

Verified: the new service tests, TestXrayAPI_E2E_Users against a real
core (pins the missing-user vs missing-handler error texts) and make
node-e2e. make race not run: no goroutine, lock or shared state changed.

Closes #6795
2026-10-12 16:22:30 +02:00
..
amneziawg
amneziawgnet fix(amneziawg): respect tunnel MTU when writing UDP replies (#6780) 2026-10-12 03:11:09 +02:00
config
crypto/nodetoken
database fix(inbounds): refuse 2022-blake3-chacha20-poly1305 on shadowsocks inbounds 2026-10-11 21:20:07 +02:00
eventbus
logger
mtproto
nodee2e
pia
sub fix(sub): default VLESS client encryption to none when the inbound has none stored (#6781) 2026-10-12 11:03:47 +02:00
testpg
tuic
tunnelmonitor
util perf: reduce traffic formatter allocations (#6790) 2026-10-12 11:05:40 +02:00
web fix(node): apply a pushed inbound's client changes in place instead of rebuilding it 2026-10-12 16:22:30 +02:00
xray fix(node): apply a pushed inbound's client changes in place instead of rebuilding it 2026-10-12 16:22:30 +02:00