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

wss:// support #23

Open
elewin opened this issue Dec 22, 2016 · 6 comments
Open

wss:// support #23

elewin opened this issue Dec 22, 2016 · 6 comments

Comments

@elewin
Copy link

elewin commented Dec 22, 2016

Does this plugin support WebSocket Secure? If so, how would one enable it? I see there's a protocols property on the configuration object, but I'm not sure what to add there to add wss (if thats even where it would be added)

Thanks

@becvert
Copy link
Owner

becvert commented Dec 22, 2016

It does not.

The underlying libraries (PocketSocket and TooTallNate) do support SSL/TLS though.
So implementing the secure feature is feasible, but I think there is a problem with the certificates:
one would need a self-signed certificate as a certificate delivered by a trusted authority could not be used. I believe.

I had already tried to add the secure feature but without success.
So any help would be appreciated.

By curiosity, could you provide details of the context in which you would need wss://? thanks

The protocols option is about Sec-WebSocket-Protocol

@elewin
Copy link
Author

elewin commented Dec 22, 2016

Thanks for the reply. I am thinking of developing a kiosk app for tablets that would accept payment information on one tablet and send it to another, and figure it might be a good idea to do it over wss. Worst case scenario I can look into other encryption options.

@davidmarquis
Copy link

Supporting SSL-secured Websocket server connections on a device would require you to distribute your private key along with the public certificate, which in most case wouldn't be a good idea...

@rosimildo
Copy link

There are some use cases, where you may have a need to access a local process, and due to the policy on browsers to avoid "mixed-content" ( see google about it ), it is a good idea to have TLS support, even if you don;t exchange sensitive data, just to obey browsers rules about rules about mixed-content.

Adding a key to your device is no different that adding to a box acting as a server. In this case here, your device is the server.

@bcjat
Copy link

bcjat commented May 17, 2020

Any update? I'm running server with IONIC 4, and want to connect also from ionic app. So ionic uses chrome webview under the hood. Chrome does not allow to connect "ws://" and throw error: connection refused. So it is needed that this support wss.

@qpwr
Copy link

qpwr commented Jan 28, 2021

I ran into a use case where I'd like to communicate from a website to my app which runs the websocket server. This would only work if the website didn't use https, because otherwise it would be mixed content. The issue here is that I need to use getUserMedia on the website, which is only allowed in secure contexts.

Is there any chance you are still evaluating this, @becvert?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants