Replies: 3 comments 1 reply
-
Hi @Cherden, If I understand correctly, you have a:
And you're not sure how to accept requests from the web server so that they are forwarded to your PlayFab hosted game server. The WebGL client should ideally connect to the proxy directly. There shouldn't be a need for the web server to forward requests to the proxy server. You can bind an unused host port to 443 on the container in the
Your PlayFab hosted game server needs to run a websocket server listening on the port configured in your build.
You can use insecure websockets on the game server since the proxy server handles the handshake process associated with secure websockets. Let me know if my assumptions are correct, or if there were additional questions. It would be helpful on our end to get more details about your architecture and how the web/proxy servers are hosted. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. We have the proxy running in a container on the same web server as the WebGL build. It exposes port 80 as 8090 and 443 as 443. Playfab instances have one game port 7777/TCP configured. The Playfab server build has a websocket transport layer configured with When a WebGL client (on https) gets matched through Playfab Matchmaking, it connects to
But there is no log inside the Playfab server instance confirming that the connection was established (for example a OnPlayerConnect callback). This also resulted in the WebGL client getting disconnected immediately and console/nginx logs display a 400 error. I hope that explains our setup and situation better. |
Beta Was this translation helpful? Give feedback.
-
I managed to get it to work eventually. Thank you for your help @AustinBrunkhorst. As a reference for future devs stuck in my position:
The line Note:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
thanks for implementing this solution!
We are trying to set it up at the moment but have some confusion about the environment. The client and server use netcode.websocket as the transport layer, with wss enabled.
The proxy is configured to use the matchId and queue from the Playfab matchmaking api and runs on the same node as the web server for the WebGL build. The WebGL build then connects to the web server using wss (
wss://proxy.domain.com
).Here is where we are confused about the setup. Would the request need to be forwarded by nginx to the container on port 80? How would we need to setup the web server to accept the incoming connections, i.e. which ports need to be mapped to which in the container? Does the Playfab server build need the websocket transport layer as well or communicates the proxy over http? If the server still uses the websocket transport layer, we would need to disable wss there and use ws, correct?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions