fix a bug.

This commit is contained in:
NNdroid 2023-07-07 10:15:24 +08:00
parent fdb5bfc246
commit 32321a7c5f

View File

@ -23,7 +23,9 @@ func ConnectServer(config config.Config) net.Conn {
host := config.ServerAddr
if config.Protocol == "wss" {
scheme = "wss"
host = config.TLSSni
if config.TLSSni != "" {
host = config.TLSSni
}
}
u := url.URL{Scheme: scheme, Host: host, Path: config.WebSocketPath}
header := make(http.Header)