Re: [squid-users] Squid::Guard perl module announce

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sun, 10 Oct 2010 23:31:09 +0000

On Sun, 10 Oct 2010 22:38:10 +0200, "Squid at Iotti dot Biz"
<squid_at_iotti.biz> wrote:
> Hi all
>
> I wrote a perl module for creating redirectors for Squid. As the name
> implies, it was inspired by squidGuard. It aims to be more flexible and
to
> some extent even simpler to use.
> I was happy with squidGuard and used it for years. But sometimes I
needed
> some extra features like the ability to differentiate between users
> belonging to different groups, or to take decisions based on some
external
> program output, etc. squidGuard did not support this directly, so I had
to
> choose between complicated configurations with tricks to circumvent
these
> limitations, or writing some dedicated redirector. Soon Squid::Guard was
> born.
> The module has built-in support for some common tasks performed in Squid
> redirectors, including:
> - lookup of domain or url in .db files created from text list files,
like
> squidGuard does. Expression files are also supported.
> - lookup of user in UNIX or winbind (SaMBa, Windows) groups
>
> I consider the module beta, and certain features were just briefly
tested
> at
> the moment. But I use it in some production environments without
problems.
> Maybe others can be interested in it. It can be found on CPAN, the link
to
> the current version is http://search.cpan.org/~lux/Squid-Guard-0.11/ .

Thank you for this. I'm sure quite a few people will find it useful.

I'm trying to make a few things "standard" in the helpers.
Please make this module accept the following command-line parameters:
 -d debug info sent to stderr of the helper.
      errors resulting in helper crash or exit prefixed with "FATAL: "
      serious errors not resulting in crash prefixed with "ERROR: "
      warnings about bad state which is and can be auto-recovered prefixed
with "WARNING: "

 -h usage information about the helper command-line arguments.

Please support the concurrency protocol. A module such as this should be
perfect for abstracting the particular transaction protocol. It will let
foreach() be used to process large numbers of lookups quickly. Details on
implementing concurrency protocol can be found at
http://wiki.squid-cache.org/Features/Redirectors

Please update your documentation to correct usage of the term "redirect"
("redirector"/"redirection" -> "helper program").

 * "redirect" has an RFC defined meaning in HTTP. It only happens when a
"302:"/"303:"/"307:" status is pre-pended to the result URI. In redirection
the client browser is made aware of the altered URL.

 * "url re-write" is when there is no 3xx status prefix. In this case the
altered URL is kept internal to Squid and only affects the fetching source.

Also, does it have to be called "Guard"? AFAIK that is a defacto brand
name for that other software. What this module does is url-rewriting and/or
redirects. Squid::Helper::UrlRewrite would be more appropriate IMHO.

Amos
Received on Sun Oct 10 2010 - 23:31:12 MDT

This archive was generated by hypermail 2.2.0 : Tue Oct 12 2010 - 12:00:03 MDT