mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 10:01:28 +00:00
Revert "nosni"
https://github.com/XTLS/Xray-core/pull/3214#issuecomment-2078502477
This commit is contained in:
parent
ae0eec41d8
commit
61800fcc66
|
@ -116,8 +116,6 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
|
||||||
}
|
}
|
||||||
if utlsConfig.ServerName == "" {
|
if utlsConfig.ServerName == "" {
|
||||||
utlsConfig.ServerName = dest.Address.String()
|
utlsConfig.ServerName = dest.Address.String()
|
||||||
} else if strings.ToLower(utlsConfig.ServerName) == "nosni" { // If ServerName is set to "nosni", we set it empty.
|
|
||||||
utlsConfig.ServerName = ""
|
|
||||||
}
|
}
|
||||||
uConn.ServerName = utlsConfig.ServerName
|
uConn.ServerName = utlsConfig.ServerName
|
||||||
fingerprint := tls.GetFingerprint(config.Fingerprint)
|
fingerprint := tls.GetFingerprint(config.Fingerprint)
|
||||||
|
|
|
@ -325,11 +325,6 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config {
|
||||||
config.ServerName = sn
|
config.ServerName = sn
|
||||||
}
|
}
|
||||||
|
|
||||||
// If ServerName is set to "nosni", we set it empty.
|
|
||||||
if strings.ToLower(c.parseServerName()) == "nosni" {
|
|
||||||
config.ServerName = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(config.NextProtos) == 0 {
|
if len(config.NextProtos) == 0 {
|
||||||
config.NextProtos = []string{"h2", "http/1.1"}
|
config.NextProtos = []string{"h2", "http/1.1"}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue