[icq-devel] direct connections behaviour when using a proxy



rad2k at mail.ru rad2k at mail.ru
Wed Dec 11 18:38:39 CET 2002


Hmm In case your reply was for my problem..thanks
but that isn't my problem, sorry ;)
Since i wrote already that both my client and the other client are on the same LAN and the DC is established using the LAN ip's i dont need to worry about using proxy's either socks or not.
My problem is still weird, when a mirabilis client on the other side
of the LAN has a proxy configured to connect to the icq server, after opening a socket THROUGH THE LAN, the remote mirabilis client will ignore my DC packets.

Doesn't matter if you still don't understand wtf is going on since
as soon as possible ill continue trying to make this lovely
protocol work.

t/c

/rad2k



-----Original Message-----
From: Mark van Cuijk <webmaster at phedny.zzn.com>
To: icq-devel at blipp.com
Date: Wed, 11 Dec 2002 15:06:01 +0100
Subject: Re:  [icq-devel] direct connections behaviour when using a proxy

> 
> Hi,
> 
> As far as I'm reading this, it seems to me you're using a SOCKS proxyserver. I don't know about SOCKS version 4, but in version 5 it goes like this:
> 
> When the program wishes to use a SOCKS proxy to accept connections, it will establish a (second) connection to the proxy server. In stead of issuing the "connect" command, it 
> issues a "listen" command. The proxy server will (or will not) allow the actions and starts listening on a random port. It then informs the client which IP-address and port 
> can be used. The client then has to inform the other client somehow about this port, probably using another connection via the proxy server. Then, when there is an incoming 
> connection on the "external side" of the proxy, it informs the client about this event and proxy starts relaying messages over this (second) connection.
> 
> With (active) FTP it flows like this:
> 1. Client connects to proxy (1) and issues a connect call to the server
> 2. Proxy connects to the server
> 3. Client makes another connection to proxy (2) and issues a listen call
> 4. Proxy returns IP/port-pair
> 5. Client passes this combination on to the server via proxy (connection 1)
> 6. Server connects to this port on the given IP
> 7. Proxy informs client about this
> 8. Connection 2 is used for data transfer
> 
> For the proxy, the only difference is the beginning. For normal operations ("connect") the client connects to the proxy, then the proxy connects to the server. After this, it 
> will only relay data in two directions. For "listen" actions, the client connects to the proxy and retrieves a IP/port-pair. The server connects to this IP/port-pair and the 
> proxy informs the client about it. After this, it will only relay data in two directions (again).
> 
> Now, let's get to ICQ (I didn't test this, but I assume it's going like this):
> 1. ICQ connects to proxy (1) and issues a connect call to the server
> 2. Proxy connects to the server
> 3. When a direct connection needs to be established, (normally ICQ starts listening on a port), it connects to the proxy again (connection 2)
> 4. Proxy returns IP/port-pair
> 5. Client passes this combination on to the other client (via the server on connection 1)
> 6. Remote client connects to this port on the given IP
> 7. Proxy informs client about this
> 8. Connection 2 can now be used as client-to-client connection
> 
> As you see, in this way ICQ does not listen on any port, it's the proxy who is listening and ICQ only has outgoing connections (to the proxy).
> 
> More about SOCKS v5 can be found on ftp://ftp.isi.edu/in-notes/rfc1928.txt
> 
> - Mark
> 
> 
> 
> -------------------------------------------------
> icq-devel - The forum for ICQ protocol discussion
> For unsubscribe and other mailing list info, see:
> http://www.d.kth.se/~d95-mih/icq/icq-devel/
> 
> 



More information about the icq-devel mailing list