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)
忽略证书的校验即可解决