mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5772] [Bug]: VLESS Key Generation dropdown always resets to "X25519 (native)" regardless of the initially selected option #4016
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4016
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @BaseBlank on GitHub (Jul 3, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5772
Describe the bug
When editing a VLESS inbound, the Key Generation dropdown UI does not restore its previous state.
Regardless of which of the 6 options (e.g.,
ML-KEM-768 (random),X25519 (xorpub), etc.) was initially selected to generate the keys, the dropdown always resets and displays the first default option:X25519 (native)when the edit panel is reopened.While the actual
decryptionandencryptionstrings are saved and loaded correctly from the backend, the frontend UI fails to reverse-parse these strings to restore the correct selected state of the dropdown. This stateless behavior is visually misleading for users, making it look like their configuration has been downgraded or lost.How to reproduce the problem
Inboundspage.VLESSinbound.ML-KEM-768 (random)orX25519 (xorpub)).Generateto populate the Decryption and Encryption fields.Saveto create the inbound.Editon the newly created VLESS inbound.X25519 (native).Expected behavior
I expected the frontend panel to parse the loaded
decryptionstring (e.g., detecting identifiers likemlkem768x25519plus,.random.,.xorpub., etc.) during the edit modal initialization, and automatically bind the dropdown to the correct matching option.Actual behavior
Instead, the panel always resets the dropdown to
X25519 (native)during the edit modal initialization, ignoring the actual format of the saved keys.Relevant logs
Screenshots
No response
3x-ui version
3.4.2
Xray-core version
26.6.27
How did you install 3x-ui?
install.sh script
Operating system
Debian 12
Which parts of the panel are affected?
Frontend (UI / panel pages)
Browser (only if it is a UI bug)
Chrome
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jul 3, 2026):
This is the same issue as #5744, which is already fixed on
mainbut not yet in a tagged release.Confirmed in the source: on
main,frontend/src/pages/inbounds/form/protocols/vless.tsxnow initializes theauthKinddropdown state from avlessAuthKindprop (useState<VlessAuthKind>(vlessAuthKind ?? 'x25519'), with auseEffectto keep it in sync when the prop changes), instead of the old hardcodeduseState<VlessAuthKind>('x25519'). That prop is computed infrontend/src/pages/inbounds/form/InboundFormModal.tsxvia a new shared helper,vlessEncryptionAuthKind()infrontend/src/lib/xray/vless-encryption.ts, which parses the dot-delimitedencryptionstring (mode markernative/xorpub/randomplus key length to distinguishx25519vsmlkem768) and is used for both the "Already selected" label and the dropdown's initial/synced value, so the two can no longer diverge.That fix landed in commit
97e2c9e("fix(web): sync the VLESS generate-key dropdown with the encryption field"), merged 2026-07-02, three days after thev3.4.2tag (2026-06-29) you're running. It is not in any tagged release yet.Closing as a duplicate of #5744; further discussion should continue there. You can track when it ships in a release via the releases page, or build from
mainin the meantime if you need it sooner.This reply was generated automatically. A maintainer may follow up.