I’m making an multiplayer game using websockets and if you check the connection through the chrome network tab, you can see the IP of the server.
I tried to use Cloudflare to add a security layer, however the game connection doesn’t work with it. I have already tested Cloudflare with a test websocket outside of Unity and it worked, so the problem is the game.
Is this a known problem? Is there a solution or a workaround? Am I worrying too much about attacks and DDoS?
Premise: you can’t hide where a connection is going, even if the browser didn’t tell you there are pretty basic tools to discover it. In any case, Cloudflare should work with websocket. I am pretty sure. Have you tried contacting the support and explaining what is not working?
And yes, you might be worrying too much. Unless your game becomes pretty popular and attracts lots of attention it’s unlikely you’ll be the target of a DDoS.
But I’ve seen that agar.io uses some sort of Cloudflare service on their websocket. Even then would I be able to get their server IP?
I was able to make it work using websocketd on the server and a javascript snippet on my browser. It is the game connection that doesn’t.
No you only see your connection endpoint, which would be the CloudFlare proxy.
As far as I know your game should be able to connect to the server by pointing the client to CloudFlare’s proxy. They should take care of everything else.
As far as the chrome network tab displaying the server IP. Anyone capable of putting together a DDoS attack already knows how to open a command prompt or terminal and run the netstat command, so the chrome network tab is not really relevant.
Yes, that was only how I’ve seen the IP, there are other ways to see it.
This is what I want to accomplish.