I am trying to add SSL support to my node.js
app, while connecting via socket.io
. The traffic to socket.io
is going to port 80. I would like stunnel
to grab encrypted traffic from port 443, unencrypt it, and forward it to post 80.
I have private.key, certificate and public key at hand, and I couldn't find how I should configure them all to work.
An example of working configuration file for stunnel
would be great. I had a look at Websockets Over SSL: Stunnel, Varnish, Nginx, Node.js, Websockets Over SSL: Stunnel, HAProxy, Node.js and this gist, but couldn't use any of them to achieve my goal.
Thanks!
Best Answer
I had a problem with the certificate file. In case anyone else will have issues, this is what I eventually did:
The PEM file
the file structure of the file should be as follow:
/etc/stunnel/stunnel.conf
The stunnel configuration file: