pacparser is a C library that embeds a spidermonkey javascript interpreter and provides the needful to be able to load PAC files and provide a lookup service to determine host and port proxies based on requested URLs.
tclpacparser makes that C library available to Tcl programs through a dead simple interface.
package require pacparser
* pacparser init - initialize the pacparser library.
* pacparser parse_pac string - parse a proxy auto-config PAC file contained in string.
* pacparser find_proxy url host - returns a proxy string such as DIRECT or PROXY
proxy1.bigcompany.co.uk
Returns an empty string if the method fails for any reason.
* pacparser set_my_ip ip
* pacparser cleanup - cleanup the pacparser library.