fix a bug.

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

View File

@ -23,8 +23,10 @@ func ConnectServer(config config.Config) net.Conn {
host := config.ServerAddr
if config.Protocol == "wss" {
scheme = "wss"
if config.TLSSni != "" {
host = config.TLSSni
}
}
u := url.URL{Scheme: scheme, Host: host, Path: config.WebSocketPath}
header := make(http.Header)
header.Set("user-agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36")