Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Proxy Autoconfiguration file

Status
Not open for further replies.

Mirth

IS-IT--Management
Jan 9, 2003
14
0
0
US
Hello,

I'm trying to create a proxy autoconfiguration script, but I'm not familiar enough with Javascript to get it working properly. At the moment, I'm just trying the most basic thing possible, which is to direct all requests through the proxy server regardless of source or destination. The javascript looks like this - with IP addresses changed to protect the innocent, of course -


function FindProxyForURL(url, host) {
return "PROXY 192.168.1.1:8080; DIRECT";

}

I saved the above as proxy.pac, placed it on an IIS server, set the mime type for .pac to application/x-ns-proxy-autoconfig, and pointed the autoconfig url in the browser to the correct location. If I open up the browser and use netstat -n, I see that I'm still connecting directly to the target website.

So, can anyone tell me where the problem might lie? Any help is much appreciated.

Thanks,
Mirth
 
Well, for anyone who may stumble across this thread later, the solution was quite simple. While editing my proxy.pac file, I accidentally associated .pac with Notepad. Once I removed that file association, proxy.pac worked just fine.

Mirth
 
Nothing. There should be no file association, whatsoever, for .pac.

Hope that helps!

Mirth
 
Hi,
Is there any way, I get see source of proxy auto configuration scrit ? I just know its URL.

Thanks
Sanjay
 
I believe you can just type the URL into the Address bar. You'll then be prompted to Save File, or Open With...
Then just use Notepad or Wordpad to view it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top