Skip to content

Simple tool to read PAC files and determine which proxy to use for a given URL

License

Notifications You must be signed in to change notification settings

shaleh/pac-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple tool to read PAC files and determine which proxy to use for a given URL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages