mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5987] [Question]: MTProto secret is now per-client (set via Clients page), not in the inbound form #4152
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#4152
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 @Farrier on GitHub (Jul 16, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5987
Describe the bug
When trying to create an MTProto inbound, the "secret" field is missing in the protocol tab as well as in the advanced section. If the inbound is created as is, no link is generated when attempting to export links.
How to reproduce the problem
Open Inbounds
Create an mtproto inbound
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
3x-ui version
3.5.0
Xray-core version
26.7.11
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 24.04 LTS
Which parts of the panel are affected?
Frontend (UI / panel pages)
Browser (only if it is a UI bug)
Firefox 152.0.6
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jul 16, 2026):
This is expected behavior for the current MTProto implementation, not a bug. As of v3.5.0, MTProto inbounds are natively multi-client, and the FakeTLS
secretmoved from the inbound to the client. This is a deliberate, documented change (release notes: "MTProto goes multi-client... legacy single-secret inbounds migrate automatically to the clients model"), not a regression.Where the secret actually is
frontend/src/pages/inbounds/form/protocols/mtproto.tsx) only exposes fronting/network options —fakeTlsDomain, domain-fronting IP/port/proxy-protocol,proxyProtocolListener,preferIp,debug,throttleMaxConnections,routeThroughXray/outbound tag,publicIpv4/publicIpv6. There is nosecretfield there by design, and the Advanced JSON editor uses the same schema, so it isn't there either.secret(and the optionaladTag) are per-client fields, set from Clients → Add Clients → Credentials tab (frontend/src/pages/clients/ClientFormModal.tsx, lines 865-874). A secret is auto-generated the first time a client is attached to an MTProto inbound (generateMtprotoSecret, same file, lines 362 and 386-390); a reload button regenerates it.InboundService.normalizeMtprotoSecret(internal/web/service/inbound.go, lines 595-613) strips any inbound-levelsecret/adTagon every save and rebuilds only the per-client secrets. The code comment there is explicit: "Leaving an inbound-level secret behind is what produced stale links that failed with 'incorrect client random'." Client creation also rejects an MTProto client with an empty secret (same file, lines 806-808:"mtproto client requires a secret"). The commit that removed the old inbound-level secret is84b64230("fix(mtproto): stop persisting a vestigial inbound-level secret").Why no link was exported
A newly created inbound — MTProto or any other multi-client protocol — starts with zero clients.
genInboundLinks(frontend/src/lib/xray/inbound-link.ts, lines 1206-1230) builds the export text by iterating the inbound's client list and returns an empty string when that list is empty;genMtprotoLink(same file, lines 789-798) likewise returns''when the client secret is empty. Nothing errors — there is simply no client (and therefore no secret) yet.How to get a working MTProto link
tg://proxylink and QR code are then available from that client's row, and the inbound's Export action will include it.Relabeling as
questionand closing as not a bug. Reopen if following the steps above still does not produce a working secret or link.This reply was generated automatically; a maintainer may follow up.