mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6451] [MERGED] fix(sub): enable ML-KEM for Mihomo REALITY subscriptions #6271
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#6271
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/6451
Author: @King19950905
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/11/2026
Merged by: @MHSanaei
Base:
main← Head:codex/mihomo-reality-mlkem📝 Commits (1)
10b6328fix(sub): enable ML-KEM for Mihomo REALITY subscriptions📊 Changes
6 files changed (+103 additions, -23 deletions)
View changed files
📝
docs/content/docs/en/config/reality.mdx(+15 -7)📝
docs/content/docs/fa/config/reality.mdx(+23 -7)📝
docs/content/docs/ru/config/reality.mdx(+15 -8)📝
docs/content/docs/zh/config/reality.mdx(+2 -1)📝
internal/sub/clash_service.go(+3 -0)📝
internal/sub/clash_service_test.go(+45 -0)📄 Description
Summary
Enable
reality-opts.support-x25519mlkem768in generated Clash/Mihomo REALITY proxies. Xray-core v26.9.8+ requires an ML-KEM key share, while Mihomo otherwise strips it by default; a correctly configured Chrome REALITY node could therefore time out after the server upgrade.The shared security mapper covers both panel inbounds and external share links converted into YAML. Use
chromeonly when the fingerprint is absent, preserving explicit choices, public keys and short IDs. Plain TLS and non-TLS proxies are unchanged, and legacy Clash still excludes REALITY.Update the REALITY pitfalls in all four documentation languages: v26.9.8+ removed the implicit minimum client version, but explicit version gates and the separate ML-KEM handshake requirement still apply.
Refs MetaCubeX/mihomo#3193 and XTLS/REALITY@8cdf7bf9c7.
Type of change
Areas affected
Validation
go build ./...passes with the repository'sinternal/web/dist/.gitkeepembed stub.go test -shuffle=on -count=1 ./...: subscription tests and the other packages pass, but the full run is not green on macOS arm64. MTProto process tests (TestEnsureNoopKeepsProcess,TestEnsureReloadFallbackRestarts,TestEnsureHotReloadKeepsProcess, and on the first runTestProcessStatusDuringExit) time out waiting for a spawn. Those tests pass in isolation against the original implementation; no MTProto files were changed. The failure also occurred on a second full run.Compatibility
This intentionally changes the generated REALITY client setting to enable ML-KEM. Very old REALITY servers that reject ML-KEM need a per-node client override setting the option to
false, or a server upgrade. Server versions cannot be inferred reliably for external links or remote nodes, so this does not guess from the panel's local core version.The flag does not add ML-KEM to an incompatible fingerprint. Explicit choices are preserved; with Mihomo's uTLS v1.8.7, use
chrome. Rawvless://subscriptions still cannot carry this Mihomo option and require a client override when imported directly. Server-sideminClientVer/maxClientVervalues are not changed.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.