fix(sub): support Reality params for fallback inbounds via externalProxy#3991
Open
nnemirovsky wants to merge 2 commits intoMHSanaei:mainfrom
Open
fix(sub): support Reality params for fallback inbounds via externalProxy#3991nnemirovsky wants to merge 2 commits intoMHSanaei:mainfrom
nnemirovsky wants to merge 2 commits intoMHSanaei:mainfrom
Conversation
Extract Reality settings (pbk, sni, sid, fp, spx) from stream config unconditionally rather than only when security is "reality". This allows inbounds behind a VLESS fallback (security: "none") to generate correct subscription links when externalProxy overrides security to "reality" via forceTls. Also fix genAllLinks crash when remarkModel contains characters without a corresponding entry in the orders map (e.g., 'o' when externalProxy is empty).
Allow externalProxy entries to specify a "sni" field that overrides the randomly selected serverName in subscription links. This is needed when an inbound has extra serverNames for fallback routing (e.g., MTProto) that should not appear in client subscription links.
98a001b to
0bc001b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
externalProxyoverrides security to"reality"viaforceTls. Previously these params were only read whensecurity == "reality", which meant fallback inbounds withsecurity: "none"couldn't generate correct subscription links even with externalProxy.snifield toexternalProxyentries 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.genAllLinkscrash (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.