3x-ui/sub
MHSanaei 32966c1257
feat(inbounds): native fallbacks on VLESS/Trojan TCP-TLS, with working child links
A VLESS or Trojan inbound on TCP with TLS or Reality can now act as a
fallback master: pick existing inbounds as children and the panel auto-
fills the SNI / ALPN / path / xver routing fields from each child's
transport, auto-builds settings.fallbacks at config-gen time, and
rewrites the child's client-share link so it advertises the master's
reachable endpoint and TLS state instead of the child's loopback listen.

Layout matches the Xray All-in-One Nginx example: master at :443 with
clients + TLS, each child on 127.0.0.1 with its own transport+clients.
Order matters (Xray walks fallbacks top-to-bottom) — reorder via the
per-row up/down arrows. Path / SNI / ALPN are exposed under a per-row
Edit toggle for the rare cases where the auto-derivation needs
overriding; otherwise just pick a child and you're done.

Backend: new InboundFallback table + FallbackService (GetByMaster /
SetByMaster / GetParentForChild / BuildFallbacksJSON); two routes
(GET / POST /panel/api/inbounds/:id/fallbacks); xray.GetXrayConfig
injects settings.fallbacks for any VLESS/Trojan TCP-TLS/Reality
inbound; GetInbounds annotates each child with FallbackParent so the
frontend can rewrite links without an extra round-trip.

Link projection covers every emission path — clients-page QR/links,
per-inbound Get URL, raw subscription, sub-JSON, sub-Clash, and the
inbounds-page link/info/QR — via a shared projectThroughFallbackMaster
on the backend and a shared projectChildThroughMaster on the frontend
that both handle the panel-tracked relationship and the legacy
unix-socket (@vless-ws) convention.

Strings translated into all 12 non-English locales.
2026-05-19 01:45:57 +02:00
..
default.json dokodemo-door, socks renamed to mixed, tunnel 2025-09-09 13:57:40 +02:00
dist.go feat(inbounds): add sub/client link endpoints; hide panel version on login 2026-05-11 15:03:47 +02:00
links.go feat(inbounds): native fallbacks on VLESS/Trojan TCP-TLS, with working child links 2026-05-19 01:45:57 +02:00
links_test.go test: cover crypto, random, netsafe, sub helpers, xray equals, websocket hub, node service 2026-05-18 10:00:09 +02:00
sub.go chore: apply modernize analyzer fixes across codebase 2026-05-18 12:24:52 +02:00
subClashService.go feat(inbounds): native fallbacks on VLESS/Trojan TCP-TLS, with working child links 2026-05-19 01:45:57 +02:00
subController.go fix(inbounds): gate node selector to multi-node-capable protocols 2026-05-18 19:20:10 +02:00
subJsonService.go feat(inbounds): native fallbacks on VLESS/Trojan TCP-TLS, with working child links 2026-05-19 01:45:57 +02:00
subService.go feat(inbounds): native fallbacks on VLESS/Trojan TCP-TLS, with working child links 2026-05-19 01:45:57 +02:00
subService_test.go test: cover crypto, random, netsafe, sub helpers, xray equals, websocket hub, node service 2026-05-18 10:00:09 +02:00