[PR #6455] [MERGED] feat(clients): add Generate button for WireGuard/AmneziaWG PresharedKey #6277

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6455
Author: @mrchatam
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/12/2026
Merged by: @MHSanaei

Base: main ← Head: feat/wg-psk-generate


📝 Commits (2)

  • b6fbcbb feat(clients): add Generate button for WireGuard/AmneziaWG PresharedKey
  • 47d95ed fix(clients): keep FormField for WireGuard PresharedKey generate

📊 Changes

1 file changed (+16 additions, -4 deletions)

View changed files

📝 frontend/src/pages/clients/ClientFormModal.tsx (+16 -4)

📄 Description

Summary

Fixes #6343.

Adds a regenerate button next to the WireGuard/AmneziaWG client PresharedKey field in ClientFormModal, matching the existing private-key / password regenerate controls (Space.Compact + ReloadOutlined).

Value is 32 random bytes encoded as base64 via the existing Wireguard.generatePresharedKey() + keyToBase64() helpers (same format as wg genpsk). Client-side only; field remains optional.

Test plan

  • Open add/edit client on a WireGuard inbound → Credentials tab shows PresharedKey with regenerate button
  • Same for AmneziaWG inbound (shared field set)
  • Click regenerate → fills a 44-char base64 key; click again → new value
  • Leave empty → client saves and config omits PresharedKey line
  • Set a generated PSK → subscription / .conf includes PresharedKey = …

🔄 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/6455 **Author:** [@mrchatam](https://github.com/mrchatam) **Created:** 9/11/2026 **Status:** ✅ Merged **Merged:** 9/12/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `feat/wg-psk-generate` --- ### 📝 Commits (2) - [`b6fbcbb`](https://github.com/MHSanaei/3x-ui/commit/b6fbcbb0b014b5179275ba69dca0f9c3acf36b49) feat(clients): add Generate button for WireGuard/AmneziaWG PresharedKey - [`47d95ed`](https://github.com/MHSanaei/3x-ui/commit/47d95ed189281bb52e73689465d7b36af63ab8ee) fix(clients): keep FormField for WireGuard PresharedKey generate ### 📊 Changes **1 file changed** (+16 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/pages/clients/ClientFormModal.tsx` (+16 -4) </details> ### 📄 Description ## Summary Fixes #6343. Adds a regenerate button next to the WireGuard/AmneziaWG client `PresharedKey` field in `ClientFormModal`, matching the existing private-key / password regenerate controls (`Space.Compact` + `ReloadOutlined`). Value is 32 random bytes encoded as base64 via the existing `Wireguard.generatePresharedKey()` + `keyToBase64()` helpers (same format as `wg genpsk`). Client-side only; field remains optional. ## Test plan - [ ] Open add/edit client on a WireGuard inbound → Credentials tab shows PresharedKey with regenerate button - [ ] Same for AmneziaWG inbound (shared field set) - [ ] Click regenerate → fills a 44-char base64 key; click again → new value - [ ] Leave empty → client saves and config omits `PresharedKey` line - [ ] Set a generated PSK → subscription / `.conf` includes `PresharedKey = …` --- <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:37 +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#6277
No description provided.