SleezeBall 0.6 by Fredrik Rambris <boost@amiga.nu> Homepage: http://boost.linux.kz/sleezeball/ LICENCE ------- It's licensed under GNU GPL (see COPYING file) with the following exception: Nils Olle Fritiof Strand or staff in his companies may not use or sell this. ABOUT SLEEZEBALL ---------------- SlezeBall is a redirector to be used with the Squid proxy. It tries to guess what is a banner and then tells Squid to load a local image instead. This has the nice effect of saving you from downloading and seeing alot of ugly banners (linux.com has such goodlooking banners that I can't bring me to filter them out). WHAT IS A REDIRECTOR -------------------- When Squid recieves a URL to fetch it first asks the redirectors about it. The redirector then sais "Ok" or "Use this URL instead". HOW SLEEZEBALL DOES THIS ------------------------ When SleezeBall fires up it loads it's definitionfile with patterns of known banners. When it gets a URL it wander this list from top to bottom and seek for matches. If a match is found it report back to Squid to use a defined URL instead. Preferably a local image, such as the supplied 1x1 pixel transparent GIF. It can however just as easy be any image. REQUIREMENTS ------------ Squid2. I've written a mini-HOWTO of how to install Squid and optionally make it transparent. Go to my homepage (see top of doc) and download it if you want. INSTALLATION ------------ - If you have Squid running shut it down now. - Compile the stuff (make) or install the thing with RPM. - Edit the 'sleezeball.conf' to reflect your system and copy it to the place defined in 'sleezeball.c' (/etc/squid by default). The REDIRECT_URL may be http://<your-squid-host>:3128/squid-internal-static/icons/banner.gif - If you have installed Squid by RPM in RedHat or Mandrake Linux do a 'make install' as root, else copy the binary to a place you like (say /usr/local/bin), the banner.gif to Squid2's icon-directory (/usr/lib/squid/icons/) by default and add the following line to your mime.conf (/etc/squid/mime.conf): internal-banner - banner.gif - image - If you want a quick start copy the supplied sleezeball.definitions to the place selected in 'sleezeball.c' (/etc/squid by default) - Update the following lines in squid.conf redirect_program /usr/lib/squid/sleezeball redirect_children 5 - Start up Squid NOTE TO THOSE UPGRADING ----------------------- If you're upgrading from sleezeball 0.4 or earlier rename your sleezeball.conf to sleezeball.definitions! THE SLEEZEBALL.CONF ------------------- Simple rules. Comment with #. Empty lines are ignored. LOG = logfile - If defined logging is enabled. REDIRECT_URL = url - The URL to redirect all bannerhits to. THE SLEEZEBALL.DEFINITIONS -------------------------- Sleezeball will go throuch the rows one by one until it finds a match between the URL and the row. If several elements have to be checked put a space between them and they will be ANDed together. Eg. ads.banners.net .gif will only be a hit if both 'ads.banners.net' AND '.gif' is found in the URL. If you make changes to this file send the sleezeball tasks running a SIGHUP and they will reload the file. The 'reloadszb' script will do just that.