GProxy++ Public Test Release 1.0
Released: March 11, 2010
This is the first public test release of the GProxy++ reconnection tool. Please keep in mind that this tool is the initial version. As with the early hosting bots, this is the initial technology that will be used as a base to expand from and grow in the future. Be patient if there are bugs or features missing.
As of right now, Throneit.com
already support this protocol. It will take some time for other servers, platforms and tools to update to support this protocol, but the tool (and the server) are open source. There are already various platforms and communities working on expanding on these features and integrating them. Anyone is free to use the source code to improve their services for the community. The tool is currently set up to connect to battle.net/pvpgn in LAN mode, but can be modified to be used with many different platforms.
This specific version of the tool (GProxy++) is a "disconnect protection" tool for use with Warcraft III when connecting to specially configured GHost++ servers (GHost++ Version 17.0 and newer only). It allows the game to recover from a temporary internet disruption which would normally cause a disconnect.
When you start GProxy++ for the first time it will ask you to enter some required information such as your CD keys and battle.net login information. This information will be saved to the plain text configuration file "gproxy.cfg" which can be edited with a text editor whenever you wish. GProxy++ runs in console mode (text only) - this was done for simplicity and in order to ensure it can run on as many operating systems as possible such as Linux and OS X.
GProxy++ works by connecting to battle.net and requesting a list of games and then displaying those games on the LAN screen of your Warcraft III. Any games which support GProxy++ reconnections will show up in blue and all other games will show up in white. You will need to connect to a "blue" game in order to be protected by GProxy++. Note that GProxy++ doesn't automatically start displaying the public game list, you will need to use the "/public" command to do this. If you want to join a private game you will need to tell GProxy++ to look for that game with the "/game My Game Name" command.
If your internet connection is lost GProxy++ will attempt to reconnect to the GHost++ server every 10 seconds. In most cases the other players will be presented with a lag screen and they will wait for you to reconnect. However, there is a time limit to the reconnection which is chosen by the server operator and which defaults to 3 minutes. If the reconnection cannot be completed in this time limit you will be dropped from the game.
Since you must join the game from the LAN screen your Warcraft III will not be directly connected to battle.net and therefore whispers and battle.net notices will not be sent in the usual way. GProxy++ will relay whispers to and from you but it cannot make those whispers show up in green therefore they will appear as chat messages originating from you. Due to the way Warcraft III handles replies, you must use the "/re" command instead of "/r" to reply to a whisper, but beware that if someone else whispers you while you are typing your reply the reply will go to them instead of the intended recipient.
As a final note, please keep in mind that GProxy++ is new and may have bugs. If you run into any problems please have patience and let us know on these forums. In addition, if your community/platform supports reconnections, please post on these forums or send me a PM so we can be aware of it for further announcements.
EDIT: Special thanks to buck_choi for all his help testing the very first versions of this tool.
GProxy++ Public Test Release 1.0 (March 11, 2010)
GProxy++ is a "disconnect protection" tool for use with Warcraft III when connecting to specially configured GHost++ servers.
It allows the game to recover from a temporary internet disruption which would normally cause a disconnect.
The game will typically pause and display the lag screen while waiting for a player to reconnect although this is configurable on the server side.
There is a limit to how long the game will wait for a player to reconnect although this is also configurable on the server side.
Players can still vote to drop a player while waiting for them to reconnect and if enough players vote they will be dropped and the game will resume.
You can use GProxy++ to connect to ANY games, GHost++ hosted or otherwise.
Players can also connect to reconnect enabled servers even without using GProxy++, they just won't be protected if they get a disconnect.
You can also use GProxy++ for regular chat or channel monitoring.
There are a few extra features that help you filter game lists based on the type of game you are looking for, make note of the commands below.
Any games created by a reconnect-enabled host will be listed in blue in your game list on the LAN screen.
Where can I use GProxy++?
This version of GProxy++ uses the LAN connection to find games through battle.net and PVPGN networks, but it is open source and can be freely adapted to work with any other platforms.
Many are looking into adapting it for their platforms as we speak.
When you start GProxy++ for the first time it will ask you to enter some required information.
If you want to use GProxy++ on battle.net the questions it asks you are all you need to answer.
If you want to use GProxy++ on PVPGN you will need to enter some additional information after the program starts.
To use GProxy++ on PVPGN:
When the program asks you which realm you want to connect to, enter the address of the PVPGN server.
After the program starts type /quit to quit.
Open the file "gproxy.cfg" in a text editor and enter some information for exeversion and exeversionhash and set "passwordhashtype = pvpgn".
Your PVPGN server operator will provide you with the information you need to enter for exeversion and exeversionhash.
Full list of configuration keys:
log the log file to log console output to
war3path the full path to your Warcraft III folder
cdkeyroc your Reign of Chaos CD key
cdkeytft your The Frozen Throne CD key
server the battle.net/PVPGN server to connect to
username your battle.net/PVPGN username
password your battle.net/PVPGN password
channel the first channel to join after logging into battle.net/PVPGN
war3version the Warcraft III version to connect to battle.net/PVPGN with
port the port GProxy++ should listen for the local player on
exeversion used with PVPGN servers
exeversionhash used with PVPGN servers
passwordhashtype used with PVPGN servers (set to "pvpgn" when connecting to a PVPGN server)
Note that GProxy++ is compatible with Warcraft III: Reign of Chaos.
If you do not want to play The Frozen Throne just remove your TFT CD key from the config file or do not enter it when starting GProxy++ for the first time.
Type /help at any time for help when using GProxy++.
In the GProxy++ console:
/commands show command list
/exit or /quit close GProxy++
/filter <f> start filtering public game names for <f>
/filteroff stop filtering public game names
/game <gamename> look for a specific game named <gamename>
/help show help text
/public enable listing of public games (also: /publicon, /public on, /list, /liston, /list on)
/publicoff disable listing of public games (also: /public off, /listoff, /list off)
/r <message> reply to the last received whisper
/start start Warcraft III
/version show version text
/re <message> reply to the last received whisper
/sc whispers "spoofcheck" to the game host (also: /spoof, /spoofcheck, /spoof check)
/status show status information
/w <user> <message> whispers <message> to <user>
GProxy++, as you may have guessed, proxies the connection from Warcraft III to the GHost++ server.
This is done because Warcraft III is not able to handle a lost connection but, with some trickery, GProxy++ can.
We assume that the (local) connection from Warcraft III to GProxy++ is stable and we permit the (internet) connection from GProxy++ to GHost++ to be unstable.
Warcraft III <----local----> GProxy++ <----internet----> GHost++
When GProxy++ connects to a GHost++ server it sends a GPS_INIT message which signals that the client is using GProxy++.
The server responds with some required information and marks the client as being "reconnectable".
Since the GPS_INIT message is not recognized by non-GHost++ hosts and we want GProxy++ to be able to connect to either, we need some way of identifying GHost++ hosts.
This is done by setting the map dimensions in the stat string to 1984x1984 as these map dimensions are not valid.
The map dimensions are ignored by Warcraft III so there don't seem to be any side effects to this method.
If GProxy++ connects to a game with map dimensions of 1984x1984 it will send the GPS_INIT message, otherwise it will act as a dumb proxy.
After the connection is established both GProxy++ and GHost++ start counting and buffering all the W3GS messages both sent and received.
This is necessary because a broken connection might be detected at different points by either side.
In order to resume the connection we need to ensure the data stream is synchronized which requires starting from a known-good-point.
If GProxy++ detects a broken connection it starts attempting to reconnect to the GHost++ server every 10 seconds.
When a reconnection occurs GProxy++ sends a GPS_RECONNECT message which includes the last message number that it received from the server.
GHost++ then responds with its own GPS_RECONNECT message which includes the last message number that it received from the client.
Both sides then stream all subsequent messages buffered since the requested message numbers and the game resumes.
As an optimization a GPS_ACK message is sent by both sides periodically which allows the other side to remove old messages from the buffer.
Unfortunately there is a quirk in Warcraft III that complicates the reconnection process.
Warcraft III will disconnect from GProxy++ if it doesn't receive a W3GS action at least every 65 seconds or so.
This puts a hard limit on the time we can take to reconnect to the server if the connection is broken.
I decided that 65 seconds was too short so I needed some way to send additional W3GS actions to extend the reconnect time.
However, W3GS actions (even empty ones) are "desyncable" which means we must ensure that every player receives the same actions in the same order.
We can't just have GProxy++ start sending empty actions to the disconnected player because the other players didn't receive those same actions.
And since the broken connection will be detected at different points, we can't go back in time to send empty actions to the connected players after someone disconnects.
The solution, while inelegant, is to send a defined number of empty actions between every single real action.
GProxy++ holds these empty actions in reserve, only sending them to the client when a subsequent real action is received.
Note that as an optimization, GHost++ only sends these empty actions to non-GProxy++ clients.
The number of empty actions is negotiated in the GPS_INIT message and it is assumed that GProxy++ will generate the correct number of empty actions as required.
If GProxy++ doesn't receive a W3GS action for 60 seconds it will "use up" one of the available empty actions to keep the Warcraft III client interested.
If it doesn't have any more empty actions available it will give up and allow Warcraft III to disconnect.
This is because generating another empty action for the Warcraft III client would result in a desync upon reconnection.
After reconnecting GProxy++ knows how many empty actions it had to use while the connection was broken and only sends the remaining number to the Warcraft III client.
GHost++ itself will only bring up the lag screen for a disconnected GProxy++ client when the client falls behind by bot_synclimit messages.
This means it's important for bot_synclimit to be set to a "reasonable value" when allowing GProxy++ reconnections.
Otherwise the game will not be paused while waiting and when GProxy++ reconnects the game will play in fast forward for the player until catching up.
During the catchup period the player will not be able to control their units.
Note that very occasionally the game temporarily enters a state where empty actions cannot be generated.
If the connection is broken while in this state GProxy++ will be limited to 65 seconds to reconnect regardless of the server's configuration.
In most games this will only happen a couple of times for a fraction of a second each time, but note that the lower the server's bot_latency the less chance of this happening.