[PR #6216] [MERGED] feat(frontend): multi-node cloning initial implementation #6177

Closed
opened 2026-11-02 04:06:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6216
Author: @rlex
Created: 8/14/2026
Status: ✅ Merged
Merged: 8/15/2026
Merged by: @MHSanaei

Base: main ← Head: multiclone


📝 Commits (7)

  • be38ac9 feat(frontend): multinode cloning initial implementation
  • a4ae15f fix(frontend): harden live node detection in multinode cloning
  • 4a50b23 fix(frontend): add aria label to clone inbound modal
  • 6924e40 fix(frontend): shallow copy inbound settings during cloning
  • 9bb293c fix(frontend): avoid potential port conflict during testing
  • 157aae1 fix(frontend): selection buttons and websocket selection reset fix
  • 5e86cfc Merge branch 'main' into multiclone

📊 Changes

20 files changed (+597 additions, -46 deletions)

View changed files

➕ frontend/src/lib/xray/inbound-clone.ts (+66 -0)
➕ frontend/src/lib/xray/node-protocols.ts (+16 -0)
➕ frontend/src/pages/inbounds/CloneInboundModal.tsx (+136 -0)
📝 frontend/src/pages/inbounds/InboundsPage.tsx (+42 -34)
📝 frontend/src/pages/inbounds/form/InboundFormModal.tsx (+7 -12)
➕ frontend/src/test/clone-inbound-modal.test.tsx (+219 -0)
➕ frontend/src/test/inbound-clone.test.ts (+85 -0)
📝 internal/web/translation/ar-EG.json (+2 -0)
📝 internal/web/translation/en-US.json (+2 -0)
📝 internal/web/translation/es-ES.json (+2 -0)
📝 internal/web/translation/fa-IR.json (+2 -0)
📝 internal/web/translation/id-ID.json (+2 -0)
📝 internal/web/translation/ja-JP.json (+2 -0)
📝 internal/web/translation/pt-BR.json (+2 -0)
📝 internal/web/translation/ru-RU.json (+2 -0)
📝 internal/web/translation/tr-TR.json (+2 -0)
📝 internal/web/translation/uk-UA.json (+2 -0)
📝 internal/web/translation/vi-VN.json (+2 -0)
📝 internal/web/translation/zh-CN.json (+2 -0)
📝 internal/web/translation/zh-TW.json (+2 -0)

📄 Description

Summary

Allows cloning of inbounds to connected nodes from central panel.
No core changes - strictly frontend, existing API was enough.
New cloning modal only appears when there is connected nodes - zero changes for single-node panels.
Existing behavior kept - local copy by default.
Inbounds are still disabled after cloning - to adjust settings before switching them on (tls certs for example).

Why

It's convenient - you can quickly spread bunch of configs to multiple regions to use as a base.
Currently i'm relying on copying raw JSONs, which is not very convenient.
This streamlines it.

Also closes https://github.com/MHSanaei/3x-ui/issues/5337 - i'm not the only one wanting it.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

  1. Install x3-ui (2 or more nodes)
  2. use one panel as central, add nodes
  3. create any inbound config
  4. press clone

Screenshots / recordings

Screenshot 2026-08-14 at 22 42 55

Breaking changes

None

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6216 **Author:** [@rlex](https://github.com/rlex) **Created:** 8/14/2026 **Status:** ✅ Merged **Merged:** 8/15/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `multiclone` --- ### 📝 Commits (7) - [`be38ac9`](https://github.com/MHSanaei/3x-ui/commit/be38ac986beef4083d68bd812f42f4affa6ec902) feat(frontend): multinode cloning initial implementation - [`a4ae15f`](https://github.com/MHSanaei/3x-ui/commit/a4ae15f346e5c6284675f28247001710772446f0) fix(frontend): harden live node detection in multinode cloning - [`4a50b23`](https://github.com/MHSanaei/3x-ui/commit/4a50b231c94dcb90b13d5cfb4e181e4a868fc261) fix(frontend): add aria label to clone inbound modal - [`6924e40`](https://github.com/MHSanaei/3x-ui/commit/6924e40ca40dc8ac507d80b6ada2c018f262a214) fix(frontend): shallow copy inbound settings during cloning - [`9bb293c`](https://github.com/MHSanaei/3x-ui/commit/9bb293c822c9afda691fb0ec4b05357f032a2653) fix(frontend): avoid potential port conflict during testing - [`157aae1`](https://github.com/MHSanaei/3x-ui/commit/157aae14f60578f3b44aca17aae728a67a4e9ada) fix(frontend): selection buttons and websocket selection reset fix - [`5e86cfc`](https://github.com/MHSanaei/3x-ui/commit/5e86cfc5e24b6bf0bfa1e0a350be7d0c11ccd3e4) Merge branch 'main' into multiclone ### 📊 Changes **20 files changed** (+597 additions, -46 deletions) <details> <summary>View changed files</summary> ➕ `frontend/src/lib/xray/inbound-clone.ts` (+66 -0) ➕ `frontend/src/lib/xray/node-protocols.ts` (+16 -0) ➕ `frontend/src/pages/inbounds/CloneInboundModal.tsx` (+136 -0) 📝 `frontend/src/pages/inbounds/InboundsPage.tsx` (+42 -34) 📝 `frontend/src/pages/inbounds/form/InboundFormModal.tsx` (+7 -12) ➕ `frontend/src/test/clone-inbound-modal.test.tsx` (+219 -0) ➕ `frontend/src/test/inbound-clone.test.ts` (+85 -0) 📝 `internal/web/translation/ar-EG.json` (+2 -0) 📝 `internal/web/translation/en-US.json` (+2 -0) 📝 `internal/web/translation/es-ES.json` (+2 -0) 📝 `internal/web/translation/fa-IR.json` (+2 -0) 📝 `internal/web/translation/id-ID.json` (+2 -0) 📝 `internal/web/translation/ja-JP.json` (+2 -0) 📝 `internal/web/translation/pt-BR.json` (+2 -0) 📝 `internal/web/translation/ru-RU.json` (+2 -0) 📝 `internal/web/translation/tr-TR.json` (+2 -0) 📝 `internal/web/translation/uk-UA.json` (+2 -0) 📝 `internal/web/translation/vi-VN.json` (+2 -0) 📝 `internal/web/translation/zh-CN.json` (+2 -0) 📝 `internal/web/translation/zh-TW.json` (+2 -0) </details> ### 📄 Description ## Summary Allows cloning of inbounds to connected nodes from central panel. No core changes - strictly frontend, existing API was enough. New cloning modal only appears when there is connected nodes - zero changes for single-node panels. Existing behavior kept - local copy by default. Inbounds are still disabled after cloning - to adjust settings before switching them on (tls certs for example). ## Why It's convenient - you can quickly spread bunch of configs to multiple regions to use as a base. Currently i'm relying on copying raw JSONs, which is not very convenient. This streamlines it. Also closes https://github.com/MHSanaei/3x-ui/issues/5337 - i'm not the only one wanting it. ## Type of change - [ ] Bug fix - [x] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [x] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? 1) Install x3-ui (2 or more nodes) 2) use one panel as central, add nodes 3) create any inbound config 4) press clone ## Screenshots / recordings <img width="508" height="201" alt="Screenshot 2026-08-14 at 22 42 55" src="https://github.com/user-attachments/assets/8d86e014-5e87-4eda-8672-1b9d3fd16bc9" /> ## Breaking changes None ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [x] I added or updated tests for the new behavior (when applicable). - [x] `go build ./...` and the test suite pass locally. - [x] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:55 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6177
No description provided.