fix: sni invalid on hysteria

This commit is contained in:
Skyxim 2022-06-12 00:00:42 +08:00
parent 099aa1e3c2
commit 8853e97b40

View file

@ -121,7 +121,7 @@ func NewHysteria(option HysteriaOption) (*Hysteria, error) {
addr := net.JoinHostPort(option.Server, strconv.Itoa(option.Port)) addr := net.JoinHostPort(option.Server, strconv.Itoa(option.Port))
serverName := option.Server serverName := option.Server
if option.SNI != "" { if option.SNI != "" {
serverName = option.Server serverName = option.SNI
} }
tlsConfig := &tls.Config{ tlsConfig := &tls.Config{
ServerName: serverName, ServerName: serverName,