[PR #6732] [CLOSED] fix(qr): restore REALITY QR actions and explain PQ restrictions #6433

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6732
Author: @libmur-dev
Created: 10/4/2026
Status: ❌ Closed

Base: main ← Head: fix/reality-qr-regression


📝 Commits (2)

  • 1c68446 fix(qr): restore QR actions for ordinary REALITY links
  • b3836cd feat(qr): explain post-quantum QR restrictions

📊 Changes

22 files changed (+167 additions, -6 deletions)

View changed files

📝 frontend/src/lib/xray/inbound-link.ts (+9 -4)
📝 frontend/src/pages/clients/ClientInfoModal.tsx (+4 -1)
➕ frontend/src/pages/inbounds/qr/PostQuantumQrNotice.stories.tsx (+25 -0)
➕ frontend/src/pages/inbounds/qr/PostQuantumQrNotice.tsx (+20 -0)
📝 frontend/src/pages/inbounds/qr/QrPanel.tsx (+3 -0)
📝 frontend/src/pages/sub/SubConfigsTab.tsx (+4 -1)
📝 frontend/src/test/inbound-link.test.ts (+2 -0)
➕ frontend/src/test/post-quantum-link.test.ts (+30 -0)
➕ frontend/src/test/post-quantum-qr-notice.test.tsx (+44 -0)
📝 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)
📝 internal/web/translation/vi-VN.json (+2 -0)

...and 2 more files

📄 Description

Summary

Restore QR actions for ordinary VLESS REALITY links and explain the existing restriction when links contain post-quantum key payloads. Fixes #6730.

Why

Ordinary VLESS REALITY links lost their QR actions in v3.9.0 because the new support-x25519mlkem768=true hint matched a substring check intended to suppress QR codes for large post-quantum key payloads.

The change is split into two commits:

  1. fix(qr): restore QR actions for ordinary REALITY links — parse the query and inspect only non-empty pqv and encryption values. Keep the REALITY compatibility hint and the existing post-quantum QR restriction. Add detector regression tests, including the real generated REALITY link, unrelated algorithm names, and percent-encoded encryption.
  2. feat(qr): explain post-quantum QR restrictions — show an information action in the inbound/client QR panel, client information window, and public subscription page. Explain why post-quantum key payloads can produce oversized or dense QR codes and direct users to clipboard import. Include all 13 translations, component tests, and a Storybook example.

The explanation opens on hover, focus, or click. Copying remains available.

Type of change

  • Bug fix

Areas affected

  • Frontend (UI / panel pages)
  • Subscription (share links / Clash / JSON)

How was this tested?

  • Reproduced the regression before fixing it: the real genVlessLink REALITY fixture was incorrectly classified, and the subscription QR action was absent.
  • Targeted unit/component/i18n checks: 4 files, 83 tests passed.
  • Full frontend run: all 153 unit/component files and 1705 tests passed. The overall command failed because the Storybook browser runner could not connect to its local test server. An IPv4 retry connected but the Windows runner reported no test suite for the new story; the full Storybook browser suite is not verified locally.
  • Typecheck, lint, formatting, production build, and static Storybook build passed.
  • Independently verified the built story in real headless Chromium on desktop and mobile viewports, including dark mode: explanation visible, no viewport overflow, no browser errors.
  • Verified that splitting the commits leaves the final file tree identical to the tested version.

To reproduce: open a VLESS + TCP + REALITY client's QR/share window in Inbounds and expand the individual link. Its QR should be visible despite support-x25519mlkem768=true. For a link with non-empty pqv or ML-KEM encryption, the information action explains the restriction while copying remains available.

Screenshots / recordings

qr-notice-mobile

Breaking changes

None.

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

The Go build/test gate was not run for this frontend-only fix. The full browser test limitation is recorded above; no share-link output or API contract changes require documentation updates.


