[PR #6470] [MERGED] feat(reality): warn when target cert chain is too small for ML-DSA-65 #6291

Closed
opened 2026-11-02 04:07:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6470
Author: @mrchatam
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/12/2026
Merged by: @MHSanaei

Base: main ← Head: feat/reality-mldsa-cert-chain-warning


📝 Commits (2)

  • 6b2ae90 feat(reality): warn when target cert chain is too small for ML-DSA-65
  • 2e75720 fix(reality): gate scanner ML-DSA tag and sync docs OpenAPI

📊 Changes

23 files changed (+221 additions, -5 deletions)

View changed files

📝 docs/public/openapi.json (+8 -0)
📝 frontend/public/openapi.json (+8 -0)
📝 frontend/src/generated/examples.ts (+1 -0)
📝 frontend/src/generated/schemas.ts (+6 -0)
📝 frontend/src/generated/types.ts (+1 -0)
📝 frontend/src/generated/zod.ts (+1 -0)
📝 frontend/src/pages/inbounds/form/security/RealityTargetScannerModal.tsx (+28 -1)
📝 frontend/src/pages/inbounds/form/security/reality.tsx (+33 -3)
➕ frontend/src/test/reality-mldsa-cert-chain.test.tsx (+102 -0)
📝 internal/web/service/reality_scan.go (+7 -1)
📝 internal/web/translation/ar-EG.json (+2 -0)
📝 internal/web/translation/en-US.json (+2 -0)
📝 internal/web/translation/es-ES.json (+2 -0)
📝 internal/web/translation/fa-IR.json (+2 -0)
📝 internal/web/translation/id-ID.json (+2 -0)
📝 internal/web/translation/ja-JP.json (+2 -0)
📝 internal/web/translation/pt-BR.json (+2 -0)
📝 internal/web/translation/ru-RU.json (+2 -0)
📝 internal/web/translation/tr-TR.json (+2 -0)
📝 internal/web/translation/uk-UA.json (+2 -0)

...and 3 more files

📄 Description

Summary

  • Expose the presented peer certificate chain size (certChainBytes) from probeRealityAddr / RealityScanResult by summing len(cert.Raw).
  • Warn in the REALITY target scanner table and the inbound REALITY scan result when ML-DSA-65 is enabled and the chain is under xray-core's documented 3500-byte minimum.
  • No extra TLS ping on inbound save — the existing scan result is enough.

Notes

  • 3500 is an xray-core constant (not defined in this repo); documented inline next to the threshold.
  • Issue reporter checked “I'd like to implement this myself”; no competing open PR from the reporter was found, so this PR still opens the change.

Fixes #5973

Test plan

  • Run REALITY target scan against www.cloudflare.com and confirm cert-chain size is shown and tagged when under 3500 bytes.
  • With mldsa65Seed set, scan a short-chain target and confirm the inbound form warning appears.
  • With ML-DSA-65 cleared, confirm the inbound form warning does not appear for the same scan result.
  • npm test / focused vitest for reality-mldsa-cert-chain.test.tsx and i18n-dead-keys.test.ts.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6470 **Author:** [@mrchatam](https://github.com/mrchatam) **Created:** 9/11/2026 **Status:** ✅ Merged **Merged:** 9/12/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `feat/reality-mldsa-cert-chain-warning` --- ### 📝 Commits (2) - [`6b2ae90`](https://github.com/MHSanaei/3x-ui/commit/6b2ae907969cf0a871f3d16e992e10a1f29286a0) feat(reality): warn when target cert chain is too small for ML-DSA-65 - [`2e75720`](https://github.com/MHSanaei/3x-ui/commit/2e757203dd42cad34f1eae98809421e2727b17a3) fix(reality): gate scanner ML-DSA tag and sync docs OpenAPI ### 📊 Changes **23 files changed** (+221 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/public/openapi.json` (+8 -0) 📝 `frontend/public/openapi.json` (+8 -0) 📝 `frontend/src/generated/examples.ts` (+1 -0) 📝 `frontend/src/generated/schemas.ts` (+6 -0) 📝 `frontend/src/generated/types.ts` (+1 -0) 📝 `frontend/src/generated/zod.ts` (+1 -0) 📝 `frontend/src/pages/inbounds/form/security/RealityTargetScannerModal.tsx` (+28 -1) 📝 `frontend/src/pages/inbounds/form/security/reality.tsx` (+33 -3) ➕ `frontend/src/test/reality-mldsa-cert-chain.test.tsx` (+102 -0) 📝 `internal/web/service/reality_scan.go` (+7 -1) 📝 `internal/web/translation/ar-EG.json` (+2 -0) 📝 `internal/web/translation/en-US.json` (+2 -0) 📝 `internal/web/translation/es-ES.json` (+2 -0) 📝 `internal/web/translation/fa-IR.json` (+2 -0) 📝 `internal/web/translation/id-ID.json` (+2 -0) 📝 `internal/web/translation/ja-JP.json` (+2 -0) 📝 `internal/web/translation/pt-BR.json` (+2 -0) 📝 `internal/web/translation/ru-RU.json` (+2 -0) 📝 `internal/web/translation/tr-TR.json` (+2 -0) 📝 `internal/web/translation/uk-UA.json` (+2 -0) _...and 3 more files_ </details> ### 📄 Description ## Summary - Expose the presented peer certificate chain size (`certChainBytes`) from `probeRealityAddr` / `RealityScanResult` by summing `len(cert.Raw)`. - Warn in the REALITY target scanner table and the inbound REALITY scan result when ML-DSA-65 is enabled and the chain is under xray-core's documented 3500-byte minimum. - No extra TLS ping on inbound save — the existing scan result is enough. ## Notes - 3500 is an xray-core constant (not defined in this repo); documented inline next to the threshold. - Issue reporter checked “I'd like to implement this myself”; no competing open PR from the reporter was found, so this PR still opens the change. Fixes #5973 ## Test plan - [ ] Run REALITY target scan against `www.cloudflare.com` and confirm cert-chain size is shown and tagged when under 3500 bytes. - [ ] With `mldsa65Seed` set, scan a short-chain target and confirm the inbound form warning appears. - [ ] With ML-DSA-65 cleared, confirm the inbound form warning does not appear for the same scan result. - [ ] `npm test` / focused vitest for `reality-mldsa-cert-chain.test.tsx` and `i18n-dead-keys.test.ts`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:07:44 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6291
No description provided.