feat(xray): split slots into extra Xray processes only on global conflicts #8
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/split-xray-on-global-conflict"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slots whose native profiles (or local routing DNS) disagree on
process-global Xray sections (DNS, policy, routing settings) used to
fail config generation for the whole engine. Now build_xray_configs
keeps the single shared process whenever possible and, only on
SharedConflict, greedily groups slots into the fewest compatible
groups, one Xray process each (xray.json, xray-1.json, ...).
The engine validates every candidate before touching running
processes, removes stale xray-N.json files, and treats any dead group
process as degraded. A slot that conflicts with itself stays an error.
Tests:
SHLUZ_TEST_XRAY=<xray 26.9.9> cargo test -p shluz-xray-enginegreen incl. native two-slot test (conflict → 2 processes, both slots route correctly, merge back → 1 process, xray-1.json removed). New unit test for grouping. Workspace: only the 2 pre-existingshluzd::subscriptions::fetchtimeouts fail (also on main).Note: merge #7 first, otherwise arch-build fails on this merge commit again.