ICQ masquerade as a universal solution to problems with changes to the ICQ protocol
This is my first post on the Habré, so any suggestions for the style of writing are welcome.
Due to periodic changes in the ICQ protocol, not all third-party clients keep up with them, so there was a need for a layer between the server and the client, which can be quickly adjusted.
In this article, I will talk about the implementation of such a layer, in the form of a specialized proxy - ICQGATE or ICQ masquerade.
As a student back in 1999, when university enthusiasts stretched out and set up hostels in hostels, the task of proxying ICQ arose, since the only Internet connection was through a university HTTP proxy, which was overloaded with requests.
Initially, there was an idea to write a full-fledged ICQ server, but having really appreciated our chances and time, I had to simplify the task to only proxies, because It was necessary already "yesterday".
By the way, the local ICQ server was still written: IServerd
All information on the protocol, at that time, was taken from the MICQ sources
It should be noted that a simple redirect to login.icq.com for ICQ does not work, because the server itself sends the client a special IP address, with which further interaction is going on.
Proxying scheme with the simplest authorization (without MD5):
This scheme was quickly implemented on Perl and still works on a university server. In 2005, optimized versions were written for FreeBSD and Linux already for providers who added the free ICQ service for users and got a noticeable competitive advantage among home network providers.
Since everything is written in Perl, it should work almost everywhere.
The demo version can be downloaded here: icqgate-2.0.2.zip
UPDATE: now supports authorization with MD5.
All sources can be downloaded for free, there are no restrictions.
The other day I will try to make a version that will hide the latest changes for all old clients.
Let your local address be 192.168.0.2, and the address of the router 192.168.0.1,
then run on the ICQGATE router like this:
./icqgate.pl --port = 5190 --host = 192.168.0.1
In the client, you need to register the address instead of login.icq.com router 192.168.0.1, for reliability, you can redefine the domain in c: / windows / system32 / drivers / etc / hosts.
All the same, only replace the router address with 127.0.0.1.
You can add any logic to this proxy that hides any protocol changes from clients. For example, you can substitute the desired flap sequence number,
according to a certain algorithm.
Due to periodic changes in the ICQ protocol, not all third-party clients keep up with them, so there was a need for a layer between the server and the client, which can be quickly adjusted.
In this article, I will talk about the implementation of such a layer, in the form of a specialized proxy - ICQGATE or ICQ masquerade.
A bit of history
As a student back in 1999, when university enthusiasts stretched out and set up hostels in hostels, the task of proxying ICQ arose, since the only Internet connection was through a university HTTP proxy, which was overloaded with requests.
Initially, there was an idea to write a full-fledged ICQ server, but having really appreciated our chances and time, I had to simplify the task to only proxies, because It was necessary already "yesterday".
By the way, the local ICQ server was still written: IServerd
All information on the protocol, at that time, was taken from the MICQ sources
Details
It should be noted that a simple redirect to login.icq.com for ICQ does not work, because the server itself sends the client a special IP address, with which further interaction is going on.
Proxying scheme with the simplest authorization (without MD5):
- We send an authorization request to login.icq.com.
- We get a new IP server from login.icq.com.
- We replace this IP with the address of our proxy in the response to the client.
This scheme was quickly implemented on Perl and still works on a university server. In 2005, optimized versions were written for FreeBSD and Linux already for providers who added the free ICQ service for users and got a noticeable competitive advantage among home network providers.
Since everything is written in Perl, it should work almost everywhere.
The demo version can be downloaded here: icqgate-2.0.2.zip
UPDATE: now supports authorization with MD5.
All sources can be downloaded for free, there are no restrictions.
The other day I will try to make a version that will hide the latest changes for all old clients.
How to use
Option with a router
Let your local address be 192.168.0.2, and the address of the router 192.168.0.1,
then run on the ICQGATE router like this:
./icqgate.pl --port = 5190 --host = 192.168.0.1
In the client, you need to register the address instead of login.icq.com router 192.168.0.1, for reliability, you can redefine the domain in c: / windows / system32 / drivers / etc / hosts.
Variant with localhost
All the same, only replace the router address with 127.0.0.1.
Now about solving problems with AOL protocol changes
You can add any logic to this proxy that hides any protocol changes from clients. For example, you can substitute the desired flap sequence number,
according to a certain algorithm.