[PR #4340] [MERGED] fix: reality random target/sni buttons not working (#4337) #5668

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/4340
Author: @abdalrahmanx9
Created: 5/13/2026
Status: ✅ Merged
Merged: 5/13/2026
Merged by: @MHSanaei

Base: main ← Head: fix/reality-random-button


📝 Commits (1)

  • ae3dc62 fix: reality random target/sni buttons not working (#4337)

📊 Changes

3 files changed (+4 additions, -9 deletions)

View changed files

📝 frontend/eslint.config.js (+0 -3)
📝 frontend/src/models/inbound.js (+2 -3)
📝 frontend/src/pages/inbounds/InboundFormModal.vue (+2 -3)

📄 Description

Summary

The Reality target/SNI random buttons were non-functional because getRandomRealityTarget() was accessed via window.* but never injected as a global — the ES module was never loaded as a script tag, so the guard clauses silently returned without populating the fields.

Refs #4337

Changes

  • Import getRandomRealityTarget directly from its module instead of relying on the non-existent window.getRandomRealityTarget global.
  • Remove the silent guard clauses (typeof checks) that swallowed the error.
  • Remove the now-unnecessary ESLint global declaration.

🔄 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/4340 **Author:** [@abdalrahmanx9](https://github.com/abdalrahmanx9) **Created:** 5/13/2026 **Status:** ✅ Merged **Merged:** 5/13/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/reality-random-button` --- ### 📝 Commits (1) - [`ae3dc62`](https://github.com/MHSanaei/3x-ui/commit/ae3dc626f83ed61b9f4cdfd9cc31e5dcec6ebe62) fix: reality random target/sni buttons not working (#4337) ### 📊 Changes **3 files changed** (+4 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `frontend/eslint.config.js` (+0 -3) 📝 `frontend/src/models/inbound.js` (+2 -3) 📝 `frontend/src/pages/inbounds/InboundFormModal.vue` (+2 -3) </details> ### 📄 Description ## Summary The Reality target/SNI random buttons were non-functional because `getRandomRealityTarget()` was accessed via `window.*` but never injected as a global — the ES module was never loaded as a script tag, so the guard clauses silently returned without populating the fields. Refs #4337 ## Changes - Import `getRandomRealityTarget` directly from its module instead of relying on the non-existent `window.getRandomRealityTarget` global. - Remove the silent guard clauses (`typeof` checks) that swallowed the error. - Remove the now-unnecessary ESLint global declaration. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:03:10 +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#5668
No description provided.