squid_db

This is a Squid external ACL based on one or more berkeley databases to match
against and block requests based on that.

This can be used to maintain a very big list of databases of blocked content
with the smallest possible impact in Squid.

This can be used effectively to set an efficient Squid proxy server to block
porn websites.

A script is provided to update the database from an external website based on
categories (Eg: to block porn or religion websites).  This script could be run
on the crontab to update the list of websites to block, for eg. once a month.

How to use:

1. Compile the program:
gcc -o squid_db squid_db.c -ldb

2. Define an external acl in your squid.conf file:
external_acl_type block_porn %DST /usr/libexec/squid/squid_db /var/lib/squid/block/porn.db
acl acl_block_porn external block_porn

Note:
You can specify as many db files as you want as parameters, if there is a
matching database the website will be blocked and the matching
database name will be available as %ea in Squid's logformat specification files.