[squid-users] Announcement: pacparser - a c library to parse proxy auto-config (pac) files

2007-12-17 Thread Manu Garg
Hi Folks,

I am very pleased to announce the release of pacparser - a C library
to parse proxy auto-config (PAC) scripts. Needless to say, PAC files
are now a widely accepted method for proxy configuration management
and almost all popular browsers support them. The idea behind
pacparser is to make it easy to add this PAC file parsing capability
to other programs. It comes as a shared C library with a clear API.
You can use it to make any C or python (using ctypes) program PAC
scripts intelligent.

For documentation and available packages, please visit project home page at:
http://code.google.com/p/pacparser

For the ones who like to start with source code, here is the link to
direct download for source code:
http://pacparser.googlecode.com/files/pacparser-1.0.0.tar.gz.

Cheers :-),
Manu
-- 
Manu Garg
http://www.manugarg.com
Journey is the destination of the life.


Re: [squid-users] cache peering - load balancing and failover

2007-11-16 Thread Manu Garg
On Nov 15, 2007 6:52 AM, Henrik Nordstrom [EMAIL PROTECTED] wrote:
 On ons, 2007-11-14 at 19:09 +0530, Manu Garg wrote:
  Here is my problem:
 
  I have a cache server at location X: cache.X. This server peers up
  with cache servers at location Y and Z:
  cache1.Y,
  cache2.Y,
  cache1.Z,
  cache2.Z.
 
  I want cache.X to talk to cache[12].Y in round robin manner as long as
  they are accessible. Peering should failover to cache[12].Z only if
  X-Y connectivity is down.
 
  Is it possible to do this with squid? Probably, something of the sort -
 
  cache_peer cache1.Y parent 3128 0 no-query round-robin priority=1
  cache_peer cache2.Y parent 3128 0 no-query round-robin priority=1
  cache_peer cache1.Z parent 3128 0 no-query round-robin priority=2
  cache_peer cache2.Z parent 3128 0 no-query round-robin priority=2

 Looks fine to me, but add a relatively short connect timeout to the mix
 for quicker failover.


Thanks Henrik! But, there is no priority option for cache_peer
direction right now, right?

 When Squid has failed to connect to a peer 10 times in a row it's
 declared dead and is taken out until it starts responding again.

 Regards
 Henrik


-- 
Manu Garg
http://www.manugarg.com
Journey is the destination of the life.


[squid-users] cache peering - load balancing and failover

2007-11-14 Thread Manu Garg
Here is my problem:

I have a cache server at location X: cache.X. This server peers up
with cache servers at location Y and Z:
cache1.Y,
cache2.Y,
cache1.Z,
cache2.Z.

I want cache.X to talk to cache[12].Y in round robin manner as long as
they are accessible. Peering should failover to cache[12].Z only if
X-Y connectivity is down.

Is it possible to do this with squid? Probably, something of the sort -

cache_peer cache1.Y parent 3128 0 no-query round-robin priority=1
cache_peer cache2.Y parent 3128 0 no-query round-robin priority=1
cache_peer cache1.Z parent 3128 0 no-query round-robin priority=2
cache_peer cache2.Z parent 3128 0 no-query round-robin priority=2

But, there is no such option as priority for cache_peer directive.
There is a weight thing, but that also doesn't work with round-robin
option.

Please let me know if it's possible to do this some way.

I am willing to implement this option if nobody is already working on
such a thing.

thanks,
Manu
-- 
Manu Garg
http://www.manugarg.com
Journey is the destination of the life.


[squid-users] Re: cache peering - load balancing and failover

2007-11-14 Thread Manu Garg
On Nov 14, 2007 7:09 PM, Manu Garg [EMAIL PROTECTED] wrote:
 Here is my problem:

 I have a cache server at location X: cache.X. This server peers up
 with cache servers at location Y and Z:
 cache1.Y,
 cache2.Y,
 cache1.Z,
 cache2.Z.

 I want cache.X to talk to cache[12].Y in round robin manner as long as
 they are accessible. Peering should failover to cache[12].Z only if
 X-Y connectivity is down.

 Is it possible to do this with squid? Probably, something of the sort -

 cache_peer cache1.Y parent 3128 0 no-query round-robin priority=1
 cache_peer cache2.Y parent 3128 0 no-query round-robin priority=1
 cache_peer cache1.Z parent 3128 0 no-query round-robin priority=2
 cache_peer cache2.Z parent 3128 0 no-query round-robin priority=2

 But, there is no such option as priority for cache_peer directive.
 There is a weight thing, but that also doesn't work with round-robin
 option.

Just found out that weighted round robin is available in squid 3.
Apologies for speaking too early. I'll see if weighted-round-robin can
do the job.

-Manu


[squid-users] dstdomain acl and fqdn

2007-04-07 Thread Manu Garg

Say, I have a domain example.com and users access intranet web server
in this domain as: http://www/index.html. www's fqdn is
www.example.com and squid is able to resolve 'www' based on search
path specified in /etc/resolv.conf.

My problem is, in above scenario, squid matches only 'www' when it
comes to dstdomain acl. So, I cannot catch all local traffic using
following acl:

acl localservers dstdomain .example.com

Is there anyway to make squid use FQDNs in dstdomain acls? or, any
other way to resolve this problem?

thanks,
Manu