mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-11 23:26:07 +00:00
fix(sub): stop external-proxy dest from clobbering TLS SNI
externalProxySNI fell back to ep["dest"] when an external-proxy row had no SNI of its own, silently overwriting the upstream tlsSettings serverName already written into the share-link params. Operators using forceTls=same with a CDN edge IP got SNI=<edge-ip> in the link instead of the real cert hostname, breaking TLS handshakes. The fallback is dropped: an explicit ep["sni"] still overrides, but a blank entry now leaves the upstream SNI in place. Tests updated.
This commit is contained in:
@@ -990,9 +990,6 @@ func externalProxySNI(ep map[string]any) (string, bool) {
|
||||
if sni, ok := ep["sni"].(string); ok && sni != "" {
|
||||
return sni, true
|
||||
}
|
||||
if dest, ok := ep["dest"].(string); ok && dest != "" {
|
||||
return dest, true
|
||||
}
|
||||
return "", false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user