mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-25 12:04:44 +03:00
6aefb14569
The process snapshot is what a reconcile diffs the desired config against, so it has to describe what the core is running. The local runtime added and removed inbounds over gRPC without telling it: - An inbound added at runtime was missing from the snapshot. The next reconcile saw it as new, hit "existing tag", and replaced the handler: the listener closed and every client on it was cut. On a WireGuard inbound all peers lost their tunnel for about 15 s, once, at the first device or client change after the inbound was created. - An inbound removed at runtime stayed in the snapshot. Enabling it again through a path that only asks for a reconcile diffed as "no change", and the core never got it back. The local runtime now reports both to the process, which swaps in an edited copy of the snapshot. The wiring moved into XrayService.LocalRuntimeDeps so the tests run the panel's own bridge against an in-process core and compare handler identity before and after the reconcile. User-level drift is left to the reconcile, which already settles it without touching a session: a known WireGuard peer is updated in place, any other user is re-added by credential, and a missing one is skipped.