WebSocket (WSS) Through Cloudflare Tunnel
Hi, I'm trying to host a Unity dedicated server for my game to a domain I own. Unity uses WebSockets for the multiplayer framework I'm using, so the clients talk to the host through
I made a quick python script to test this: It sends a standard client hello to the endpoint and expects the server response. It works fine for
So I tried setting up a cloudflared tunnel to provide the WebSocket service at wss://localhost:7777 to api.mydomain.com, with the path /socket.
The ingress rule is set up as
I then ran the Python script, attempting to connect to
I'm unsure if I'm missing any steps to setup the tunnel with WebSockets or if it's a certification issue: I'm using a self-signed certificate but with
Any help would be great, I can provide any additional info if needed about network traffic, headers, etc
Thanks
wss://localhost:7777I made a quick python script to test this: It sends a standard client hello to the endpoint and expects the server response. It works fine for
localhost. So I tried setting up a cloudflared tunnel to provide the WebSocket service at wss://localhost:7777 to api.mydomain.com, with the path /socket.
The ingress rule is set up as
I then ran the Python script, attempting to connect to
"wss://api.mydomain.com/socket". However, i received an exceptionI'm unsure if I'm missing any steps to setup the tunnel with WebSockets or if it's a certification issue: I'm using a self-signed certificate but with
noTLSVerify I thought that it wouldn't matterAny help would be great, I can provide any additional info if needed about network traffic, headers, etc
Thanks