mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 06:00:28 +00:00
Fix bug
This commit is contained in:
parent
bbdff033ce
commit
d1cd671bec
@ -103,8 +103,8 @@ func (l *links) call(u *url.URL, sintf string) error {
|
|||||||
// the host-port combo from the query option and then seeing if it parses to an
|
// the host-port combo from the query option and then seeing if it parses to an
|
||||||
// IP address successfully or not.
|
// IP address successfully or not.
|
||||||
if sni := u.Query().Get("sni"); sni != "" {
|
if sni := u.Query().Get("sni"); sni != "" {
|
||||||
if host, _, err := net.SplitHostPort(sni); err == nil && net.ParseIP(host) == nil {
|
if net.ParseIP(sni) == nil {
|
||||||
tcpOpts.tlsSNI = host
|
tcpOpts.tlsSNI = sni
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If the SNI is not configured still because the above failed then we'll try
|
// If the SNI is not configured still because the above failed then we'll try
|
||||||
|
Loading…
Reference in New Issue
Block a user