Resclient - Secure WebSockets


Are there any plans to provide an option in Resclient to use Secure WebSockets (wss://) instead of regular Websockets (ws://)?


Lucky enough, ResClient already supports secure WebSockets.

In the Live Demos, you can see that it connects with wss://

// Creating a client instance.
let client = new ResClient('wss://');

But Resgate doesn’t run TLS (a.k.a. doesn’t allow wss connections) by default. You must enable TLS and provide the key and certificate file for encryption to work. See Configuration • for more info.

Another way is to let a reverse proxy, like Nginx, handle the TLS encryption. That is actually what is done for
You can find more info on how to configure Resgate with Nginx here: Nginx reverse proxy

Hope that helps!

Best regards,


Given my current knowledge, nginx seems like overkill for now, so I opted to just use a localhost key and cert to get wss:// up and running. Thanks for the advice!

1 Like