#Potential SSL issues with websocket client/server

6 messages · Page 1 of 1 (latest)

noble agate
#

Hey all,

I'm trying to develop a jackbox like game where you run an application on your computer and connect to it (via websockets) from a hosted website.

I had it all working locally okay however when I hosted the 'controller' it would only connect from the same machine as the 'game' was running on. i.e. Game running on my PC, open browser on my pc and can connect, open browser on my phone or laptop and cannot connect.

From some googling I believe the issue is that I was using unsecure websockets (ws) and needed to use secured websockets (wss) since the hosted controller was on https. See: https://forum.godotengine.org/t/problems-with-websockets-and-html5-export/12451

So I made a self signed certificate and private key to attach to my server using openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem from https://stackoverflow.com/questions/50625283/how-to-install-openssl-in-windows-10

However looking at https://docs.godotengine.org/en/stable/classes/class_tlsoptions.html I'm not sure what to pass through to the client tls options? I just put in the same cert file I gave to the server but it doesn't work.

Anyone have an idea?

noble agate
#
fathom jungle
#

You probably need to use a proper cert and not a self signed one

noble agate
fathom jungle
#

Maybe I misunderstood. You'll definitely need a central server that isn't any game client for this, regardless of type of game client. Web clients won't be able to connect directly to a desktop client, I don't think there's any way for that to work

#

I had assumed you were already doing that