4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-07 01:04:07 +00:00

Allow specifying TLS SNI with ?sni= in peering URI

This commit is contained in:
Neil Alexander
2021-07-28 22:11:20 +01:00
parent b333c7d7f3
commit d8df9755f2
3 changed files with 10 additions and 5 deletions

View File

@ -98,6 +98,7 @@ func (l *links) call(u *url.URL, sintf string) error {
l.tcp.call(pathtokens[0], tcpOpts, sintf)
case "tls":
tcpOpts.upgrade = l.tcp.tls.forDialer
tcpOpts.tlsSNI = u.Query().Get("sni")
l.tcp.call(u.Host, tcpOpts, sintf)
default:
return errors.New("unknown call scheme: " + u.Scheme)