Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.24 KB

README.adoc

File metadata and controls

31 lines (22 loc) · 1.24 KB

PAC Info Tool

Simple tools that use a PAC [1] file to determine what the proper proxy is for a given URL.

To install:

  1. git clone https://github.com/pacparser/pacparser

  2. cd pacparser

  3. make -C src; sudo make -C src install

  4. make -C src pymod; sudo make -C src install-pymod

  5. cd pac-info

  6. pip install -r requirements.txt

This will ensure the needed libraries are installed. Then you can copy the scripts to some place in your PATH or just run them from the checkout. Don’t forget to ensure they are chmod +x.

pac-info will retrieve the PAC file and tell you the PROXY used for a given domain. This is useful for setting up NO_PROXY for example. You can use a tool like wget to retrieve the PAC file from the autocache site and use --pac-file instead of downloading the file each time.

$ pac-info --pac-url http://PROXY_AUTOCACHE google.com
$ pac-info --pac-url http://PROXY_AUTOCACHE some.internalsite.example.com  # should be DIRECT and belongs in NO_PROXY

gen-proxy-env will output the needed proxy settings in a format ready for /etc/environment. It too can use --pac-file.

Example how to use it:

$ gen-proxy-env --pac-url http://PROXY_AUTOCACHE google.com