Node.js and wss: //

I want to start using javascript on the server, most likely using node.js, and also use web ports to communicate with clients. However, it seems that there is not much information about encrypted communication through a web interface using TLS and the wss: // handler. In fact, the only server I've seen explicitly supports wss: // is Kaazing.

This TODO is the only link I could find in various node implementations. Am I missing something or am not ready to start already encrypted messages to js web server?

Another option might use something like lighttpd or apache for the proxy for the node listener, did anyone succeed there?

+4
source share
2 answers

TLS / SSL support works for this websocket implementation in Node.js, I just tested it: https://github.com/Worlize/WebSocket-Node/issues/29

+4
source

You have stream.setSecure () and a server. setSecure () .

I assume that you should use one of them (especially the last one) to use TLS in websockets, because in the end websocket is a regular HTTP connection, "upgraded" to websocket.

Using TLS in a regular HTTP server should theoretically also protect websocket, only by testing it can be confirmed.

+2
source

Source: https://habr.com/ru/post/1309916/


All Articles