/* INSTRUCTIONS: ----------------------------- 1. You need to have this proxy.pac file. ( if you don't know what a PAC file is read about it here: http://en.wikipedia.org/wiki/Proxy_auto-config) 2. You need to have a web server -> Define MIME type for the PAC file via the server config file. ( if you don't know what a MIME type is you can read about it here: http://en.wikipedia.org/wiki/MIME essentially all we are doing is telling the web sever what a pac file is.) IF you are running an APACHE WEB SERVER: Step 1: Go to your Web Site Directory: Go to the directory on your web server where your web site is located. Step 2: Create a new ".htaccess" file, if you don't already have one: Create a new text file called ".htaccess". This file defines how files inside of this directory are to be handled by the server. Step 3: Add a MIME type to the ".htaccess" file Open up the ".htaccess" file using your favorite text editor and add the following line: application/x-ns-proxy-autoconfig IF you are running an IIS WEB SERVER : Step 1: Select your sites domain. Step 2: Select HTTP headers tabs and click on MIME types Step 3: Click New. Step 4: Enter this information: Extension: .pac MIME Type: application/x-ns-proxy-autoconfig and click Ok. 3. When the above is done feed the URL that has the PAC file to the proxy software for the iPad. */ function FindProxyForURL(url, host) { // Convert everything to lower case. var lhost = host.toLowerCase(); host = lhost; if ((host == "localhost") || (shExpMatch(host, "localhost.*")) || (host == "127.0.0.1")) { return "DIRECT"; } // Here replace below with the IP with your proxy Address. // **If you have a URL to your proxy, make sure that the return statement looks like: "PROXY www.example.com:8080" // **The keyword "PROXY" has to be there. return "PROXY 172.31.10.252:8080"; }