3x-ui/internal
BlindMaster24 baef3cdd07
fix(xray): refuse a config the running core cannot bind (#6547)
* fix(xray): refuse a config the running core cannot bind

RestartXray stopped a working core before handing it a config whose listens
collide, so the failed bind exited the whole process (main/run.go:94) and the
one-second watchdog retried it in a loop: every protocol down, cause only in
the logs. The save-time port guards cannot cover this -- SetInboundEnable, the
AmneziaWG relay created on the first peer, template and bridge edits all reach
a colliding config with no guard on that path.

Probe the generated config at the single restart funnel instead. Collisions the
running core already serves are excused, so an established setup is never
refused by a static read being wrong about it, and the port-bucketed pass costs
nothing on a clean config.

* fix(xray): surface a refused config and re-key the bind excuse set

Round-1 findings on this PR. Refusing the swap left the running core on its
previous config with nothing but a log line to show for it, so the status
response now carries the reason while the core runs and the overview marks it;
the node list picks the same field up through that response. The excuse set is
keyed on the two listens, the port and the shared transports instead of the tag
pair, so a pair whose listen moves onto the other's address is refused again,
while the same two sockets stay excused however the generator orders them.

TestBindConflicts/excused_pair_whose_listen_changed_into_a_real_collision fails
without the key change -- watched red first.
2026-09-15 15:27:28 +03:00
..
amneziawg fix(amneziawg): read the outbound pseudo-protocol id like the core (#6531) 2026-09-15 08:23:18 +03:00
amneziawgnet fix(amneziawg): wrap the relay port window instead of refusing ids past it (#6539) 2026-09-15 10:07:14 +03:00
config v3.8.0 2026-09-14 19:11:03 +02:00
crypto/nodetoken fix(nodetoken): make the corrupt-ciphertext test corrupt deterministically (#6520) 2026-09-14 12:08:11 +02:00
database fix(xray): read an outbound protocol id the way the core does (#6521) 2026-09-14 19:52:27 +03:00
eventbus chore: refresh dependencies, fix Linux tool tasks, modernize Go idioms 2026-07-25 16:08:09 +02:00
logger fix(inbounds): apply runtime changes after the DB commit (#5768) 2026-07-08 22:12:28 +02:00
mtproto fix(mtproto): synchronize child-process lifecycle (#6141) 2026-07-29 20:56:26 +02:00
pia chore(build): bump Go toolchain to 1.27.0 2026-08-23 21:57:03 +02:00
sub feat(sub): add opt-in month-end expiry presentation (#6517) 2026-09-14 12:10:25 +02:00
tuic fix(tuic): evict the oldest relay flow instead of refusing new clients 2026-09-12 10:40:41 +02:00
tunnelmonitor style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
util fix(link): restore mKCP seed and headerType on share-link import (#6480) 2026-09-13 22:28:13 +02:00
web fix(xray): refuse a config the running core cannot bind (#6547) 2026-09-15 15:27:28 +03:00
xray feat(sub): let the panel set the JSON subscription DNS servers (#6485) 2026-09-13 11:51:56 +02:00