]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/proxy.cgi
proxy.pac: Don't use proxy for direct domain access.
[ipfire-2.x.git] / html / cgi-bin / proxy.cgi
index c8f0dca77f490970c488f9f9ea49980c1b455c4b..2a9d49394276a83233b4928b5737b1facb5141e9 100644 (file)
@@ -2236,7 +2236,7 @@ print <<END
        <td width='25%'><input type='text' name='NCSA_USERNAME' value='$proxysettings{'NCSA_USERNAME'}' size='12'
 END
 ;
-       if ($proxysettings{'ACTION'} eq $Lang::tr{'edit'}) { print " readonly "; }
+       if ($proxysettings{'ACTION'} eq $Lang::tr{'edit'}) { print " readonly='readonly' "; }
        print <<END
         /></td>
        <td width='25%' class='base'>$Lang::tr{'advproxy NCSA group'}:</td>
@@ -2972,11 +2972,23 @@ sub writepacfile
                print FILE <<END
 if (
      (isPlainHostName(host)) ||
-     (dnsDomainIs(host, ".$mainsettings{'DOMAINNAME'}")) ||
      (isInNet(host, "127.0.0.1", "255.0.0.0")) ||
-     (isInNet(host, "10.0.0.0", "255.0.0.0")) ||
-     (isInNet(host, "172.16.0.0", "255.240.0.0")) ||
-     (isInNet(host, "192.168.0.0", "255.255.0.0")) ||
+END
+;
+
+       if ($netsettings{'GREEN_DEV'}) {
+               print FILE "     (isInNet(host, \"$netsettings{'GREEN_NETADDRESS'}\", \"$netsettings{'GREEN_NETMASK'}\")) ||\n";
+       }
+
+       if (&Header::blue_used() && $netsettings{'BLUE_DEV'}) {
+               print FILE "     (isInNet(host, \"$netsettings{'BLUE_NETADDRESS'}\", \"$netsettings{'BLUE_NETMASK'}\")) ||\n";
+       }
+
+       if (&Header::orange_used() && $netsettings{'ORANGE_DEV'}) {
+               print FILE "     (isInNet(host, \"$netsettings{'ORANGE_NETADDRESS'}\", \"$netsettings{'ORANGE_NETMASK'}\")) ||\n";
+       }
+
+       print FILE <<END
      (isInNet(host, "169.254.0.0", "255.255.0.0"))
    )
      return "DIRECT";