Usage
Pactester is a command-line tool designed to test PAC/WPAD files quickly and easily. Below are some common usage examples and explanations of available options.
Basic usage using a local PAC file:
pactester -f wpad.dat example.com
This will use the default PAC file to determine the proxy for example.com.
Specifying a PAC file URL:
pactester -u http://example.com/wpad.dat example.com intranet.local
This downloads the PAC file from the given URL and tests the specified hostnames against it.
Using a local PAC file:
pactester -f ./wpad.dat example.com
This uses a local PAC file instead of downloading one.
Example with DNS check and verbose output:
pactester -u http://example.com/wpad.dat --check-dns -v example.com intranet.local
This downloads the PAC file, verifies DNS resolution for each hostname, and prints verbose logs.
Available options
-u, --pac-urlSpecify a URL to download the PAC/WPAD file from.-f, --pac-fileUse a local PAC file path instead of downloading.--check-dnsCheck if each hostname can be resolved via DNS before testing the proxy.--purge-cacheRemove all cached PAC files and related data.-c, --cache-dirSpecify a custom directory for cache storage (default is usually a system cache folder).-e, --cache-expiresSet cache expiration time in seconds (e.g., 3600 for 1 hour).-n, --no-cacheDisable caching entirely; always fetch fresh PAC files.-v, --verboseIncrease output verbosity for more detailed logs.-vvv, --debugEnable debug mode with very detailed logging for troubleshooting.--versionDisplay the current version of Pactester.
Note
-pac-url and --pac-file are mutually exclusive. You have to choose one of them only.
For a complete list of options and their descriptions, run:
pactester --help