Open robbythedude opened 3 years ago
so we are struggling with a similar issue. The browser only allows websocket connections without ssl from trusted domains like localhost or 127.0.0.1 thats why its working locally. When your client is running under a real hostname the browser doesnt allow you to create an insecure websocket connection. Therefore you would have to use wss://hostname:443. However the problem there is that the open command only allows ip addresses. I managed to create a secure websocket proxy with the unreal server in the background. Now we are struggling with finding a way to connect to it from the game.
Preface
Due to this being an HTML5 multiplayer game, I turned on the "Experimental WebSocket Networking Plugin". I successfully compiled, packaged, and hosted the ThirdPerson example project on my Azure server. I can load the game in multiple browsers just fine.
Due to all of the trouble shooting I've been trying, I have disabled IIS on my Azure server and use the compiled HTML5LaunchHelper.exe that is generated during Packaging. I wanted to make sure both Local and Remote Azure were running the same Web Server experience.
Problem
The game will not connect to my remote dedicated game server using the terminal's open command when I load the game from external Azure site (https://testwinvm.eastus.cloudapp.azure.com/VirtualShow.html). Example of this Scenario's architecture below:
When I load the game from local (http://localhost:8000), the game connects perfectly fine to my remote dedicated game server. Example of this Scenario's architecture below:
I've been inspecting the Debug Console between both scenarios. I thought this might be an CORS issue, but I do not notice any difference in the Headers being sent between the two scenarios. I thought maybe the MIME type encodings are incorrect between the two scenarios, but they look exactly the same. Example below, left is local/scenario two and right is remote/scenario one:
The only thing I notice in the Debug Console that is different between the two scenarios is after the game is already fully loaded in browser. When I execute the terminal's open command, the console logs varying outputs.
Scenario One Output
Scenario Two Output
I believe I found the Error Codes for Socket Connections. Below is a snippet of the Error List. Error Code 26 is "Connection already in progress". Error Code 23 is "Host is Unreachable". Why would the Host be unreachable in scenario one while it can be easily reached in scenario two and loading the standalone win64 client?
Additional Notes
The project is hosted here: https://testwinvm.eastus.cloudapp.azure.com/VirtualShow.html
Project download to run locally is here: https://testwinvm.eastus.cloudapp.azure.com/VirtualShow.zip
The dedicated game server IP for terminal's open command: 20.55.123.171
TL;DR It's like Firefox is blocking my Socket Connection when it's opening the site on a remote server... But it's totally cool with Socket Connections if the site is being opened on localhost. I do not know why. Can you help?