[PR #5517] [MERGED] feat(web): vless encryption new modes #5910

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5517
Author: @FunLay123
Created: 6/23/2026
Status: ✅ Merged
Merged: 6/24/2026
Merged by: @MHSanaei

Base: main ← Head: vless_encryption


📝 Commits (9)

  • eed31b2 feat(web): add vless encryption new modes
  • 356a931 feat(web): add translations for vless encryption modes
  • 9af1b84 Merge branch 'MHSanaei:main' into vless_encryption
  • 409ff31 Merge branch 'MHSanaei:main' into vless_encryption
  • a3be452 Merge branch 'MHSanaei:main' into vless_encryption
  • f904ada feat(translation): bring "vlessAuthX25519" and "vlessAuthMlkem768" to general form
  • 57f9b81 Merge branch 'vless_encryption' of https://github.com/FunLay123/3x-ui into vless_encryption
  • 2537f2e Merge branch 'MHSanaei:main' into vless_encryption
  • cb03adb Merge branch 'main' into vless_encryption

📊 Changes

17 files changed (+219 additions, -51 deletions)

View changed files

📝 frontend/src/pages/inbounds/form/InboundFormModal.tsx (+19 -3)
📝 frontend/src/pages/inbounds/form/protocols/vless.tsx (+31 -8)
📝 internal/web/service/server.go (+24 -1)
📝 internal/web/service/server_vlessenc_test.go (+28 -0)
📝 internal/web/translation/ar-EG.json (+9 -3)
📝 internal/web/translation/en-US.json (+9 -3)
📝 internal/web/translation/es-ES.json (+9 -3)
📝 internal/web/translation/fa-IR.json (+9 -3)
📝 internal/web/translation/id-ID.json (+9 -3)
📝 internal/web/translation/ja-JP.json (+9 -3)
📝 internal/web/translation/pt-BR.json (+9 -3)
📝 internal/web/translation/ru-RU.json (+9 -3)
📝 internal/web/translation/tr-TR.json (+9 -3)
📝 internal/web/translation/uk-UA.json (+9 -3)
📝 internal/web/translation/vi-VN.json (+9 -3)
📝 internal/web/translation/zh-CN.json (+9 -3)
📝 internal/web/translation/zh-TW.json (+9 -3)

📄 Description

Summary

Adds xorpub and random VLESS Encryption auth modes (X25519 + ML-KEM-768) to the inbound form, derived from the same key material xray vlessenc already generates for native, plus full translations for the new UI strings across all locales.

Why

xray vlessenc only outputs the native mode, even though Xray-core's VLESS Encryption supports three wire-obfuscation modes (native/xorpub/random) on the same key pair. Users who want xorpub or random had no way to get a ready-to-use config from the panel and had to hand-edit the generated string. This PR derives all three modes server-side and exposes them as one-click buttons.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

  • UI: opened the VLESS inbound form, clicked all 6 auth buttons (x25519, x25519 (xorpub), x25519 (random), mlkem768, mlkem768 (xorpub), mlkem768 (random)); each one correctly populated settings.decryption/settings.encryption, and the "selected auth" label under the buttons updated to the matching translated string.
  • Saved an inbound with mlkem768 (random) auth; Xray started successfully with no config-parsing errors in the log.
  • Tested connection between server and client with x25519 (random) - Works :)

Screenshots / recordings

изображение изображение изображение

Breaking changes

None. Existing inbounds and the native-only API response shape are untouched; this only adds new optional auth IDs and translation 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/5517 **Author:** [@FunLay123](https://github.com/FunLay123) **Created:** 6/23/2026 **Status:** ✅ Merged **Merged:** 6/24/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `vless_encryption` --- ### 📝 Commits (9) - [`eed31b2`](https://github.com/MHSanaei/3x-ui/commit/eed31b24dc212f5c2827742783af90f699349281) feat(web): add vless encryption new modes - [`356a931`](https://github.com/MHSanaei/3x-ui/commit/356a931b15856f6ffd2e7bf78923b9a0d2766948) feat(web): add translations for vless encryption modes - [`9af1b84`](https://github.com/MHSanaei/3x-ui/commit/9af1b8481d723bf0a337ac54b0d11985466dad64) Merge branch 'MHSanaei:main' into vless_encryption - [`409ff31`](https://github.com/MHSanaei/3x-ui/commit/409ff31ab7d9688af696f78f310da2ad8c4b7c75) Merge branch 'MHSanaei:main' into vless_encryption - [`a3be452`](https://github.com/MHSanaei/3x-ui/commit/a3be4524033bc7ebb961efab4d7d48144bea0dfc) Merge branch 'MHSanaei:main' into vless_encryption - [`f904ada`](https://github.com/MHSanaei/3x-ui/commit/f904adad12998223d69b383020f7d81dfb400a62) feat(translation): bring "vlessAuthX25519" and "vlessAuthMlkem768" to general form - [`57f9b81`](https://github.com/MHSanaei/3x-ui/commit/57f9b814f6f330cc927ad90ac7f20ce25aabee2c) Merge branch 'vless_encryption' of https://github.com/FunLay123/3x-ui into vless_encryption - [`2537f2e`](https://github.com/MHSanaei/3x-ui/commit/2537f2ebe45f43f094b615748763cc36502b511a) Merge branch 'MHSanaei:main' into vless_encryption - [`cb03adb`](https://github.com/MHSanaei/3x-ui/commit/cb03adbc9e20403327e710776ce18f30e2eda58a) Merge branch 'main' into vless_encryption ### 📊 Changes **17 files changed** (+219 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/pages/inbounds/form/InboundFormModal.tsx` (+19 -3) 📝 `frontend/src/pages/inbounds/form/protocols/vless.tsx` (+31 -8) 📝 `internal/web/service/server.go` (+24 -1) 📝 `internal/web/service/server_vlessenc_test.go` (+28 -0) 📝 `internal/web/translation/ar-EG.json` (+9 -3) 📝 `internal/web/translation/en-US.json` (+9 -3) 📝 `internal/web/translation/es-ES.json` (+9 -3) 📝 `internal/web/translation/fa-IR.json` (+9 -3) 📝 `internal/web/translation/id-ID.json` (+9 -3) 📝 `internal/web/translation/ja-JP.json` (+9 -3) 📝 `internal/web/translation/pt-BR.json` (+9 -3) 📝 `internal/web/translation/ru-RU.json` (+9 -3) 📝 `internal/web/translation/tr-TR.json` (+9 -3) 📝 `internal/web/translation/uk-UA.json` (+9 -3) 📝 `internal/web/translation/vi-VN.json` (+9 -3) 📝 `internal/web/translation/zh-CN.json` (+9 -3) 📝 `internal/web/translation/zh-TW.json` (+9 -3) </details> ### 📄 Description ## Summary Adds `xorpub` and `random` VLESS Encryption auth modes (X25519 + ML-KEM-768) to the inbound form, derived from the same key material `xray vlessenc` already generates for `native`, plus full translations for the new UI strings across all locales. ## Why `xray vlessenc` only outputs the `native` mode, even though Xray-core's VLESS Encryption supports three wire-obfuscation modes (`native`/`xorpub`/`random`) on the same key pair. Users who want `xorpub` or `random` had no way to get a ready-to-use config from the panel and had to hand-edit the generated string. This PR derives all three modes server-side and exposes them as one-click buttons. ## Type of change - [ ] Bug fix - [x] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [x] Frontend (UI / panel pages) - [x] Backend (API endpoints, login, settings) - [x] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? - UI: opened the VLESS inbound form, clicked all 6 auth buttons (`x25519`, `x25519 (xorpub)`, `x25519 (random)`, `mlkem768`, `mlkem768 (xorpub)`, `mlkem768 (random)`); each one correctly populated `settings.decryption`/`settings.encryption`, and the "selected auth" label under the buttons updated to the matching translated string. - Saved an inbound with `mlkem768 (random)` auth; Xray started successfully with no config-parsing errors in the log. - Tested connection between server and client with `x25519 (random)` - Works :) ## Screenshots / recordings <img width="780" height="468" alt="изображение" src="https://github.com/user-attachments/assets/7198beb2-f808-42bf-920a-8c50dbc33795" /> <img width="765" height="459" alt="изображение" src="https://github.com/user-attachments/assets/394d03a1-9614-4925-8ec4-362fa123c930" /> <img width="776" height="470" alt="изображение" src="https://github.com/user-attachments/assets/085af6a1-3785-4b7e-aba3-db8f93d86a12" /> ## Breaking changes None. Existing inbounds and the `native`-only API response shape are untouched; this only adds new optional auth IDs and translation 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. - [ ] 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:04:57 +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#5910
No description provided.