Secure Web Sockets

198 views
Skip to first unread message

cc chris

unread,
Nov 9, 2010, 4:25:23 PM11/9/10
to Socket.IO
Sorry if this has been asked many times before but I'm very new to
this and I would be very grateful for any help I can get.

Is it possible to create a Secure Web Sockets connection using
Socket.IO and node.js and if so how ?

Thanks very much in advance.

Chris

Guillermo Rauch

unread,
Nov 9, 2010, 4:56:29 PM11/9/10
to sock...@googlegroups.com
Run socket.io and then configure stunnel to proxy port 80 to 443.
--
Guillermo Rauch
http://devthought.com

cc chris

unread,
Nov 9, 2010, 5:32:28 PM11/9/10
to Socket.IO
Hi Guillermo

Thanks very much for the quick reply.

I have had a look at stunnel and it seems to require starting up
separately on the command line at the client end - please correct that
if I am wrong as I have not used it before.

What I am looking for is a way to put everything in a single
javascript application to do a secure Web Sockets connection to
node.js with no intervention required by the user to do the setup.

Is there any other way ?

Thanks

Chris

Guillermo Rauch

unread,
Nov 9, 2010, 10:01:23 PM11/9/10
to sock...@googlegroups.com
stunnel runs on the server. On the client all you need to do is set { secure: true }

cc chris

unread,
Nov 10, 2010, 2:32:26 AM11/10/10
to Socket.IO
Thanks very much Guillermo that was the bit I was missing I didn't
realise you could set {secure: true } on the client end to get
Socket.IO to do a secure connection.

Julien Genestoux

unread,
Nov 10, 2010, 3:13:38 AM11/10/10
to sock...@googlegroups.com
UNSUBSCRIBE

Arnout Kazemier

unread,
Nov 11, 2010, 2:50:34 AM11/11/10
to sock...@googlegroups.com
Or we could change Socket.io to also use both ws and wss protocol. The change needed for this is probably minimal.,

cc chris

unread,
Nov 11, 2010, 3:18:03 AM11/11/10
to Socket.IO
Hi Arnout

I have taken Guillermo's suggestion and setup stunnel at the server
end and am using {secure: true} and that seems to be working fine as a
secure protocol although I haven't done much testing yet.

My intention is to create a version of my software that will negotiate
its way through corporate proxy servers as per the secure web sockets
specification.

I had assumed that my current setup would do that - does your comment
regarding wss mean that this will not work until wss is implemented (I
had assumed that setting {secure: true} made wss happen already) ?

Thanks

Chris
Reply all
Reply to author
Forward
0 new messages