Comment 131 for bug 113201

Revision history for this message
In , higuita (higuita) wrote :

correct, the posted workaround works fine, Jason may have tried a bad workaround, using this was the dns code that locks the firefox doesnt run. any site with slow or no dns will be slow, but JUST for that tab, not all firefox like this bug.

i use a little more elaborate code, but might be useful for those with less proxy.pac knowledge:

if ( isPlainHostName(host) ||
      shExpMatch(host, "*localhost*") ||
      shExpMatch(host, "*producao*") ||
      shExpMatch(host, "*internal-tests*") ||
      shExpMatch(host, "*intranet-pe*") ||
      dnsDomainIs(host, "domain1.pt") ||
      dnsDomainIs(host, "domain2.pt")
   ) { return "DIRECT"; }
else if ( shExpMatch(url, "*10.10.*") ||
          shExpMatch(url , "*:7778*") ||
          shExpMatch(url, "*127.0.0*") ||
          shExpMatch(url, "*192.168.*")
      ){
         if ( isInNet(host, "10.10.0.0", "255.255.0.0") ||
              isInNet(host, "127.0.0.0", "255.0.0.0") ||
              isInNet(host, "192.168.0.0", "255.255.0.0")
            ) { return "DIRECT"; }
         else { return "PROXY proxy:3128"; }
      }
else { return "PROXY 10.10.0.241:8080"; }

note that my code DOES check for the DNS, but only if the URL have some kind of IPs... i do this because i have a internal server with a IP in the URL (not in the host part), so i assume that might also happens in the net... during this years i only found one public server with a url with a internal IP.
neverless, i have a internal DNS that resolves those private IPs, so i get no slowdown... but you can remove that isinet code and it works fine also.

higuita