go使用websocket遇到dial:x509: certificate signed by unknown authority
websocket.DefaultDialer.Dial(url, headers)
改为
websocket.Dialer{TLSClientConfig: &tls.Config{RootCAs: nil, InsecureSkipVerify: true}}.Dial(url, headers)
忽略证书的校验即可解决
websocket.DefaultDialer.Dial(url, headers)
改为
websocket.Dialer{TLSClientConfig: &tls.Config{RootCAs: nil, InsecureSkipVerify: true}}.Dial(url, headers)
忽略证书的校验即可解决