[PR #5620] [CLOSED] Fix WireGuard client binding in client manager #5933

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

📋 Pull Request Information

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

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


📝 Commits (7)

  • 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

📊 Changes

14 files changed (+1222 additions, -119 deletions)

View changed files

📝 frontend/public/openapi.json (+9 -9)
📝 frontend/src/pages/api-docs/endpoints.ts (+9 -9)
📝 frontend/src/pages/clients/ClientBulkAddModal.tsx (+1 -1)
📝 frontend/src/pages/clients/ClientFormModal.tsx (+6 -6)
📝 frontend/src/pages/clients/ClientsPage.css (+74 -0)
📝 frontend/src/pages/inbounds/form/protocols/wireguard.tsx (+15 -0)
📝 frontend/src/schemas/protocols/inbound/wireguard.ts (+5 -0)
📝 internal/web/service/client_bulk.go (+129 -1)
📝 internal/web/service/client_crud.go (+140 -3)
📝 internal/web/service/inbound.go (+44 -11)
📝 internal/web/service/inbound_disable.go (+5 -1)
➕ internal/web/service/wireguard_client_binding.go (+480 -0)
➕ internal/web/service/wireguard_client_binding_test.go (+218 -0)
📝 internal/web/service/xray.go (+87 -78)

📄 Description

Summary

  • Treat WireGuard as peer-managed in the client manager: attach/detach/update use client_inbounds links instead of settings.clients.
  • Synchronize WireGuard peer binding metadata onto settings.peers[] (clientId, clientEmail, clientSubId, clientComment, comment) and preserve it in the inbound form.
  • Document the WireGuard client binding behavior in the API docs and regenerated OpenAPI output.

Testing

  • go test ./internal/web/service
  • npm --prefix frontend run build

🔄 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/5620 **Author:** [@fastnas2023](https://github.com/fastnas2023) **Created:** 6/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/wireguard-client-binding` --- ### 📝 Commits (7) - [`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 ### 📊 Changes **14 files changed** (+1222 additions, -119 deletions) <details> <summary>View changed files</summary> 📝 `frontend/public/openapi.json` (+9 -9) 📝 `frontend/src/pages/api-docs/endpoints.ts` (+9 -9) 📝 `frontend/src/pages/clients/ClientBulkAddModal.tsx` (+1 -1) 📝 `frontend/src/pages/clients/ClientFormModal.tsx` (+6 -6) 📝 `frontend/src/pages/clients/ClientsPage.css` (+74 -0) 📝 `frontend/src/pages/inbounds/form/protocols/wireguard.tsx` (+15 -0) 📝 `frontend/src/schemas/protocols/inbound/wireguard.ts` (+5 -0) 📝 `internal/web/service/client_bulk.go` (+129 -1) 📝 `internal/web/service/client_crud.go` (+140 -3) 📝 `internal/web/service/inbound.go` (+44 -11) 📝 `internal/web/service/inbound_disable.go` (+5 -1) ➕ `internal/web/service/wireguard_client_binding.go` (+480 -0) ➕ `internal/web/service/wireguard_client_binding_test.go` (+218 -0) 📝 `internal/web/service/xray.go` (+87 -78) </details> ### 📄 Description ## Summary - Treat WireGuard as peer-managed in the client manager: attach/detach/update use `client_inbounds` links instead of `settings.clients`. - Synchronize WireGuard peer binding metadata onto `settings.peers[]` (`clientId`, `clientEmail`, `clientSubId`, `clientComment`, `comment`) and preserve it in the inbound form. - Document the WireGuard client binding behavior in the API docs and regenerated OpenAPI output. ## Testing - `go test ./internal/web/service` - `npm --prefix frontend run build` --- <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:08 +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#5933
No description provided.