title: how to use unity and websockets
body: <p>Hey guys I'm making a unity webGL build with websocketsharp, <a href="https://github.com/sta/websocket-sharp" rel="nofollow noreferrer">https://github.com/sta/websocket-sharp</a></p>
  <p>Weird thing is it works fine when I run it from client, I can send and receive messages with nodeJS but when I upload the build to my server I get this error when I try to connect to the server</p>
  <p>12/5/2021 6:53:40 PM|Fatal|.|System.Net.Sockets.SocketException (0x80004005): Could not resolve host 'mydomain.io'
  Desktop.loader.js:1 at System.Net.Dns.Error_11001 (System.String hostName) [0x00000] in &lt;00000000000000000000000000000000&gt;:0</p>
  <p>here is how I am connecting in C#</p>
  <p>ws = new WebSocket(&quot;wss://mydomain.io:8000&quot;);
  ws.SetProxy(&quot;https://mydomain.io/server&quot;, &quot;&quot;, &quot;&quot;);</p>
  <p>I have no idea how to debug this. Why would it work in the unity editor but not when I upload to the server? Is websocketssharp the best way to communicate with a nodeJS server?</p>