Skip to content

feat(reality): post-quantum REALITY server and real Firefox 148 / Safari 26.3 parrots (getmikan/utls) - #10

Merged
Nemu-x merged 6 commits into
devfrom
feat/reality-server-pq
Oct 11, 2026
Merged

Nemu-x merged 6 commits into
devfrom
feat/reality-server-pq

Conversation

@Nemu-x

@Nemu-x Nemu-x commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Follows #8 (merged). Switches utls to our fork and adds the server side of post-quantum REALITY.

getmikan/utls v1.8.8-citrus.1

replace github.com/metacubex/utls => github.com/getmikan/utls v1.8.8-citrus.1 (root and test/). On top of upstream v1.8.8:

Citrus

Live test against Xray v26.10.10 (vless + vision + REALITY)

Client → Server Fingerprint Result
Xray → Citrus (mldsa65-seed, require-x25519mlkem768, min-client-ver 26.9.8) chrome, firefox, safari OK
Xray → Citrus, wrong mldsa65Verify chrome rejected
Citrus → Xray (mldsa65Seed) firefox (148), safari (26.3), chrome, ios, hellofirefox_148, hellosafari_26_3 OK
Citrus → Xray, wrong mldsa65-verify firefox rejected

Tests: every usable fingerprint against a server with the seed and the key-share rule; vless and trojan inbounds with ML-DSA; rejections for wrong key, classical-only clients and version limits. go test ./component/tls/... ./listener/reality/... ./adapter/outbound/... ./common/convert/..., go test ./listener/inbound -run 'Reality|VLESS|Vless|Trojan' pass.

Notes

  • mldsa65-seed needs a target whose Certificate message is at least ~3.5 KB (the signature goes inside it). Same limit as Xray; documented.
  • Builds now depend on the getmikan/utls tag.

Nemu-x and others added 4 commits October 11, 2026 21:13
…/utls fork

Replace github.com/metacubex/utls with github.com/getmikan/utls v1.8.8-citrus.1,
which adds the HelloFirefox_148 and HelloSafari_26_3 parrots (now the targets of
HelloFirefox_Auto and HelloSafari_Auto), REALITY ML-DSA-65 signing and the
X25519MLKEM768 requirement on the server.

hellofirefox_148 and hellosafari_26_3 map to the real parrots. REALITY sends the
fingerprints that already carry an X25519MLKEM768 key share before X25519
(chrome, firefox, safari) untouched, so Firefox 148 keeps reusing its X25519 key;
the key share is injected only into the others.
…TimeDiff

The REALITY server took max-time-difference as microseconds, so a value
copied from an Xray config (maxTimeDiff, milliseconds: transport/internet/
reality/config.go) allowed a 1000 times smaller clock skew and rejected
nearly every client.
… version range

New reality-config keys of the inbounds, matching the Xray REALITY server:
- mldsa65-seed: Xray's mldsa65Seed, the server signs its temporary certificate
  with ML-DSA-65 for clients with the matching mldsa65-verify (pqv); the seed
  is validated at build time and must differ from private-key
- require-x25519mlkem768: forward client hellos without an X25519MLKEM768 key
  share before X25519 to dest, like Xray v26.9.8+
- min-client-ver / max-client-ver: the accepted range of the Xray version the
  client reports (x.y.z)

Tests cover option validation, Citrus client to Citrus server with ML-DSA-65
and the key share requirement for every fingerprint, and the rejections. The
test targets now send a certificate chain as long as a real site's one, since
the ML-DSA-65 signature has to fit in the size of dest's Certificate message.
@Nemu-x
Nemu-x changed the base branch from feat/xray-reality-pq to dev October 11, 2026 20:35
@Nemu-x
Nemu-x merged commit 2c0c70a into dev Oct 11, 2026
9 checks passed
@Nemu-x
Nemu-x deleted the feat/reality-server-pq branch October 14, 2026 20:19
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