[PR #5642] [CLOSED] fix(wireguard): restore client config UX #5945

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/5642
Author: @mrAntonD
Created: 6/28/2026
Status: ❌ Closed

Base: main ← Head: codex/upstream-wg-ux-fixes


📝 Commits (2)

  • fb32ced fix(wireguard): restore client config UX
  • 5051cbe fix(wireguard): address PR review feedback

📊 Changes

18 files changed (+276 additions, -21 deletions)

View changed files

📝 frontend/public/openapi.json (+9 -1)
📝 frontend/src/generated/examples.ts (+3 -1)
📝 frontend/src/generated/schemas.ts (+6 -0)
📝 frontend/src/generated/types.ts (+2 -0)
📝 frontend/src/generated/zod.ts (+2 -0)
📝 frontend/src/hooks/useClients.ts (+4 -0)
📝 frontend/src/pages/clients/ClientFormModal.tsx (+54 -2)
📝 frontend/src/pages/clients/ClientInfoModal.css (+5 -0)
📝 frontend/src/pages/clients/ClientInfoModal.tsx (+45 -6)
📝 frontend/src/pages/clients/ClientQrModal.tsx (+29 -5)
📝 frontend/src/pages/clients/ClientsPage.tsx (+2 -0)
➕ frontend/src/pages/clients/wireguardConfig.ts (+43 -0)
📝 frontend/src/pages/inbounds/info/InboundInfoModal.tsx (+7 -2)
📝 frontend/src/pages/inbounds/list/useInboundColumns.tsx (+27 -2)
📝 frontend/src/pages/inbounds/qr/QrCodeModal.tsx (+3 -2)
📝 frontend/src/schemas/client.ts (+2 -0)
📝 internal/web/service/inbound.go (+31 -0)
📝 internal/web/translation/en-US.json (+2 -0)

📄 Description

Summary

This PR restores several WireGuard client UX pieces on top of the upstream multi-client implementation:

  • show an always-visible active client count beside the total client count for inbounds, including 0 active clients;
  • add a direct settings.clients[] fallback in the inbound list so WireGuard counts render even when the async rollup has not populated clientCount yet;
  • show the WireGuard inbound server public key in the inbound info modal by deriving it from secretKey when needed;
  • expose WireGuard .conf client config in the client create/edit form, client info modal, and client QR modal, with copy/download/QR actions;
  • keep wireguard:// peer links copy-only instead of rendering QR codes that are not useful for standard WireGuard clients;
  • include lightweight WireGuard hints (wgPublicKey, wgMtu) in inbound options so client views can render complete configs.

Why

After testing the current upstream WireGuard multi-client flow, the data model works, but several UX pieces from the earlier implementation were missing. This made it hard to inspect/copy client configs and caused peer-link QR codes to appear even though they do not lead to a usable WireGuard import.

This is a focused follow-up to the earlier WireGuard client work and review iterations:

Validation

  • npm run build from frontend using Node 22
  • go test ./internal/web/service
  • deployed and smoke-tested on a test NL server: panel/sub ports active, Xray started, WireGuard client UX checked manually

🔄 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/5642 **Author:** [@mrAntonD](https://github.com/mrAntonD) **Created:** 6/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/upstream-wg-ux-fixes` --- ### 📝 Commits (2) - [`fb32ced`](https://github.com/MHSanaei/3x-ui/commit/fb32ced61eb9b0a09fca54c243447aef6be06249) fix(wireguard): restore client config UX - [`5051cbe`](https://github.com/MHSanaei/3x-ui/commit/5051cbea08a537dd4cbdb4562db07f780018510e) fix(wireguard): address PR review feedback ### 📊 Changes **18 files changed** (+276 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `frontend/public/openapi.json` (+9 -1) 📝 `frontend/src/generated/examples.ts` (+3 -1) 📝 `frontend/src/generated/schemas.ts` (+6 -0) 📝 `frontend/src/generated/types.ts` (+2 -0) 📝 `frontend/src/generated/zod.ts` (+2 -0) 📝 `frontend/src/hooks/useClients.ts` (+4 -0) 📝 `frontend/src/pages/clients/ClientFormModal.tsx` (+54 -2) 📝 `frontend/src/pages/clients/ClientInfoModal.css` (+5 -0) 📝 `frontend/src/pages/clients/ClientInfoModal.tsx` (+45 -6) 📝 `frontend/src/pages/clients/ClientQrModal.tsx` (+29 -5) 📝 `frontend/src/pages/clients/ClientsPage.tsx` (+2 -0) ➕ `frontend/src/pages/clients/wireguardConfig.ts` (+43 -0) 📝 `frontend/src/pages/inbounds/info/InboundInfoModal.tsx` (+7 -2) 📝 `frontend/src/pages/inbounds/list/useInboundColumns.tsx` (+27 -2) 📝 `frontend/src/pages/inbounds/qr/QrCodeModal.tsx` (+3 -2) 📝 `frontend/src/schemas/client.ts` (+2 -0) 📝 `internal/web/service/inbound.go` (+31 -0) 📝 `internal/web/translation/en-US.json` (+2 -0) </details> ### 📄 Description ## Summary This PR restores several WireGuard client UX pieces on top of the upstream multi-client implementation: - show an always-visible active client count beside the total client count for inbounds, including `0` active clients; - add a direct `settings.clients[]` fallback in the inbound list so WireGuard counts render even when the async rollup has not populated `clientCount` yet; - show the WireGuard inbound server public key in the inbound info modal by deriving it from `secretKey` when needed; - expose WireGuard `.conf` client config in the client create/edit form, client info modal, and client QR modal, with copy/download/QR actions; - keep `wireguard://` peer links copy-only instead of rendering QR codes that are not useful for standard WireGuard clients; - include lightweight WireGuard hints (`wgPublicKey`, `wgMtu`) in inbound options so client views can render complete configs. ## Why After testing the current upstream WireGuard multi-client flow, the data model works, but several UX pieces from the earlier implementation were missing. This made it hard to inspect/copy client configs and caused peer-link QR codes to appear even though they do not lead to a usable WireGuard import. This is a focused follow-up to the earlier WireGuard client work and review iterations: - #5631 - #5623 - #5607 - #5466 ## Validation - `npm run build` from `frontend` using Node 22 - `go test ./internal/web/service` - deployed and smoke-tested on a test NL server: panel/sub ports active, Xray started, WireGuard client UX checked manually --- <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#5945
No description provided.