
On Sat, 2009-01-17 at 20:34 -1000, Tim Newsham wrote:
Speaking of proxies, I've been looking into how to find the right proxy to use on Windows systems. Turns out that to do it properly you need a JavaScript interpreter! Yes, really.
Uhh.. What!? That's not right.
I think you mean it should not be right! :-) Of course it's possible to specify a list of proxies in Windows and that info is kept in the registry. It's also common in corporate networks to use proxy auto-configuration. The client gets told the URL of the these (.pac) files and the client downloads it to work out what proxy to use. You'll notice a space to specify an auto-configuration URL (.pac file) in the proxy setting dialog of any web browser. Proxy auto-configuration files are JavaScript. It uses more or less the full JavaScript language (ECMA these days), though with a small subset of the standard library. Web browsers are ok because they've got a JavaScript interpreter. The MS WinHTTP library uses the Windows scripting host service. The open source pacparser C library links to the Mozilla SpiderMonkey JavaScript engine. Apparently we have Netscape to thank for this mess. Duncan