BannerFilter v1.05
Copyright (C) 2001 Andy Lyttle
E-mail:  bannerfilter@phroggy.com
Web:  http://phroggy.com/bannerfilter/

----------------------------------------------------------------------

PURPOSE:
This script blocks advertising banners on the Web.  If you have
a slow Internet connection, it will speed up your surfing, since
the banners are not downloaded from the Internet at all.

FEATURES:
Unlike most other similar solutions, BannerFilter does more than simply
block advertising graphics.  It also blocks advertising frames on a few
sites, and automatically closes pop-up windows.  A script can automatically
download updated data files off the Web, and notify you when a new version
is available.

REQUIREMENTS:
A working installation of the Squid proxy server, available from
http://www.squid-cache.org/, Perl, and a Web server.  If you don't have
Squid already installed and running, don't try to use BannerFilter!

INSTALLATION:

1) Move the contents of the www directory to somewhere accessible
on your Web server.  These files must be accessible to Squid via HTTP.

2) Move everything else to someplace useful on the machine that is
running Squid.

3) Edit redirector.pl.  If you don't have Perl at /usr/bin/perl, change
the first line (or make a symlink, which will probably save you headaches
later).  Change the $DATA and $WWW lines as indicated in the comments.
Optionally, change the $LOG and $BANNERGIF lines as indicated.

4) Test redirector.pl by running the script, typing something, and making
sure you get something back (generally the same thing you typed).  Press
Ctrl-C to stop.  Yes, this step is important.  If you get an error, fix it
before proceeding.

5) Add a line to squid.conf:
redirect_program /path/to/redirector.pl

6) Restart Squid, and make sure everything works.  You should be able to
go to http://bannerfilter.internal/test.html and get a Web page; if so,
installation was successful.

7) Run the update.sh script to make sure you have the latest version of the
data files (see below).  I update the data files far more often than I
update the tarball, so what's included with the release you downloaded is
probably pretty out of date.

That's it!

UPDATES:
To download the most recent updates to the data files, simply run
the update.sh script in the same directory as the data files.  If you'd
like, you can automate this with a nightly cron job (be sure to cd to
the appropriate directory first, then run ./update.sh).  Sometimes new
versions of the data files require that you upgrade to a new version
of BannerFilter; if an update is required, update.sh will notify you.
The script also tries to killall -HUP redirector.pl, which tells the
redirector.pl script to reload the files; if you're running update.sh as
a non-root user other than the user Squid is running as (or if you don't
have killall), you'll want to comment out the last line and take care of
that yourself.

If you find banners that should be blocked and aren't, legitimate pages
that are being blocked and shouldn't be, or if you just have comments or
questions, e-mail me at bannerfilter@phroggy.com.  Please do not ask me
for help installing Squid.

THANKS:
Thomas B. Fox (nexus@donia.org) and Miroslav Pragl
(miroslav.pragl@omega-optix.cz) suggested the local.data files.  Dan
Everton (dan@conditioned.org) suggested the transparent 1x1 GIF option.
Marcel J.E. Mol (marcel@mesa.nl) submitted a patch with minor code
improvements.

----------------------------------------------------------------------

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
