mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #5957] [Bug]: Clash subscription for VLESS TCP REALITY fails in Mihomo with “REALITY authentication failed” after upgrading to v3.5.0 #4129
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#4129
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 @missync on GitHub (Jul 14, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5957
What are you trying to do?
Description
After upgrading 3x-ui from v3.4.2 to v3.5.0, a VLESS + TCP + REALITY inbound stopped working in Clash Verge Rev / Mihomo.
The native Clash subscription generates valid YAML and Mihomo loads it successfully, but all connections fail with:
The same REALITY node works correctly in:
Environment
xtls-rprx-visionServer configuration
www.amazon.com:443www.amazon.comchromeGenerated Clash configuration
Verification
I verified that the following values match the active Xray configuration:
The port is reachable, the REALITY target is accessible from the server, and Xray configuration validation returns
Configuration OK.A local Xray-core client using the same parameters successfully connected through this inbound and received HTTP 200 from an external HTTPS website.
Questions
What have you already tried?
/clash/<sub-id>URL.REALITY authentication failed.3x-ui version
3.5.0
How did you install 3x-ui?
install.sh script
Operating system
Ubuntu 22.04 amd64
Screenshots or config snippets
No response
Before submitting
@github-actions[bot] commented on GitHub (Jul 14, 2026):
Investigated against the current source (
internal/sub/clash_service.go,internal/sub/service.go,internal/sub/json_service.go). The standard REALITY fields your YAML shows (servername,client-fingerprint,reality-opts.public-key,reality-opts.short-id,flow) come from a path with a passing regression test (internal/sub/clash_service_test.go:45-83), so a structural mix-up in those specific fields is unlikely. Two narrower, confirmed gaps exist in the same area, both insiderealityDataininternal/sub/clash_service.go:749-765, which that test does not exercise:vless://link (internal/sub/service.go:1469-1473, emitted aspqv) and the JSON subscription (internal/sub/json_service.go:348) both forward the inbound'smldsa65Verifyvalue.clash_service.go'srealityDataonly copiespublicKey,fingerprint,serverName,shortId—mldsa65Verifyis never read, so it can't reach thereality-optsbuilder inapplySecurity(clash_service.go:689-711) either. If this inbound has an ML-DSA-65 seed set (the "mldsa65 Seed" field under REALITY settings), that data reaches Xray-core-based clients and v2rayN through the raw/JSON paths but never reaches the Clash subscription — which would produce exactly the split you describe.clash_service.go:761-762always takesshortIds[0]. The raw link (service.go:1460-1462) and JSON subscription (json_service.go:352-357) instead pick a random entry from the full Short ID list on every generation. Harmless with a single Short ID configured; with more than one, the Clash subscription is pinned to whichever is first, which may not be the entry you manually verified.Your questions:
getInboundsBySubId(service.go:459-476) reads the database directly on every subscription request — there is no cross-request cache of inbound/client data — and the subscription controller sendsCache-Control: no-cache, no-store, must-revalidateon every response (controller.go:551-552). There's no stale-cache mechanism that could desync the Clash output from the active Xray state.To narrow this down, could you confirm:
If both are negative, the remaining candidate is outside this repo's control: Mihomo's own REALITY/uTLS implementation has historically lagged Xray-core's for certain handshake details, and
www.amazon.comis a strict REALITY target. Testing the same inbound against a different target would help isolate a client/target-specific issue from a subscription-generation one.Title: Clash/Mihomo REALITY subscription silently drops the ML-DSA-65 verify key and pins Short ID to the first list entry
Severity: Medium
Category: Correctness
Why this matters: an inbound with ML-DSA-65 configured loses that authentication data only on the Clash/Mihomo path while the raw link and JSON subscription stay correct, producing a "works everywhere except Mihomo" report like this one. The Short ID pinning is a smaller correctness inconsistency against the other two generators.
Recommendation: forward
mldsa65Verifythroughclash_service.go'srealityDataand intoapplySecurity's reality-opts the same wayshort-idis forwarded, contingent on confirming Mihomo has an equivalent field to receive it. For Short ID, consider matching the random-pick behavior used byservice.go/json_service.go, or documenting the difference if Clash is meant to pin to the first entry.Confidence: High that both code gaps exist as described. Low-to-moderate that either explains this specific report, pending the two confirmations requested above.
@MHSanaei for visibility and a decision on the fix, contingent on Mihomo-side support for the ML-DSA-65 field.
This reply was generated automatically by an AI agent. A maintainer may follow up.
@missync commented on GitHub (Jul 14, 2026):
No ML-DSA-65 seed is configured for this REALITY inbound.
Only one Short ID is configured, and it matches the value in the generated Clash subscription.
@GYukai commented on GitHub (Jul 14, 2026):
Can confirm same behavior after updating to 3.5.0. To put it simpler: an update broke my proxy in clash verge and shadowrocket. This is a serious issue.
@TrickeryJoker commented on GitHub (Jul 14, 2026):
I'm facing the same problem — VLESS+Reality is not functioning properly in mihomo (Clash Meta).
@heymay134-cloud commented on GitHub (Jul 14, 2026):
same here, vless+reality broken in 3.5.0
@EnjoyGamesDev commented on GitHub (Jul 14, 2026):
I've got the same "Reality verification failed" on both husi and Nekobox but the same inbound config works on AsteriskNG without any issues.
I narrowed it down to the "Min Client Ver" field inside the security settings for the inbound, if you set it to 1.0.0 then the reality verification should be working again but that wasn't the default behavior before.
I noticed that the minium client version field has a higher version number than the maximum client version (min 26.3.27 vs max 25.9.11), so I'm not sure if this a panel bug or a Xray-core bug.
TL;DR: manually setting the "Min Client Ver" field inside the inbound settings to 1.0.0 should fix the reality verification failed issue for non Xray-core clients.
@Dowsion-dev commented on GitHub (Jul 14, 2026):
Same in Shadowrocket and Mihomo
Temporarily fixed by downgrading to 3.4.2.
@mrnickson-hue commented on GitHub (Jul 14, 2026):
I dug into this at the source rather than just the panel code, and I think this isn't a 3x-ui bug at all — it's an upstream Xray-core behavior change that the panel silently inherited when it bumped to a version containing it.
The change: XTLS/Xray-core@af7eb680, authored by RPRX (Xray-core's project lead) on 2026-07-11 — one day before this panel's
feat(xray): update xray-core to v26.7.11 and adapt panelcommit pulled it in:(
infra/conf/transport_security.go) Note there's no equivalent default forMaxClientVer— only the minimum floor changed.Why this breaks Mihomo/Shadowrocket/husi/NekoBox but not Xray-core clients or v2rayN: the actual comparison lives in the vendored
xtls/realitymodule (tls.go, around the client-version check right after the encrypted auth block is decoded):hs.c.ClientVercomes from inside REALITY's own encrypted auth payload — meaning any client failing this check already passed the actual private-key/target verification (a client that fails REALITY auth outright gets silently proxied to the disguiseddestinstead, not an explicit "authentication failed"). So Mihomo/Clash Verge/Shadowrocket/husi/NekoBox are all completing real REALITY handshakes here — they're just embedding a self-reported version number in that payload that doesn't clear the new26.3.27floor, since none of them are actually Xray-core and have no reason to track its release numbering unless they specifically added support for it. Raw Xray-core-based clients (and v2rayN, which wraps the real xray-core client) naturally report a current, compliant version and sail through.This also lines up exactly with @EnjoyGamesDev's fix upthread (setting Min Client Ver to
1.0.0) — that just lowers the floor to something any client's version byte trivially clears, and with @ShenXiongquan's replies ruling out the two hypotheses from the automated triage comment (no ML-DSA-65 seed, single correctly-matching Short ID) — this explanation doesn't depend on either of those, it only requires the affected inbound'sMin Client Verfield being left blank, which is the default state for essentially every REALITY inbound that predates this change.This is a deliberate policy, not an oversight, per the linked discussion:
What I'd suggest for this repo specifically: the panel-side commit only updated the form placeholder text (
25.9.11→26.3.27) without any changelog entry, in-app warning, or wiki note explaining that upgrading now imposes a hard floor on every REALITY inbound that has this optional field blank (i.e. nearly all of them). Given how disruptive this is for anyone serving non-Xray-core clients, it might be worth:1.0.0, or update to a client version that reports compliantly — Shadowrocket 2.2.91+ is confirmed to).Happy to open a small docs/UI PR for #2 if that'd be welcome.
@xMasterX commented on GitHub (Jul 14, 2026):
I think we can force min version to 1.0.0 if unset by default in panel maybe as one of ways of workaround
@xMasterX commented on GitHub (Jul 14, 2026):
Also VMESS does not work and does not have an option in panel to set client min version for it
Using v26.6.27 in xray selector at main dashboard in panel solves both issues, as comment above states, thats not the panel problem but something that comes from xray core
@Ramazik commented on GitHub (Jul 14, 2026):
Same error “REALITY authentication failed” in Husi v1.3.2 which uses a standard subscription link
@TJT-JTJ commented on GitHub (Jul 15, 2026):
Came here because I also was experiencing the same thing, I still couldn't figure out what the error was. Clash and Shadowrocket too.
@lxpcfc commented on GitHub (Jul 15, 2026):
Inbound - Security - Min Client Ver - set to 0 or 1.0.0
You can read it in long comment above your.
@missync commented on GitHub (Jul 15, 2026):
@mrnickson-hue Thanks for the detailed source-level investigation. This explanation is convincing and matches the reported behavior.
The root cause is that 3x-ui 3.5.0 upgraded its bundled Xray-core to v26.7.11, which introduced the implicit
MinClientVer = 26.3.27default for REALITY inbounds when the field is left blank.Clash Meta/Mihomo has not added compatibility for this change, causing affected clients to fail the version check.I agree that the panel should make this behavioral change more visible. A documentation/UI PR would be necessary, especially one that: