Files
mirror-3x-ui/internal/xray
Sanaei 772270c7e6 fix(xray): refuse a config whose new socket the core cannot bind at all
The guard that keeps a working core from being replaced by a config it cannot
bind only knew one reason: another process holds the port. An inbound whose
listen address the host does not have, or whose port the panel is not allowed
to bind, went the same way as that one did: the new core exited at start and
the watchdog restarted it every two seconds with every inbound down.

The probe now names those two failures as well. A tproxy inbound is excused
from the address check: IP_TRANSPARENT lets the core bind an address the host
does not hold, which the probe cannot do. The permission check assumes what
the shipped units give: the core is the panel's child with the same
privileges. A core granted file capabilities the panel lacks would be refused
a port it could bind.

Checked against the pinned core on its own: it exits 255 on a missing address
and on a denied port, and starts on the missing address with tproxy. On a
running panel an inbound on 192.0.2.1 was refused with the core's PID and the
other inbound untouched, and came up by hot apply once its listen was fixed.

The case that left a missing address to the core is replaced: that was the
previous commit's scope, not a rule.
2026-11-29 22:05:42 +03:30
..