Re: Socks

From: Henrik Nordstrom <>
Date: Fri, 31 May 1996 15:24:20 +0200

> Hello all,
> A general question, is there a plan to socksify the squid cache at all ?

I read the readmes to SOCKS4 again, and it looks like it is not
possible to SOCKSify squid with SOCKS4 (even with my patch for
mixed socket types applied). The reason is that Squid can start
several simoultaneous connect calls, which is not supported by SOCKS4.

From What_SOCKS_expects in CSTC SOCKS 4.2.2:

3) If connect() is used on a non-blocking socket, no I/O should occur
   on that socket until after another connect() with the same arguments
   returns with -1 and errno indicating EISCONN. This is required even
   if select() on write is used to check the readiness of that socket.
   Also, while a connection is still pending, no attempts may
   be made to start another connection via connect() or the bind()--
   getsockname()--listen()--accept() sequence.

I do not know if the same applies to SOCKS5.

I tried to SOCKSity Squid using a patched CSTS SOCKS 4.2.2 (supports
the use of UNIX and UDP sockets in the same application), but it locks
up as soon as more than one connection is made at the same time (or
possibly on the first connect() to a site that don't respond)

If you need a SOCKSified proxy, you probably have to use a forking server
like CERN.

But it is still possible to use Squid thought SOCKS. All you have to do
is to point it to a parent proxy that is SOCKSified (the parent do not
need to cache anything, since all caching can be done by Squid).

Henrik Nordstrom
Received on Fri May 31 1996 - 06:56:15 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:32:27 MST