// The browser invokes this function each time it needs // to determin the use of a Proxy server for a certain URL // The command DIRECT instructs the browser to establish a direct // connection bypassing the Proxy. function FindProxyForURL ( url, host ) { // // 1.) Check for URLs that should not be accessed // through the Proxy (exceptions) // // NOTE: This list can be extended arbitrarily. // Please see the comments "your_url" and "your_ip_address" below. // // The "*" in the expression represents an arbitrary text string // before or after the expression. // // // Reserved URLs. Please modify to your needs and remove comments ("//") // at the beginning of the line //if ( // shExpMatch(url, "*your_url 1*") || // shExpMatch(url, "*your_url 2*") || // shExpMatch(url, "*your_ip_address 1*") || // shExpMatch(url, "*your_ip_address 2*") // return "DIRECT"; // // 2.) Check for HTTP, HTTPS and FTP. This kind of traffic // is directed to the Proxy at port 9202 // if ((url.substring(0, 5) == "http:") || (url.substring(0, 4) == "ftp:") || (url.substring(0, 6) == "https:")) { return "PROXY 127.0.0.1:9202"; } else // // 3.) Check for SOCKS. This kind of traffic // is directed to the Proxy at port 9203 // if (url.substring(0, 6) == "socks:") return "SOCKS 127.0.0.1:9203"; // // 4.) Use a direct connection for anything else. // return "DIRECT"; }