mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5809] [MERGED] [Feature]: Add a tooltip/hint to the "Password" field in the client form clarifying which protocols use it #5994
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#5994
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5809
Author: @ecgang
Created: 7/5/2026
Status: ✅ Merged
Merged: 7/7/2026
Merged by: @MHSanaei
Base:
main← Head:feat/clarify-client-password-hint📝 Commits (2)
97bedfafeat(clients): clarify which protocols use the Password and Hysteria Auth fields07942cftest(clients): assert Password/Hysteria Auth tooltip hints render📊 Changes
15 files changed (+99 additions, -2 deletions)
View changed files
📝
frontend/src/pages/clients/ClientFormModal.tsx(+2 -2)➕
frontend/src/test/client-form-modal.test.tsx(+71 -0)📝
internal/web/translation/ar-EG.json(+2 -0)📝
internal/web/translation/en-US.json(+2 -0)📝
internal/web/translation/es-ES.json(+2 -0)📝
internal/web/translation/fa-IR.json(+2 -0)📝
internal/web/translation/id-ID.json(+2 -0)📝
internal/web/translation/ja-JP.json(+2 -0)📝
internal/web/translation/pt-BR.json(+2 -0)📝
internal/web/translation/ru-RU.json(+2 -0)📝
internal/web/translation/tr-TR.json(+2 -0)📝
internal/web/translation/uk-UA.json(+2 -0)📝
internal/web/translation/vi-VN.json(+2 -0)📝
internal/web/translation/zh-CN.json(+2 -0)📝
internal/web/translation/zh-TW.json(+2 -0)📄 Description
Summary
Add tooltips to the Password and Hysteria Auth fields in the client
create/edit form (
ClientFormModal.tsx), clarifying which protocols actuallyconsume each field. Adds
passwordDesc/hysteriaAuthDesctranslation keys toall 13 locale files, following the existing tooltip convention.
Why
The client form is shared across all multi-client protocols (VLESS, VMess,
Trojan, Shadowsocks, Hysteria, WireGuard) and shows every protocol-specific
field at once, with no indication of which protocol each applies to. The
Password field is only meaningful for Trojan and Shadowsocks; for the
others it is silently ignored, and Hysteria's actual credential is the separate
Hysteria Auth field right below it. This caused real-world confusion
(reported in #5803) about whether a populated/empty Password field mattered for
a VLESS client.
Verified against the backend source —
buildUserAccountininternal/xray/api.go:trojanpassword(required)getRequiredUserString(user, "password")—api.go:500shadowsockspassword(required) + cipher/Keyapi.go:514,:533,:538hysteriaauth(required), not passwordgetRequiredUserString(user, "auth")—api.go:541vmess/vless/wireguardpasswordpasswordaccess in those cases)So the hint text is accurate: Password → Trojan/Shadowsocks only; Hysteria Auth
→ Hysteria only.
Closes #5803.
Type of change
Areas affected
What changed
frontend/src/pages/clients/ClientFormModal.tsx— addedtooltip={t('pages.clients.passwordDesc')}to the PasswordForm.Item(line ~746) and
tooltip={t('pages.clients.hysteriaAuthDesc')}to theHysteria Auth
Form.Item(line ~760). This matches the existing patternalready used for
totalGBDesc,limitIpDesc,renewDesc, andgroupDesc.internal/web/translation/*.json(all 13 locales) — addedpasswordDescand
hysteriaAuthDescunderpages.clients, fully translated per-locale tomatch how sibling
*Desckeys are localized in this repo (not English-only).English strings:
passwordDesc: "Only used by Trojan and Shadowsocks clients; ignored for VLESS, VMess, Hysteria, and WireGuard."hysteriaAuthDesc: "Credential used only by Hysteria clients. Trojan and Shadowsocks use the Password field instead."How was this tested?
internal/xray/api.gobuildUserAccount(see table above).Form.Item ... tooltip={t(...)}convention already present in the same file.
npm run lint(eslint) clean,npm run typecheck(tsc --noEmit) clean,npm run buildsucceeds(note:
gen:apirequires Node ≥ 22.6 for--experimental-strip-types—pre-existing toolchain requirement, unrelated to this change).
appears next to the Password and Hysteria Auth labels and shows the correct
hover text (screenshots below).
Screenshots / recordings
Both tooltips rendered in the Add Client form (Credentials tab), en-US:
Breaking changes
None. Additive translation keys and two
tooltipprops; no behavior or configchange.
Checklist
go build ./...and the test suite pass locally (frontend-only change; Go side untouched).npm run lint,npm run typecheck, andnpm run buildpass.This contribution was developed with AI assistance via terminalhire. The author has reviewed the change and takes responsibility for its content.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.