Specify TLS 1.2-TLS 1.3 supported range for client connections

Should fix #1208.
This commit is contained in:
Neil Alexander 2024-12-12 19:07:55 +00:00
parent 2d587740c1
commit 69451fe969
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 8 additions and 0 deletions

View file

@ -35,6 +35,8 @@ func (l *linkTLS) dial(ctx context.Context, url *url.URL, info linkInfo, options
tlsconfig := l.config.Clone()
return l.links.findSuitableIP(url, func(hostname string, ip net.IP, port int) (net.Conn, error) {
tlsconfig.ServerName = hostname
tlsconfig.MinVersion = tls.VersionTLS12
tlsconfig.MaxVersion = tls.VersionTLS13
if sni := options.tlsSNI; sni != "" {
tlsconfig.ServerName = sni
}