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

Addition of options to allow loading of custom certificates #278

Closed
wants to merge 3 commits into from

Conversation

dcam0050
Copy link

Addition of an Options field of type map[string]interface{} to DialOptions which is used in the constructor for the js websocket instance and enables passing custom options like custom certificates.

@dcam0050 dcam0050 requested a review from nhooyr as a code owner January 12, 2021 00:54
@nhooyr nhooyr changed the base branch from master to dev January 12, 2021 16:18
Copy link
Contributor

@nhooyr nhooyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing @dcam0050 <3

This is interesting, I didn't know you could do this. Can you link some docs and document this on the Options you added?

@dcam0050
Copy link
Author

After further investigation it seems like this is an option that is only available when using NodeJS as the javascript interpreter. This is the npm package in was using: https://www.npmjs.com/package/ws

The browser api for Websocket on the other hand does not allow for the use of custom certificates at all. That said though, when running this change with Vanillajs, there was no side effect except for lack of feedback saying that Options were ignored.

@nhooyr
Copy link
Contributor

nhooyr commented Mar 7, 2023

I think this is better solved by #373 then as you could override the transport and not use the browser API as the library assumes by default to pass whatever options you want.

@nhooyr nhooyr closed this Mar 7, 2023
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

Successfully merging this pull request may close these issues.

2 participants