Jump to content
Posted 22 October 1999 - 02:12 AM
Posted 15 October 1999 - 12:58 PM
Especially not if the game is all (or mainly) server side, and you are even remotely interrested in clients that sit behind a firewall. Sockets won't bypass a firewall (in general).
In this case you need to move up a layer, and go for HTTP - it is not as fast but for a lot of applications it's a lot easier, at it has benefits (such as the firewall issue)...
I'll launch a new site in the comming weeks, which is a client/server game using HTTP, that should give an impression of what can be done with HTTP. (Java for the UI on the client, ASP for the prototype server - that might change to ISAPI, or MTS components)
Posted 16 October 1999 - 04:21 AM
Anyhow, I want people to be able to play my game from work (Yes I know, I'm a bad guy ) and I generally don't think IT departments are too trilled about people installing various proxies on the inside of the firewall ...
Posted 16 October 1999 - 06:15 AM
I also achieve a certain amount of "at work" players by having Artifact run in a "normal" window. It's resizeable, so they can make it fit behind their spreadsheet app with only a gold "A" icon showing in the taskbar... ;-)
Posted 16 October 1999 - 09:16 AM
Posted 16 October 1999 - 07:36 PM
First, you point the socket to the proxy server IP and port # and initiate the connection.
Second, when the connection is established, you send the following information:
4 (8-bit value: 0x04)
1 (8-bit value: 0x01)
Port # (16-bit value)
IP address (32-bit form)
NULL (8-bit value: 0x00)
The 4 specifies SOCKS4. I forget what the 1 does. The port and IP are obvious.
It's been a while since I researched and implemented this, so I feel a bit rusty. Hope this is helpfule.
Posted 17 October 1999 - 07:01 AM
I could imagine that it would be common if some large corperate systems already used it - you could kind of piggy bag your way through the firewall . But as far as I know, most companies are open for HTTP ONLY - and that sort of settles it for me.
There's no doubt that I'd prefer UDP for the performance gain, but it's no good if you miss your target audience ...
Posted 17 October 1999 - 08:23 AM
I don't know how typical that is, though.
I added the proxy support primarily so that players with home networks and modem sharing could play. But I do have a number of worker-players... =)
Posted 18 October 1999 - 04:45 AM
Posted 18 October 1999 - 07:04 AM
IT companies HATE socks4 and socks5 simply because it DOES allow tunneling of TCP/IP data.
HTTP is the only real way to get through firewalls, and you have to do all kinds of tricks to make it work -- but once it does its really worth it.
Posted 18 October 1999 - 11:45 AM
If you really wanted to be evil, you could have a server side approach to bypassing firewalls. Make the client establish a keep-alive connection with the server and have it poll it for packets every half seconds with a GET command...and have it use GET with your actual packet afterwards for sending packets. I dunno it might work it sounds sneaky and underhanded
Posted 18 October 1999 - 12:20 PM
Then, it connects to a predefined server on the Internet using HTTP, tunneling its packets through the proxy, to the server, which then masquerades them to the REAL destination. Bingo! You have complete access to every server and every port using nothing but a restrictive HTTP proxy!
Anyone here interested in doing it with me?
Posted 18 October 1999 - 09:41 PM
Posted 20 October 1999 - 12:11 PM
Posted 22 October 1999 - 02:12 AM
It's not a big deal though - The client was a Java class inherited from the Socket class to make it look like a socket. Internally, it wrapped binary socket data in HTTP, called the HTTP server extension (an ISAPI module). The ISAPI extension unwrapped the data, and forwarded it (using sockets) to the original socket server). There's a bit of book keeping and error handling, but other than that, it's a no-brainer ...