fix(sub): honor per-inbound share address strategy in subscription output (#5208)

Subscriptions resolved a node-managed inbound's address to the node's
panel address unconditionally, so an inbound bound to a specific public
IP advertised an endpoint clients could not reach. The shareAddrStrategy
field added in #5162 only applied to panel share/QR links by design.

resolveInboundAddress now follows the same order as the panel's link
builder: 'listen' prefers a routable bind, 'custom' prefers shareAddr,
and the default 'node' keeps the existing node-first behavior, so output
is unchanged for inbounds that never set the field. Applies to raw,
JSON, and Clash subscriptions, which all resolve through this path.
Help text in all locales updated to drop the 'subscriptions are not
affected' caveat.
This commit is contained in:
MHSanaei
2026-06-11 21:31:27 +02:00
parent 21143a6d72
commit cc65f37164
15 changed files with 105 additions and 24 deletions
+1 -1
View File
@@ -591,7 +591,7 @@
"getNewSeed": "获取新 Seed",
"listenHelp": "也可以填写 Unix socket 路径(例如 /run/xray/in.sock),以使用套接字而非 TCP 端口监听——此时请将端口设为 0。",
"shareAddrStrategy": "分享地址策略",
"shareAddrStrategyHelp": "控制导出分享链接二维码时写入哪个地址,不影响订阅链接。",
"shareAddrStrategyHelp": "控制导出分享链接二维码和订阅输出时写入哪个地址。",
"shareAddr": "自定义分享地址",
"shareAddrHelp": "仅在分享地址策略为自定义时使用。填写不带协议和端口的域名或 IP。",
"shareAddrStrategyOptions": {