Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Command line utility to test and debug proxy.pac files. Depends on
#!/usr/bin/env python2
# Usage: $0 proxy.pac url
import pacparser
import sys
import urlparse
pacfile, url = sys.argv[1:]
url = urlparse.urlparse(url)
site = '%s://%s' % (url.scheme, url.netloc)
print 'Proxy for %s is %s' % (site, pacparser.find_proxy(site, url.netloc))

This comment has been minimized.

Copy link

commented Sep 11, 2013

You should add "Depends on" to the comments in the script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.