From 61800fcc66fbff0c9bd80fc564aa6cf14a3585d7 Mon Sep 17 00:00:00 2001 From: RPRX <63339210+RPRX@users.noreply.github.com> Date: Fri, 26 Apr 2024 02:27:22 +0000 Subject: [PATCH] Revert "nosni" https://github.com/XTLS/Xray-core/pull/3214#issuecomment-2078502477 --- transport/internet/reality/reality.go | 2 -- transport/internet/tls/config.go | 5 ----- 2 files changed, 7 deletions(-) diff --git a/transport/internet/reality/reality.go b/transport/internet/reality/reality.go index 0cc6950d..011bb907 100644 --- a/transport/internet/reality/reality.go +++ b/transport/internet/reality/reality.go @@ -116,8 +116,6 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati } if utlsConfig.ServerName == "" { 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 fingerprint := tls.GetFingerprint(config.Fingerprint) diff --git a/transport/internet/tls/config.go b/transport/internet/tls/config.go index 36aca803..9d9289c3 100644 --- a/transport/internet/tls/config.go +++ b/transport/internet/tls/config.go @@ -325,11 +325,6 @@ func (c *Config) GetTLSConfig(opts ...Option) *tls.Config { 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 { config.NextProtos = []string{"h2", "http/1.1"} }