Auto Proxy Filter Test

Auto Proxy Filter Test (APFT) is a program designed to automate the testing of safe and unsafe URLs against a content filtering proxy (such as Dansguardian). APFT is useful to people who are designing filter rules.

Copyright and license

Copyright (C) 2005-2006 Andrew Ziem

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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


APFT requires Python which is available for most operating systems. Also, Python is typically already installed on Linux systems.

APFT requires an HTTP proxy such as Squid, Dansguardian, or squidGuard.

APFT operates from the command line (also known as shell or console), and there is no graphic user interface. Therefore, you must known how to use the command line interface. (It's not very difficult, though.)

Download APFT

Operation instructions

First, create several lists of URLs. The format is simply one URL per line encoded with UTF-8 or ASCII. One list should be "safe" URLs which should not be blocked. The second list should be unsafe, adult-only URLs which should be blocked. If you wish, you may create additional lists such as spyware, "young adult or older," gambling, etc. (Note: example safe and adult lists are included.)

Second, change your operating system's environment variables to define which proxy to use. In Bash, for example, run this command


Third, invoke the program like the following:

python --block --test adult.txt
python --pass --test safe.txt

Contact author

Use the SourceForge project page to file bug reports and patches. Otherwise, contact Andrew Ziem.

Interpreting result codes

Code Meaning
True URL is not blocked
400 Bad request
403 Forbidden: the site is blocked (probably by the filtering proxy)
404 Not found

See also RFC 2616 section 10.

How to help

Please send URLs that should be blocked but are not or those that are blocked but should not be. Logo Ninja