Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug a Javascript proxy.pac file used for IE proxy settings?

does someone know if its posible to debug a proxy.pac, this file is written in Javascript. how can it be attached to some debug engine like Visual Studio or any other IDE

like image 477
Oscar Cabrero Avatar asked Mar 07 '09 00:03

Oscar Cabrero


People also ask

How do I read a proxy PAC file?

To use it, a PAC file is published to a HTTP server, and client user agents are instructed to use it, either by entering the URL in the proxy connection settings of the browser or through the use of the WPAD protocol. The URL may also reference a local file as for example: file:///etc/proxy.pac .

How do I find the proxy address of a PAC file?

Log into your Web Filter and copy the URL of your uploaded PAC files. You can find your PAC file URL by navigating to Web Filter > Proxy Server under PAC Files. 2. Open Google Chrome and open the Chrome menu.

How do I know if a PAC file is working?

Test the PAC file URL being pushed out by DHCP, do so by using the PAC file URL in the browser proxy settings configured as an explicit PAC file. This will verify whether the PAC file or PAC file server itself is the issue. Review the Windows Registry to confirm the URL being pushed out by WPAD DHCP.

Is a PAC file JavaScript?

A PAC file is a JavaScript function definition for FindProxyForURL(url, host). The complexity of the function varies with the requirements of each organization. Because PAC files are written in JavaScript, they support the structure, logic, and extensibility of JavaScript.


2 Answers

There is "pactester" on Google Code. Works beautifully.

  • http://code.google.com/p/pactester/

Edit:

The tester has now been moved into the parser project:

  • https://github.com/pacparser/pacparser
like image 138
Tomalak Avatar answered Sep 25 '22 17:09

Tomalak


PRB: Cannot Debug a .pac File from Visual InterDev (or "How to debug a .pac File") could help. Working with IE 8 and Visual Studio 2008 here.

like image 34
ax. Avatar answered Sep 25 '22 17:09

ax.