3x-ui/frontend/src
Sanaei 63b46cd612
perf(clients): apply a multi-inbound client create concurrently
Creating or attaching a client across N inbounds called AddInboundClient
once per inbound, strictly one after another. When those inbounds live on
different nodes each call is a full node round-trip bounded by the 10s
remote timeout, so the request cost the SUM of every node's latency: two
nodes felt instant, three took ~13s and timed out bot callers, which is
how it surfaced as "two out of four account creations fail".

Split the per-inbound preparation from the apply. Preparation stays
ordered and single-threaded because fillProtocolDefaults mints the shared
credentials on the first inbound and every later one reuses them; the
applies then run concurrently, capped at inboundFanoutConcurrency. A
4-node create measured 1.205s -> 0.307s with peak overlap 1 -> 4.

Consequences of no longer aborting at the first failing inbound:

- Every apply error is tagged with its inbound and the failures are
  joined, so all of them reach the caller instead of just the first.
- The fanout goroutines recover their own panics. Off the request
  goroutine gin's Recovery no longer covers them, and an unrecovered
  panic would kill the panel rather than fail one inbound.
- A partly-applied call commits clients on the inbounds that succeeded,
  so the controller and the LDAP job now read needRestart before the
  error check; otherwise Xray was never flagged for the work that landed.
- limitHwid is applied only when every inbound succeeded. Applying it
  after a failure rewrites limit_hwid and trims the registered devices of
  an email that already existed, which is silent data loss on an
  operation the panel reported as failed.

Update the API docs for the new partial-application contract and the
inbound-tagged error strings.
2026-09-04 01:01:20 +02:00
..
api feat(sub): leastLoad member weights for subscription balancers (#6304) 2026-09-02 20:21:27 +02:00
components Feature/fix external subscription client expiry (#6333) 2026-09-03 22:32:05 +02:00
entries fix(frontend): isolate subscription language preference (#6394) 2026-09-03 16:33:37 +02:00
generated feat(sub): leastLoad member weights for subscription balancers (#6304) 2026-09-02 20:21:27 +02:00
hooks feat(clients): allow removing a single HWID device (#6265) 2026-08-21 14:17:05 +02:00
i18n fix(frontend): isolate subscription language preference (#6394) 2026-09-03 16:33:37 +02:00
layouts feat(sub): client-side balancers for the JSON subscription (#6243) 2026-08-23 22:34:20 +02:00
lib Feature/fix external subscription client expiry (#6333) 2026-09-03 22:32:05 +02:00
models feat(amneziawg): add native AmneziaWG protocol support (#6105) 2026-08-24 02:41:15 +02:00
pages perf(clients): apply a multi-inbound client create concurrently 2026-09-04 01:01:20 +02:00
schemas fix(hysteria): standard geco share links and persistent uTLS None (#6325) 2026-09-03 16:35:07 +02:00
styles Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00
test Feature/fix external subscription client expiry (#6333) 2026-09-03 22:32:05 +02:00
utils fix(frontend): isolate subscription language preference (#6394) 2026-09-03 16:33:37 +02:00
env.d.ts refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +02:00
main.tsx chore(deps): migrate to react-router 8 and refresh frontend dependencies 2026-07-25 02:07:15 +02:00
queryClient.ts feat(frontend): TanStack Query + React Router migration & in-panel API docs (#4541) 2026-05-24 21:34:52 +02:00
routes.tsx Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00