Re: Squid-1.1.9 and socks

From: Arjan de Vet <Arjan.deVet@dont-contact.us>
Date: Sun, 11 Jan 1998 23:17:10 +0100 (CET)

John Warburton:

>We use socks on our squid - but we are using socks version 5. It has a
>nifty shell script which allows you to socksify anything without
>changing the source. So in out RunCache, we simply have the line:
> /usr/local/bin/runsocks squid -sY $conf >> $logdir/squid.out 2>&1
>
>and that is all we have to do. Munging the code looks like too much
>work.

I needed socks version 4 support (because the firewall is socks4) and it
didn't work that easy with socks4. So I hacked it into the Squid source
itself (the socks4 protocol is quite simple and I wanted to learn the Squid
source code some more).

This also made it possible to implement other 'hacks'. My current
'production' version of this patch uses two socks4 firewalls and balances
the load between them. To determine which firewall to use the modulo (%) of
the IP address and the number of firewalls is computed (some sites don't
like it when you contact them from changing IP addresses per connection, so
alternating was not a good option). By defining one firewall twice you can
even get things like 2:1 load balancing.

Arjan
Received on Sun Jan 11 1998 - 14:18:47 MST

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