mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 19:39:35 +03:00
Allow IP address ServerName when "serverName" is not configured
In this case, TLS Client Hello will not have SNI (RFC 6066, Section 3)
This commit is contained in:
@ -107,8 +107,8 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
|
||||
InsecureSkipVerify: true,
|
||||
SessionTicketsDisabled: true,
|
||||
}
|
||||
if utlsConfig.ServerName == "" && dest.Address.Family().IsDomain() {
|
||||
utlsConfig.ServerName = dest.Address.Domain()
|
||||
if utlsConfig.ServerName == "" {
|
||||
utlsConfig.ServerName = dest.Address.String()
|
||||
}
|
||||
uConn.ServerName = utlsConfig.ServerName
|
||||
fingerprint := tls.GetFingerprint(config.Fingerprint)
|
||||
|
Reference in New Issue
Block a user