-
Notifications
You must be signed in to change notification settings - Fork 25
cWS issue with SSL #28
Comments
Sorry by old uws I meant "uws": "10.148.1" |
@zubairfazal yes ssl has some problems in cWS and few latest node versions (however it works correctly in the node versions which are supported by old uws). I dont think that SSL issue is going to get fixed completely. As a work around at this stage would be to use something like nginx in front with ssl. |
Oh so your saying if I use cWS with node 8.1.4 it will work fine? (Its what I used for uws) |
@zubairfazal After some thoughts from release 0.17 SSL Support has been removed for Node.js 10+ you can use proxy like nginx to set up secure connections. Unfortunately there is no simple way to make it work at the moment i will re review this issue later. |
this is not a solution for me :/ because nginx to websocket server is not secure |
You could use Traefik in place of nginx. |
is it better? |
It supports websockets and auto Let's encrypt renewal. It's a load balancer and a proxy and handles SSL/TLS. I don't know what do you need exactly. But it's an alternative to nginx, but it's not a webserver. |
New version has been released (1.3.0) with SSL support for node 8+. Node 12 and 13 also working except latest 13.9.0 (it has some outstanding issue, use 13.8.x instead). Check out Secure WebSocket section in README as it requires to pass |
This looks very promising. I will test it this week |
@zubairfazal let me know how it goes :) |
New release 1.3.1 removes |
I updated to the 1.3.1 version. Was there some API changes from previous versions? Suddenly my application got this error Error: Can not set listener for 'message' event twice |
Switched to Node 13.8.0 and using version 1.3.1 Was using it for my game, however the issue still persists still am getting these error messages You can test the issue here Check Asia, as only my asia servers are using the latest version, as I was testing the fix |
@MistikSenpa from around version 1+ there is the change in the way listeners set, it informs with and error when you try to set the same event listener twice. Previous behaviour was to replace currently existing listener with new one (i was planning to downgrade that error to warning instead in the next release). Have just checked Asian server and looks like that issue does not happen always and can still correctly reconnect most of the time... Would you mind providing more information where do you run your serve, what system, and what certs do you use. I will do more investigation and try to reproduce on my local.... |
I run my game servers on OVH VPS. I use Ubuntu 18. I use a LetsEncrypt cert (please note I don’t have any of these issues when I use Nginx reverse proxy instead for wss, only when using ssl directly in nodejs. My game uses a binary based protocol also) |
@MistikSenpa thank you for more information. I was wondering if you could set Example: const options = {
key: readFileSync('./tests/certs/key.pem'),
cert: readFileSync('./tests/certs/certificate.pem'),
secureProtocol: 'TLSv1_2_method'
}; |
Hi I added it to my code and now
I added it to my code and have deployed it on Asia servers on https://senpa.io/web So far issue hasnt occured for me, maybe check yourself also and see if it happens? |
@MistikSenpa i have tried on multiple browsers Google Chrome, Firefox, Brave. Could not see that issues any more... I am going to release version 1.4.0 in sometime to downgrade |
Thanks for much for fixing the issues :D |
New version 1.4.0 has been released. Secure WebSocket docs have been updated to mention |
Node 13.9+ ssl issue has been resolved from version 1.5.0 |
Hi
I run a game, before I used to use uWS, but wanted to upgrade to the latest node version so switched to cWS, I had no issues, however when I turned SSL on in my gameserver, I started getting issues, whereas in the old uws I had no issues.
I got some SSL Protocol Error
https://prnt.sc/pkzsqv
Doesnt happen all the time, but sometimes players were unable to connect to my game cos of the error, and would have to either refresh many times to be able to play, or wait for the server to keep retrying connection until player connected.
Because of this issues, I am not able to use SSL within cWS, instead I have had to use an nginx reverse proxy (which works fine)
Im just curious if there is a fix for the SSL inside cWS. This issue never happened to me on the old uws
The text was updated successfully, but these errors were encountered: