📜 ⬆️ ⬇️

ICQ masquerade as a universal solution to problems with changes in the ICQ protocol

This is my first post on Habré, so any suggestions for the style of writing are welcome.

Due to the periodic changes in the ICQ protocol, not all third-party clients keep up with them, so there is 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 this layer, in the form of a specialized proxy - ICQGATE or ICQ-masquerade.

A bit of history

While still a student in the distant 1999, when university Internet was pulled and set up by enthusiasts by hostels, the problem arose of proxying ICQ, since the only access to the Internet was through the university HTTP proxy, which was overloaded with requests.
')
Initially, the idea was to write a full-fledged ICQ-server, but really realizing my chances and time, I had to simplify the task to just a proxy, because should have been "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, since the server itself sends a special IP address to the client, with which further interaction takes place.

Proxy scheme with the simplest authorization (without MD5):
  1. We send an authorization request to login.icq.com.
  2. We get a new server IP from login.icq.com.
  3. We replace this IP with the address of our proxy in the response to the client.

This scheme was quickly implemented in Perl and still works on the university server. In 2005, optimized versions for FreeBSD and Linux were written for providers, who added free ICQ service for users and gained 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 customers.

How to use

Option with a router

Let your local address is 192.168.0.2, and the address of the router is 192.168.0.1,
then you run ICQGATE on the router like this:

./icqgate.pl --port = 5190 --host = 192.168.0.1

In the client, you need to register the address of the router 192.168.0.1 instead of login.icq.com, for reliability, you can override the domain in c: / windows / system32 / drivers / etc / hosts.

Option with localhost

All the same, only the address of the router is replaced by 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,
by the defined algorithm.

Source: https://habr.com/ru/post/50131/


All Articles