🔄 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/6732 **Author:** [@libmur-dev](https://github.com/libmur-dev) **Created:** 10/4/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/reality-qr-regression` --- ### 📝 Commits (2) - [`1c68446`](https://github.com/MHSanaei/3x-ui/commit/1c68446d72cac24158a15a43bef67e28c0a515d8) fix(qr): restore QR actions for ordinary REALITY links - [`b3836cd`](https://github.com/MHSanaei/3x-ui/commit/b3836cd65bc456bb09a57e20e97e15ffadb16c0f) feat(qr): explain post-quantum QR restrictions ### 📊 Changes **22 files changed** (+167 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/lib/xray/inbound-link.ts` (+9 -4) 📝 `frontend/src/pages/clients/ClientInfoModal.tsx` (+4 -1) ➕ `frontend/src/pages/inbounds/qr/PostQuantumQrNotice.stories.tsx` (+25 -0) ➕ `frontend/src/pages/inbounds/qr/PostQuantumQrNotice.tsx` (+20 -0) 📝 `frontend/src/pages/inbounds/qr/QrPanel.tsx` (+3 -0) 📝 `frontend/src/pages/sub/SubConfigsTab.tsx` (+4 -1) 📝 `frontend/src/test/inbound-link.test.ts` (+2 -0) ➕ `frontend/src/test/post-quantum-link.test.ts` (+30 -0) ➕ `frontend/src/test/post-quantum-qr-notice.test.tsx` (+44 -0) 📝 `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) 📝 `internal/web/translation/vi-VN.json` (+2 -0) _...and 2 more files_ </details> ### 📄 Description ## Summary Restore QR actions for ordinary VLESS REALITY links and explain the existing restriction when links contain post-quantum key payloads. Fixes #6730. ## Why Ordinary VLESS REALITY links lost their QR actions in v3.9.0 because the new `support-x25519mlkem768=true` hint matched a substring check intended to suppress QR codes for large post-quantum key payloads. The change is split into two commits: 1. `fix(qr): restore QR actions for ordinary REALITY links` — parse the query and inspect only non-empty `pqv` and `encryption` values. Keep the REALITY compatibility hint and the existing post-quantum QR restriction. Add detector regression tests, including the real generated REALITY link, unrelated algorithm names, and percent-encoded encryption. 2. `feat(qr): explain post-quantum QR restrictions` — show an information action in the inbound/client QR panel, client information window, and public subscription page. Explain why post-quantum key payloads can produce oversized or dense QR codes and direct users to clipboard import. Include all 13 translations, component tests, and a Storybook example. The explanation opens on hover, focus, or click. Copying remains available. ## Type of change - [x] Bug fix ## Areas affected - [x] Frontend (UI / panel pages) - [x] Subscription (share links / Clash / JSON) ## How was this tested? - Reproduced the regression before fixing it: the real `genVlessLink` REALITY fixture was incorrectly classified, and the subscription QR action was absent. - Targeted unit/component/i18n checks: 4 files, 83 tests passed. - Full frontend run: all 153 unit/component files and 1705 tests passed. The overall command failed because the Storybook browser runner could not connect to its local test server. An IPv4 retry connected but the Windows runner reported no test suite for the new story; the full Storybook browser suite is not verified locally. - Typecheck, lint, formatting, production build, and static Storybook build passed. - Independently verified the built story in real headless Chromium on desktop and mobile viewports, including dark mode: explanation visible, no viewport overflow, no browser errors. - Verified that splitting the commits leaves the final file tree identical to the tested version. To reproduce: open a VLESS + TCP + REALITY client's QR/share window in Inbounds and expand the individual link. Its QR should be visible despite `support-x25519mlkem768=true`. For a link with non-empty `pqv` or ML-KEM `encryption`, the information action explains the restriction while copying remains available. ## Screenshots / recordings <img width="390" height="480" alt="qr-notice-mobile" src="https://github.com/user-attachments/assets/d5ff94c9-fb1f-4f0d-8640-8ac342cd8862" /> ## Breaking changes None. ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [x] I added or updated tests for the new behavior (when applicable). - [ ] `go build ./...` and the test suite pass locally. - [x] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. The Go build/test gate was not run for this frontend-only fix. The full browser test limitation is recorded above; no share-link output or API contract changes require documentation updates. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:08:43 +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#6433
No description provided.