January 25, 2007

pactester - a tool to test proxy auto-config (PAC) files

Hackers and Sysadmins :-)

Google has recently released "pactester", a tool to test proxy auto-configuration (PAC) files. Use of PAC files is becoming more and more common because of automation and ease of administration provided by them. Before pactester there was no "real" way to test the PAC files. We could tell whether this site will be accessible using this PAC file or not. But, we could not tell which proxy server will be used for a specific URL unless we examine the traffic using some network sniffer or check the access logs at the proxy server. Both of these ways were not very accessible and were time consuming. Of course, another way to test would be the manual inspection of PAC files, but again it's error prone and quite impractical for large and complex PAC files.

Pactester resolves all these issues by simulating the browser behavior. It evaluates the PAC file in a JavaScript context and returns the proxy server for a specific URL using the PAC file's logic. It's written in perl and uses the same JavaScript code to evaluate the PAC file functions as is used by Mozilla browsers. Documentation, in the form of README and INSTALL files, is included in the source code tarball. Some relevant URLs:

Project home page: http://code.google.com/p/pactester
Project download: http://http://code.google.com/p/pactester/downloads/list
Quick Documentation: http://pactester.googlecode.com/svn/trunk/README
Mailing list and discussion group: http://groups.google.com/group/pactester

Tested to works on: Linux, Mac OS X, Windows-Cygwin

Cheers to open source!! :-)
Manu Garg/http://www.manugarg.com/"Journey is the destination of life"

Update: Now there is an implementation of pactester in C using pacparser library. Compiled binary of pactester for Windows can be downloaded from pactester download page.


  1. How r u doing? no posts for a long time. whats it,that keeping you busy now-a-days.

    Best Regards

  2. Công ty vận chuyển hàng hóa chúng tôi xin giới thiệu các dịch vụ vận chuyển, ship hàng uy tín để phục vụ nhu cầu Tết của quý khách hàng. Cụ thể chúng tôi sẽ cung cấp dịch vụ chuyển quà tết. Chúng tôi sẽ giúp bạn vận chuyển hàng hóa đến tay người thân, bạn bè ở xa một cách nhanh chóng nhất. Đảm bảo giá cả hợp lý chất lượng dịch vụ tuyệt vời. Ngoài ra chúng tôi còn cung cấp nhiều dịch vụ khác như ship hàng cod, giao hàng cho shop, chuyển phát nhanh,... Nếu cần chuyển hàng hãy nhớ liên hệ với chúng tôi nhé.