« Oracle: grant permissions to the whole schema | Home | Oracle: recreate database links »

Template for proxy auto-config file

Proxy autoconfig file could be used in browser (Opera,FireFox,IE) to change the proxy dynamically.


var ALLOWED = "DIRECT";
var DISALLOWED = "PROXY 0.0.0.0:1234";

function FindProxyForURL(url, host)
{
if (shExpMatch(url,"*.badsite.com/*")) {return DISALLOWED;}
var currentTime = new Date();// convert the current time to minutes
var now = 60*currentTime.getHours() + currentTime.getMinutes();

// Do not allow the access before 18:00
if (now < 18 * 60 ) {
return DISALLOWED ;
}
else
{
return ALLOWED ;
}

} // end of function

Additional examples

Topics: browser, javascript, proxy | Submitter: checkthis

Comments

You must be logged in to post a comment.