feat(subscription): add alpn, ech and fp fallback to VLESS TLS subscription links#914
Open
KissSkyOneMoreTime wants to merge 3 commits into
Open
Conversation
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.
Problem
When a VLESS node uses TLS with ECH and custom ALPN values, these settings are
stored in
protocol_settingsbut are never included in the generatedsubscription link. Users must manually add
fp,alpn, andechparametersin their client after importing.
Root Cause
General::buildVless()TLS case 1 handlesfpviagetTlsFingerprint()butreturns null when the uTLS toggle is disabled. There is no fallback to read
fingerprintfromnetwork_settings.extra.downloadSettings.tlsSettings.Similarly,
alpnandechstored in the same path are never read.Changes
In
app/Protocols/General.php,buildVless(), TLS case 1:fp: addelseiffallback to readfingerprintfromnetwork_settings.extra.downloadSettings.tlsSettings.fingerprintwhen uTLStoggle is disabled
alpn: read fromnetwork_settings.extra.downloadSettings.tlsSettings.alpnand serialize ascomma-separated string
ech: read fromtls_settings.ech; when enabled, use the raw base64config as
echConfigList, falling back toquery_server_namefor DoHlookup
Testing
Tested with VLESS + XHTTP + TLS + Cloudflare CDN node with ECH enabled.
Before: generated link contains no
alpn,ech, orfpparameter.After: all three parameters are present and the node connects without any
manual client configuration.