HOW TO : test Proxy Auto Configuration (PAC) files

By | 20/07/2010

Pactester is a tool to test Proxy Auto Configuration (PAC) files. PAC files are used by browsers to determine the ‘right’ proxy for a URL. Since the PAC file evaluation mechanism is generated inside the browser and cannot be accessed from outside, the only way to tell which proxy your browser will use for a specific URL is manual inspection of the PAC file. But manual inspection doesn’t really scale very well. Pactester resolves this problem. It makes use of JavaScript interpreter and Netscape/Mozilla APIs to evaluate the PAC files and automates the whole process.

Pactester reads a PAC file, evaluates it in a JavaScript context and uses this PAC file’s logic to determine the proxy for a specific URL.

Usage:  ./pactester <-p pacfile> <-u url> [-h host] [-c client_ip]
./pactester <-p pacfile> <-f urlslist> [-c client_ip]
-p pacfile: PAC file to test
-u url: URL to test
-h host: Host part of the URL
-c client_ip: client IP address (defaults to IP address of the machine on which script is running)
-f urlslist: a file containing list of URLs to be tested.
./pactester -p wpad.dat -u
./pactester -p wpad.dat -u -c
./pactester -p wpad.dat -f url_list

Download Area

Pactester (OS: windows) : here

Pactester (OS: Linux) : here

Note:  Please use the ‘pactester’ that comes with ‘pacparser‘ as this version of pactester is no longer maintained/Supported

Leave a Reply