3x-ui/frontend/src
H-TTTTT 22ff07b24b
fix(warp): preserve outbound customization when rotating IP (#6052)
changeIp() rebuilt the warp outbound from a fixed default template via
collectConfig and replaced the whole in-memory object through
onResetOutbound, so only secretKey/address/reserved and the first peer's
publicKey/endpoint survived — a user's custom mtu, domainStrategy,
noKernelTun, the first peer's keepAlive / allowedIPs / preSharedKey, and
any extra peers were silently dropped from the editor. Because the page
keeps rendering that in-memory copy and a later page Save persists it to
/panel/api/xray/update, the loss could become permanent, even though the
backend ChangeWarpIP already patches only the rotated fields and leaves
everything else intact in the stored template.

Mirror the server-side UpdateWarpXraySetting: merge only the rotated
fields (secretKey, address, reserved, first peer publicKey/endpoint)
into the existing outbound, preserving the rest. register() (first-time
creation, nothing to preserve) still uses collectConfig's full build.

Extracted as a pure module-level mergeWarpRotation so it is unit-testable
without rendering the modal.

Fixes #6019
2026-07-21 15:50:00 +02:00
..
api Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
components Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
entries refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +02:00
generated feat(sub): auto-detect subscription format by User-Agent (Updated) (#5826) 2026-07-14 13:01:40 +02:00
hooks Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
i18n refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
layouts feat(a11y): screen-reader & keyboard accessibility across the panel (#5486) (#5652) 2026-06-29 12:51:29 +02:00
lib Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
models feat(sub): auto-detect subscription format by User-Agent (Updated) (#5826) 2026-07-14 13:01:40 +02:00
pages fix(warp): preserve outbound customization when rotating IP (#6052) 2026-07-21 15:50:00 +02:00
schemas feat(sub): auto-detect subscription format by User-Agent (Updated) (#5826) 2026-07-14 13:01:40 +02:00
styles feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
test fix(warp): preserve outbound customization when rotating IP (#6052) 2026-07-21 15:50:00 +02:00
utils Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
env.d.ts refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +02:00
main.tsx refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +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 feat(sidebar): move Routing/Outbounds to top-level items with clean URLs 2026-06-22 22:20:26 +02:00