[PR #3991] [CLOSED] fix(sub): support Reality params for fallback inbounds via externalProxy #5577

Closed
opened 2026-10-31 20:47:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/3991
Author: @nnemirovsky
Created: 4/2/2026
Status: ❌ Closed

Base: main ← Head: fix/fallback-inbound-subscription


📝 Commits (2)

  • ba81941 fix(sub): support Reality params for fallback inbounds via externalProxy
  • 0bc001b feat(sub): add sni override field to externalProxy

📊 Changes

2 files changed (+82 additions, -52 deletions)

View changed files

📝 sub/subService.go (+80 -50)
📝 web/assets/js/model/inbound.js (+2 -2)

📄 Description

Summary

  • Extract Reality settings (pbk, sni, sid, fp, spx) from stream config unconditionally so they are available when externalProxy overrides security to "reality" via forceTls. Previously these params were only read when security == "reality", which meant fallback inbounds with security: "none" couldn't generate correct subscription links even with externalProxy.
  • Add sni field to externalProxy entries to override the randomly selected serverName. This is needed when an inbound has extra serverNames for fallback routing (e.g., MTProto via VLESS fallback) that should not appear in client subscription links.
  • Fix genAllLinks crash (TypeError: undefined is not an object (evaluating 'x.length')) when remarkModel contains characters without a corresponding entry in the orders map.

Use case

When using VLESS Reality fallbacks to multiplex multiple services on port 443 (e.g., XHTTP + MTProto), the fallback target inbound must have security: "none" since the outer Reality inbound already handles TLS. Without this fix, subscription links for such inbounds either crash the UI or generate links without Reality params.


🔄 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/3991 **Author:** [@nnemirovsky](https://github.com/nnemirovsky) **Created:** 4/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/fallback-inbound-subscription` --- ### 📝 Commits (2) - [`ba81941`](https://github.com/MHSanaei/3x-ui/commit/ba8194141b581498e85e284139103f82b81c5cc7) fix(sub): support Reality params for fallback inbounds via externalProxy - [`0bc001b`](https://github.com/MHSanaei/3x-ui/commit/0bc001b80c9986f05ddb457f1a332e75ab7e33b2) feat(sub): add sni override field to externalProxy ### 📊 Changes **2 files changed** (+82 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `sub/subService.go` (+80 -50) 📝 `web/assets/js/model/inbound.js` (+2 -2) </details> ### 📄 Description ## Summary - Extract Reality settings (pbk, sni, sid, fp, spx) from stream config unconditionally so they are available when `externalProxy` overrides security to `"reality"` via `forceTls`. Previously these params were only read when `security == "reality"`, which meant fallback inbounds with `security: "none"` couldn't generate correct subscription links even with externalProxy. - Add `sni` field to `externalProxy` entries to override the randomly selected serverName. This is needed when an inbound has extra serverNames for fallback routing (e.g., MTProto via VLESS fallback) that should not appear in client subscription links. - Fix `genAllLinks` crash (`TypeError: undefined is not an object (evaluating 'x.length')`) when remarkModel contains characters without a corresponding entry in the orders map. ## Use case When using VLESS Reality fallbacks to multiplex multiple services on port 443 (e.g., XHTTP + MTProto), the fallback target inbound must have `security: "none"` since the outer Reality inbound already handles TLS. Without this fix, subscription links for such inbounds either crash the UI or generate links without Reality params. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:47:55 +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#5577
No description provided.