0

My company has a very large and complex web proxy auto configuration (PAC) file. Is there any way to determine from command line, or maybe Java/Powershell, which proxy will be used by IE i.e. I want to determine the output from FindProxyForURL(url, host) for any supplied url.

I've searched all over and found lots of other stuff, and even tried a couple of Java programs - no joy! Any suggestions welcome.

JerryH
  • 1

1 Answers1

0

You will have to write some code. I suggest VisualStudio and CSharp. You can try VisualBasic or any othet language which has Windows API bindings. I think that PowerShell can do the trick.

Windows API has WinHttpGetProxyForUrl https://msdn.microsoft.com/en-us/library/windows/desktop/aa384097(v=vs.85).aspx There is a sample C# code here https://github.com/respec/BASINS/blob/master/WebDownload/ProxyHelper.cs

You can also copy&paste the PAC file into any of the online tools like https://jsfiddle.net/ and call FindProxyForURL() at the bottom of the file.

Larytet
  • 648
  • 3
  • 13