Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to WSS with self signed certificated. #521

Closed
Fish1 opened this issue Feb 26, 2025 · 1 comment
Closed

Connecting to WSS with self signed certificated. #521

Fish1 opened this issue Feb 26, 2025 · 1 comment

Comments

@Fish1
Copy link

Fish1 commented Feb 26, 2025

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?

@Fish1
Copy link
Author

Fish1 commented Feb 27, 2025

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

@Fish1 Fish1 closed this as completed Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant