coder/websocket

Connecting to WSS with self signed certificated.

Closed this issue · 1 comments

I believe what I am looking for is similar to JavaScripts websocket, "rejectUnathorized": true.

new WebSocket(host, { headers, ca, timeout, rejectUnauthorized: false })

This would allow the websocket to connect to a server with a self signed certificate.

I believe Gorilla had this exposed... gorilla/websocket#613

The TLS package has this, and I am able to connect to my server to grab the self signed certs.

conf := &tls.Config{
InsecureSkipVerify: true
}

connection, _ := tls.Dial("tcp", "myserver.com:5555", conf)

Is there something already exposed in this package that I can utilize, that I'm just not seeing?

DialOptions has an HTTPClient that can be set with the TLS options.