Game Development Community

Hiding server IP from client by using a proxy

by Igor G · in Torque Game Engine · 06/14/2007 (9:33 am) · 3 replies

Hi,

I would like to have an intermediate server sitting between my Torque client and servers. This intermediate server would act like a proxy and load balancer. The Torque client should ONLY communicate to this proxy server, but the Torque server can communicate directly with the Torque client.

I've tried modifying the netInterface and netConnection files to test if this would work, but I've been unsuccessful. The problem is that during the connection initialization/handshaking, the client has a different address in its pending connection (proxy) than the one it is checking against (directly from server). I've made some few hacks to make this work, but afterwards it still fails, so I'm looking for new direction.

Has anybody done something like this? or have any ideas or suggestions on how to do this?

Thanks.

#1
06/14/2007 (8:17 pm)
You cannot hide the originating address for any TCP/IP (or UDP) connection. You may be able to obfuscate it within the engine, but the connection required to send data back to the client will be accessible by the simplest of firewalls.

Your goal to hide the IP of the Torque server while still maintaining any communication with the client (synchronous or asynchronous) is, by it's very nature, impossible.

If it is an absolute must that you obfuscate the connection to the Torque server, then the proxy server farm must handle 100% of the communication.

An easier method would be a server farm behind a managed, load balancing router that has been configured to balance network traffic between servers based on the known limitations of your server code. Your server farm would then still be accessible via a single IP and the load balancing is handled by equipment specifically designed for that purpose.
#2
06/15/2007 (8:07 am)
Hi Bryce - Yes, we do know it's impossible to hide the IP of the Torque server.

We simply want the client to communicate only with the proxy server and for the Torque server to communicate directly with the client. The problem is that I'm running into problems with Torque's networking code during my tests to see if this was possible.

Thanks,
#3
06/15/2007 (9:01 pm)
I'm not all that savvy w/ Torque Networking... but I'll take a stab. :)

You would need a new NetInterface wrapper that would manage 2 "regular" NetInterface objects... one to your proxy and one to your Torque server. The wrapper class would simply route bitstream writes and reads to the appropriate NetInterface.

Again, I'm not that familiar with it but that would seem to be the direction to go.