mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-26 07:44:59 +03:00
fix(sub): pin fp=unsafe on links that carry cipher suites
Xray builds the ClientHello with uTLS for every fingerprint except
"unsafe", and GetFingerprint("") resolves to chrome, so cipherSuites are
dropped unless the fingerprint is exactly "unsafe". A host or inbound
that set cs and left the fingerprint blank shipped links whose cs did
nothing in v2rayN, PattN and every other Xray-based client.
Raw links (query and vmess JSON), the JSON subscription and the panel's
own link generator now emit fp=unsafe when cs is present and the final
fingerprint is empty. An explicit fingerprint is left as configured.
This commit is contained in:
@@ -696,6 +696,13 @@ func (s *SubJsonService) getConfig(subReq *SubService, inbound *model.Inbound, c
|
||||
liftHostTLSVerification(newStream)
|
||||
}
|
||||
applyHostStreamOverrides(extPrxy, newStream)
|
||||
if tlsSettings, ok := newStream["tlsSettings"].(map[string]any); ok && security == "tls" {
|
||||
cs, _ := tlsSettings["cipherSuites"].(string)
|
||||
fp, _ := tlsSettings["fingerprint"].(string)
|
||||
if pinned := fingerprintForCipherSuites(fp, cs); pinned != fp {
|
||||
tlsSettings["fingerprint"] = pinned
|
||||
}
|
||||
}
|
||||
if finalmask, ok := newStream["finalmask"].(map[string]any); ok {
|
||||
newStream["finalmask"] = withLegacyFragmentRanges(finalmask)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user