Skip to content

feat: preserve mihomo reality-opts support-x25519mlkem768 - #444

Open
up1and wants to merge 1 commit into
7Sageer:mainfrom
up1and:feat/vless-reality-mlkem768
Open

up1and wants to merge 1 commit into
7Sageer:mainfrom
up1and:feat/vless-reality-mlkem768

Conversation

@up1and

@up1and up1and commented Nov 14, 2026

Copy link
Copy Markdown

Motivation

mihomo adds a mihomo-only option reality-opts.support-x25519mlkem768 (https://wiki.metacubex.one/en/config/proxies/tls) to keep X25519MLKEM768 in the REALITY ClientHello key share. REALITY servers on Xray-core v25.5+ require this key share, so dropping the field breaks the converted node entirely.

The flag only exists as a mihomo YAML field; there is no official vless:// URI parameter, but some panels already emit a de-facto support-x25519mlkem768=true query param in share links. Both input forms were silently discarded by the whitelist-style parsing.

Related: #417 (post-quantum field loss during conversion)

Changes

  • URI input (src/utils.js#createTlsConfig): read support-x25519mlkem768=true query param for security=reality (vless/trojan and other URI parsers sharing this path)
  • Clash YAML input (src/parsers/convertYamlProxyToObject.js): map reality-opts.support-x25519mlkem768 for vless/trojan into the internal tls.reality.support_x25519mlkem768
  • mihomo (Clash) output (src/builders/ClashConfigBuilder.js): emit reality-opts.support-x25519mlkem768 (vless/trojan); omitted when unset
  • sing-box output (src/builders/SingboxConfigBuilder.js): strip the flag — sing-box rejects unknown fields, and since 1.13 it already enables X25519MLKEM768 in its default curve_preferences, so no equivalent option is needed
  • Tests: test/reality-mlkem768.test.js covering both input paths, mihomo output roundtrip, and sing-box stripping (incl. no-mutation of the source object)

Verification

npm test — 39 files / 301 tests pass.

@vercel

vercel Bot commented Nov 14, 2026

Copy link
Copy Markdown

@up1and is attempting to deploy a commit to the 7sageer's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant