3x-ui/web/controller
MHSanaei 62fd9f9d82
feat(inbounds): add Port-with-Fallback inbound type
Adds a new "portfallback" protocol that emits as a VLESS-TLS inbound
under the hood but is paired with a sidecar table of child inbounds.
Panel auto-builds settings.fallbacks at Xray-config-gen time from the
sidecar — each child's listen+port becomes the fallback dest, with
SNI/ALPN/path/xver match criteria pulled from the row. No more typing
loopback ports by hand or keeping settings.fallbacks in sync.

Backend: new FallbackService (Get/SetChildren, BuildFallbacksJSON);
two new routes (GET/POST /panel/api/inbounds/:id/fallbackChildren);
xray.GetXrayConfig injects fallbacks for PortFallback inbounds; the
inbound model emits protocol="vless" so Xray accepts the config.

Frontend: PORTFALLBACK joins the protocol dropdown; selecting it
shows the standard VLESS controls plus a Fallback Children table
(inbound picker + per-row SNI/ALPN/path/xver). Children are loaded
on edit and replaced atomically on save.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 07:44:01 +02:00
..
api.go feat(clients): add top-level Clients tab and CRUD API 2026-05-17 07:28:55 +02:00
api_docs_test.go feat(clients): add top-level Clients tab and CRUD API 2026-05-17 07:28:55 +02:00
base.go v3 2026-05-10 02:13:42 +02:00
client.go feat(clients): add top-level Clients tab and CRUD API 2026-05-17 07:28:55 +02:00
custom_geo.go v3 2026-05-10 02:13:42 +02:00
dist.go fix: Add base-path meta tag for Cloudflare Rocket Loader compatibility 2026-05-14 23:37:25 +02:00
inbound.go feat(inbounds): add Port-with-Fallback inbound type 2026-05-17 07:44:01 +02:00
index.go fix(auth): invalidate sessions when 2FA is enabled, fix dev 401 loop 2026-05-13 14:08:16 +02:00
login_limiter.go Implement CSRF protection and security hardening across the application (#4179) 2026-05-07 23:36:11 +02:00
login_limiter_test.go refactor(websocket): split controller into service + thin controller 2026-05-08 00:00:44 +02:00
node.go feat(nodes): traffic-writer queue, full-mirror sync, WS event fixes 2026-05-10 16:25:23 +02:00
server.go feat(panel): xray metrics dashboard with observatory probe history 2026-05-12 02:17:45 +02:00
setting.go feat(api-tokens): manage multiple named tokens; add tab/section anchor URLs 2026-05-13 16:34:31 +02:00
util.go Security hardening: sessions, SSRF, CSP nonce, CSRF logout, trusted proxies (#4275) 2026-05-13 12:52:52 +02:00
util_test.go Security hardening: sessions, SSRF, CSP nonce, CSRF logout, trusted proxies (#4275) 2026-05-13 12:52:52 +02:00
websocket.go v3 2026-05-10 02:13:42 +02:00
xray_setting.go Security hardening: sessions, SSRF, CSP nonce, CSRF logout, trusted proxies (#4275) 2026-05-13 12:52:52 +02:00
xui.go feat(clients): add top-level Clients tab and CRUD API 2026-05-17 07:28:55 +02:00