[PR #6349] [MERGED] fix(clients): render all tunnel configs for multi-inbound client (#6346) #6230

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6349
Author: @TheMRVX
Created: 8/28/2026
Status: ✅ Merged
Merged: 9/3/2026
Merged by: @MHSanaei

Base: main ← Head: fix/multi-tunnel-client-configs


📝 Commits (1)

  • caef652 fix(clients): render all tunnel configs for multi-inbound client (#6346)

📊 Changes

6 files changed (+349 additions, -105 deletions)

View changed files

📝 frontend/src/lib/inbounds/label.ts (+23 -0)
📝 frontend/src/pages/clients/ClientInfoModal.tsx (+67 -41)
📝 frontend/src/pages/clients/ClientQrModal.tsx (+65 -54)
📝 frontend/src/pages/clients/amneziawgConfig.ts (+5 -5)
📝 frontend/src/pages/clients/wireguardConfig.ts (+6 -5)
➕ frontend/src/test/multi-tunnel-client-config.test.tsx (+183 -0)

📄 Description

Summary

Fixes #6346.

When a client is attached to multiple AmneziaWG or WireGuard inbounds (such as across remote DE and FI nodes), ClientInfoModal and ClientQrModal previously only returned the first matching inbound. Subsequent inbounds' configurations, node-specific endpoints, and QR codes were unreachable.

Type of change

  • Bug fix

Areas affected

  • Frontend (UI / panel pages)

Changes

  • Multi-inbound selectors: Added findAmneziaWGInbounds and findWireguardInbounds returning all matching inbounds.
  • Unified meta helper: Added formatTunnelConfigMeta in label.ts to unify label, fileName, and qrRemark derivation across modals with collision-free naming.
  • AllowedIPs override: Added addressOverride support to buildWireguardClientConfig matching buildAmneziaWGClientConfig.
  • Client Modals: Rendered separate labeled config blocks in ClientInfoModal and distinct QR panels in ClientQrModal for every attached tunnel inbound.
  • Component Tests: Added multi-tunnel-client-config.test.tsx testing ClientInfoModal and ClientQrModal rendering and verifying distinct endpoints and keys.

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/6349 **Author:** [@TheMRVX](https://github.com/TheMRVX) **Created:** 8/28/2026 **Status:** ✅ Merged **Merged:** 9/3/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/multi-tunnel-client-configs` --- ### 📝 Commits (1) - [`caef652`](https://github.com/MHSanaei/3x-ui/commit/caef652f43cc9dc8cb58d8ddf4bd0ac46a2ebaa9) fix(clients): render all tunnel configs for multi-inbound client (#6346) ### 📊 Changes **6 files changed** (+349 additions, -105 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/lib/inbounds/label.ts` (+23 -0) 📝 `frontend/src/pages/clients/ClientInfoModal.tsx` (+67 -41) 📝 `frontend/src/pages/clients/ClientQrModal.tsx` (+65 -54) 📝 `frontend/src/pages/clients/amneziawgConfig.ts` (+5 -5) 📝 `frontend/src/pages/clients/wireguardConfig.ts` (+6 -5) ➕ `frontend/src/test/multi-tunnel-client-config.test.tsx` (+183 -0) </details> ### 📄 Description ## Summary Fixes #6346. When a client is attached to multiple **AmneziaWG** or **WireGuard** inbounds (such as across remote DE and FI nodes), `ClientInfoModal` and `ClientQrModal` previously only returned the first matching inbound. Subsequent inbounds' configurations, node-specific endpoints, and QR codes were unreachable. ## Type of change - [x] Bug fix ## Areas affected - [x] Frontend (UI / panel pages) ## Changes - **Multi-inbound selectors:** Added `findAmneziaWGInbounds` and `findWireguardInbounds` returning all matching inbounds. - **Unified meta helper:** Added `formatTunnelConfigMeta` in `label.ts` to unify `label`, `fileName`, and `qrRemark` derivation across modals with collision-free naming. - **AllowedIPs override:** Added `addressOverride` support to `buildWireguardClientConfig` matching `buildAmneziaWGClientConfig`. - **Client Modals:** Rendered separate labeled config blocks in `ClientInfoModal` and distinct QR panels in `ClientQrModal` for every attached tunnel inbound. - **Component Tests:** Added `multi-tunnel-client-config.test.tsx` testing `ClientInfoModal` and `ClientQrModal` rendering and verifying distinct endpoints and keys. ## 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. - [x] 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:07:16 +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#6230
No description provided.