I’m posting this in hopes of bringing more light to the problem I’ve been having with web sockets in Unity 2018.1 beta
I’d mainly like to know if this is planned for being fixed any time soon, or if I’m gonna have to look for alternatives in terms of making my player connections secure.
Before I begin I’d like to point out that HTTPS requests to the same server already work, it’s just the websocket WSS scheme that doesn’t seem to be able to connect.
The error i’ve mostly been seeing while debugging is “1002” which is an “Protocol Error” message. I believe this is simply because it can’t perform the SSL handshake properly.
So I’ve got a project using .Net 4.6 where I’ve tried to connect with the .Net 4.5 ClientWebSocket to a secure scheme at:
wss://mydomain.com
This simply does not work in unity as of now.
If I use this test tool to connect to my domain it works fine:
If I use an entirely separate standalone console application made with .Net 4.6 it also works fine to connect to my domain using ClientWebSocket with WSS
Other implementations like WebSocketSharp also seem to not be working.
A lot of solutions mentioned around the forums have not worked as they seem to be outdated when it comes to websockets, things like “allowing all certificates” (which is also a security risk) also do not work.
From my standpoint it would seem like it’s just a matter of unity implementing the known certificate authorities for websockets as they have for HTTPS already.
I posted this as a bug about a month back:
https://fogbugz.unity3d.com/default.asp?1016393_vhg86kfmphme5hm0