[PR #5639] [CLOSED] Fix WireGuard client binding and external link toggles #5943

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5639
Author: @fastnas2023
Created: 6/28/2026
Status: ❌ Closed

Base: main ← Head: fix/wireguard-client-binding


📝 Commits (10+)

  • c255c1b Fix WireGuard client binding
  • 5692d26 Harden WireGuard client peer lifecycle
  • dbef964 Show WireGuard in client inbound pickers
  • 559293d Show all selected client inbounds
  • bbd6a5e Improve client inbound picker layout
  • 283a7ff Refine client form modal layout
  • f426c6d Loosen client inbound tag spacing
  • 1dd5bd3 Add enable toggle for external client links
  • 4f9e46b Document external link enable API fields
  • e16ee58 Extend external client link metadata

📊 Changes

27 files changed (+1762 additions, -180 deletions)

View changed files

📝 frontend/public/openapi.json (+30 -13)
📝 frontend/scripts/build-openapi.mjs (+12 -2)
📝 frontend/src/hooks/useClients.ts (+9 -1)
📝 frontend/src/pages/api-docs/endpoints.ts (+15 -13)
📝 frontend/src/pages/clients/ClientBulkAddModal.tsx (+1 -1)
📝 frontend/src/pages/clients/ClientFormModal.tsx (+117 -28)
📝 frontend/src/pages/clients/ClientsPage.css (+142 -0)
📝 frontend/src/pages/inbounds/form/protocols/wireguard.tsx (+15 -0)
📝 frontend/src/schemas/client.ts (+6 -0)
📝 frontend/src/schemas/protocols/inbound/wireguard.ts (+5 -0)
📝 internal/database/db.go (+18 -0)
📝 internal/database/model/model.go (+12 -7)
📝 internal/sub/external_config.go (+67 -12)
📝 internal/sub/external_config_test.go (+26 -0)
📝 internal/sub/external_subscription.go (+26 -2)
📝 internal/sub/mutation_audit_test.go (+11 -0)
📝 internal/web/service/client_bulk.go (+129 -1)
📝 internal/web/service/client_crud.go (+140 -3)
📝 internal/web/service/client_external_link.go (+40 -7)
➕ internal/web/service/client_external_link_test.go (+97 -0)

...and 7 more files

📄 Description

Summary

  • Fix WireGuard client attachment so client bindings map to settings.peers[] instead of unsupported settings.clients[].
  • Generate/reuse WireGuard peers for bound clients and filter inactive/expired/depleted/detached managed peers from runtime Xray config.
  • Allow WireGuard in client inbound pickers and improve selected inbound tag layout.
  • Add per-row enable toggles for client external links/subscriptions; disabled rows remain saved but are omitted from generated subscriptions.
  • Update OpenAPI docs and add focused service/subscription tests.

Verification

  • go test ./internal/web/service ./internal/sub
  • go test ./...
  • npm --prefix frontend run build
  • git diff --check

🔄 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/5639 **Author:** [@fastnas2023](https://github.com/fastnas2023) **Created:** 6/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/wireguard-client-binding` --- ### 📝 Commits (10+) - [`c255c1b`](https://github.com/MHSanaei/3x-ui/commit/c255c1b003e3931a5a8d52c92b008b68d1b0b35c) Fix WireGuard client binding - [`5692d26`](https://github.com/MHSanaei/3x-ui/commit/5692d2660266c5d30473a5ab5f47ec48adfc3153) Harden WireGuard client peer lifecycle - [`dbef964`](https://github.com/MHSanaei/3x-ui/commit/dbef964e49804a605bb746c1d53b51b95afa5f8d) Show WireGuard in client inbound pickers - [`559293d`](https://github.com/MHSanaei/3x-ui/commit/559293d8207cacc8577d7e16ca11585e547a8ffe) Show all selected client inbounds - [`bbd6a5e`](https://github.com/MHSanaei/3x-ui/commit/bbd6a5ecf56c95c79780de83201dd48142b67436) Improve client inbound picker layout - [`283a7ff`](https://github.com/MHSanaei/3x-ui/commit/283a7ff08930db1cdc772e0daf657959918c8ce7) Refine client form modal layout - [`f426c6d`](https://github.com/MHSanaei/3x-ui/commit/f426c6d496ca3da7916bd2180dd1e759d3b0d7e1) Loosen client inbound tag spacing - [`1dd5bd3`](https://github.com/MHSanaei/3x-ui/commit/1dd5bd30753e008f0fbf86ffeb494f547934018e) Add enable toggle for external client links - [`4f9e46b`](https://github.com/MHSanaei/3x-ui/commit/4f9e46bdf27bb2cd450e9e91827b1a489a5e02c4) Document external link enable API fields - [`e16ee58`](https://github.com/MHSanaei/3x-ui/commit/e16ee5874fe0296c2cc671b32024d82546df393a) Extend external client link metadata ### 📊 Changes **27 files changed** (+1762 additions, -180 deletions) <details> <summary>View changed files</summary> 📝 `frontend/public/openapi.json` (+30 -13) 📝 `frontend/scripts/build-openapi.mjs` (+12 -2) 📝 `frontend/src/hooks/useClients.ts` (+9 -1) 📝 `frontend/src/pages/api-docs/endpoints.ts` (+15 -13) 📝 `frontend/src/pages/clients/ClientBulkAddModal.tsx` (+1 -1) 📝 `frontend/src/pages/clients/ClientFormModal.tsx` (+117 -28) 📝 `frontend/src/pages/clients/ClientsPage.css` (+142 -0) 📝 `frontend/src/pages/inbounds/form/protocols/wireguard.tsx` (+15 -0) 📝 `frontend/src/schemas/client.ts` (+6 -0) 📝 `frontend/src/schemas/protocols/inbound/wireguard.ts` (+5 -0) 📝 `internal/database/db.go` (+18 -0) 📝 `internal/database/model/model.go` (+12 -7) 📝 `internal/sub/external_config.go` (+67 -12) 📝 `internal/sub/external_config_test.go` (+26 -0) 📝 `internal/sub/external_subscription.go` (+26 -2) 📝 `internal/sub/mutation_audit_test.go` (+11 -0) 📝 `internal/web/service/client_bulk.go` (+129 -1) 📝 `internal/web/service/client_crud.go` (+140 -3) 📝 `internal/web/service/client_external_link.go` (+40 -7) ➕ `internal/web/service/client_external_link_test.go` (+97 -0) _...and 7 more files_ </details> ### 📄 Description ## Summary - Fix WireGuard client attachment so client bindings map to `settings.peers[]` instead of unsupported `settings.clients[]`. - Generate/reuse WireGuard peers for bound clients and filter inactive/expired/depleted/detached managed peers from runtime Xray config. - Allow WireGuard in client inbound pickers and improve selected inbound tag layout. - Add per-row enable toggles for client external links/subscriptions; disabled rows remain saved but are omitted from generated subscriptions. - Update OpenAPI docs and add focused service/subscription tests. ## Verification - `go test ./internal/web/service ./internal/sub` - `go test ./...` - `npm --prefix frontend run build` - `git diff --check` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:05:12 +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#5943
No description provided.