-
Hello all! I’m new to this community and was wondering what the recommended steps are to deploy an online WebGL game on Github Pages. From my understanding, Github Pages is automatically set to https protocol and for websocket communication to work properly, the websocket protocol needs to be secured. I’ve developed a game on Unity using Mirror Networking and from their documentation, the Websocket Transport component requires a Certificate Path and a Certificate password (https://mirror-networking.com/docs/Transports/WebSockets.html?q=websocket). Currently my game is deployed on https://hlimbo.github.io/#/ProjectAce and the server is hosted using AWS EC2 Windows Server. Whenever I try to connect to the server, I get this following error in the browser’s console (short error): Is it possible to request for the SSL cert information in order to get my game to work online publically over WebGL? If not, what would be some good alternatives to get the game running on Github Pages? Any help would be appreciated. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @hlimbo, welcome to the GitHub Support Community! I don’t think this is possible using GitHub Pages’ SSL certificate I’m afraid. From a quick look over the docs you listed it seems like you’ll need to buy/generate your own SSL certificate for this. GitHub Pages SSL certificates are managed automatically by GitHub and you’re not able to directly access or set a password on the certificate generated. Unfortunately that documentation seems to be lacking in exactly how to set this up so I’m not quite sure what to suggest. If they have a support team or forum I’d recommend reaching out for help there. |
Beta Was this translation helpful? Give feedback.
-
@thomasshaped I was able to figure out the steps needed to get the online game to run using secured websockets. The Unity Game WebGL client can be statically hosted on Github Pages but you are required to purchase a web domain and server with SSL certification installed. In case anyone needs steps on how to deploy an online game on Github Pages I followed the following steps:
where privkey.pem is your private key, cert.pem and chain.pem are the certificate files obtained through certification process.
|
Beta Was this translation helpful? Give feedback.
-
Amazing! So happy you got it working, and thanks so much for posting the solution for others that might come across this in future 🙇♂️ |
Beta Was this translation helpful? Give feedback.
@thomasshaped I was able to figure out the steps needed to get the online game to run using secured websockets. The Unity Game WebGL client can be statically hosted on Github Pages but you are required to purchase a web domain and server with SSL certification installed. In case anyone needs steps on how to deploy an online game on Github Pages I followed the following steps: