mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Add "nosni" option to send empty SNI (#3214)
* Allow not to send SNI * Allow reality not to send SNI
This commit is contained in:
parent
ba57ccdd45
commit
ec2224974d
2 changed files with 11 additions and 1 deletions
|
@ -116,6 +116,8 @@ 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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue