Ny tool for setting up proxy with pac file

http-proxy

I've learned that different programs process pac files in different ways, and maybe most of them even don't support pac files. So I want to know if there is a tool that setup a proxy says 127.0.0.1:1234. And when I set some program's proxy to 127.0.0.1:1234, this tool use a pac file to decide whether to redirect to proxy or connect directly. Are there any tools that satisfy the above feature?

Best Answer

Browsers with JavaScript support usually support PAC files. Anything else usually doesn't, in particular I'm not aware of any off-the-shelf proxy software that does. There are many proxies that support a way to perform differently based on the target URL, however, just not through a JavaScript program. See Transparent local proxy to many proxies

A PAC file is a JavaScript program, so support for PAC files requires a JavaScript interpreter. While there are proxies written in JavaScript, I can't find one that supports PAC files. The Python library pacparser implements PAC support (on top of Mozilla's JavaScript engine), and there are many proxies written in Python, but amazingly there doesn't seem to be any actual proxy program that uses pacparser.

Related Question