mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5573] [Bug]: Public keys created via the API do not appear in the panel. #3892
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#3892
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 @tanmoumou252 on GitHub (Jun 25, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5573
Describe the bug
The public key created via the API does not appear in the input panel, but it can be seen in the panel’s JSON.
And the private key is always displayed.
However, when copying inbound links such as VLESS from the panel, they are copied directly from the panel. In other words, the VLESS pbk field is empty.
How to reproduce the problem
Expected behavior
.
Actual behavior
.
Relevant logs
Screenshots
3x-ui version
3.4.0
Xray-core version
v26.6.22
How did you install 3x-ui?
Other (please describe in the bug body)
Operating system
Alpine
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
Firefox
Is the panel behind a reverse proxy or CDN?
Yes — other
Before submitting
@github-actions[bot] commented on GitHub (Jun 25, 2026):
The root cause is a mismatch between the JSON structure your script submits and the structure the panel expects for REALITY settings. Specifically,
publicKeyis being placed at the top level ofrealitySettings, but the panel schema requires it to be nested inside asettingssub-object one level deeper.What your script sends:
What the panel expects (confirmed in
frontend/src/schemas/protocols/security/reality.tsand the canonical test fixturefrontend/src/test/golden/fixtures/inbound-full/vless-tcp-reality.json):Why the behaviour looks inconsistent:
internal/web/service/inbound.go) storesstreamSettingsas a raw JSON blob without transforming therealitySettingssub-tree, so whatever the caller submits is persisted verbatim. The "JSON view" in the panel therefore shows yourpublicKeyat the top level because that is exactly what was stored.RealityStreamSettingsSchema), which reads the public key fromrealitySettings.settings.publicKey. Because that path is absent in your stored blob, the form renders the public key field as empty and the VLESS link generator emitspbk=with no value (inbound-link.tsline 410:params.set('pbk', reality.settings.publicKey)).realitySettingsin both the schema and your payload, so it lands in the right place.Fix for your script — update the
realitySettingssection of the payload:Delete and re-create the inbound (or use the update endpoint) with this corrected payload. After that the panel form will display the public key, and copied VLESS links will carry the correct
pbkvalue.This reply was generated automatically; a maintainer may follow up.