Comment 46 for bug 113201

Revision history for this message
In , Mbrown-gatewayk12 (mbrown-gatewayk12) wrote :

Here is my pac file. Right now I have some debug code in there to show that there is a several second delay when resolving a new DNS name but the delay is there regardless if I have dnsResolve there or commented out. So it almost seams like it is doing a DNS lookup in the UI code. Also adding my debug code does not slow it down any. So if I have to guess I would say that there is a DNS lookup sometime after the function FindProxyForURL is called.

PS I am using FF 1.5.0.1 on Win XP.

function FindProxyForURL(url,host)
{

//#######
//#Debug#
//#######

var time = new Date();
sec1=time.getSeconds();
milli1=time.getMilliseconds();

remoteIP=dnsResolve(host);

var time2 = new Date();
sec2=time2.getSeconds();
milli2=time2.getMilliseconds();

alert(host+" Resolved to "+remoteIP+" in "+(sec2-sec1)+":"+(milli2-milli1));

//###############
//#Local Network#
//###############

if (isInNet(host, "10.0.0.0", "255.0.0.0")){
            return "DIRECT";
}

//#########
//#Library#
//#########

if ( host == "auth.somesite.com" ||
 host == "search.someothersite.com" ||
 host=="yetanothersite.com" ){
 return "DIRECT";
}

//#########
//#Default#
//#########

return "PROXY proxy.ourdomain.com:8000";

}