SYSTEM WARNING: 'date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in '/usr/share/mantis/www/core.php' line 264

0000751: Browser autoconfiguration doesn't work for HTTP-Proxy - MantisBT
MantisBT - Endian Firewall
View Issue Details
0000751Endian FirewallApplication Level Proxiespublic2008-05-04 18:252009-10-27 12:03
jzdrzalek 
peter-endian 
normalmajoralways
closedfixed 
 
2.2-rc1 
0000751: Browser autoconfiguration doesn't work for HTTP-Proxy
hi,

even if http proxy is enabled (for green+red scenario),
the proxy.pac script at http://wpad/proxy.pa [^]
doen't configure the browser to use a proxy.


my EFW is
Model: Demo (software 2.2)
Last update: 2008-05-04 18:12:15

Returned proxy.pa is always that:

function FindProxyForURL(url, host)
{
        if (isPlainHostName(host) ||
                shExpMatch( url, "*10.2.1.1*" ) )
                return "DIRECT";
        else if (host == "127.0.0.1")
                return "DIRECT";
        else if (isInNet(host, "10.2.1.0", "24"))
                return "DIRECT";

        else
                return "DIRECT";
}

I found that the cgi script /home/http/html/wpad.dat checks for a file
/var/efw/proxy/enable_green
(green is lower case of the ZONE). Too bad, that isn't created anymore.

No tags attached.
Issue History
2008-05-04 18:25jzdrzalekNew Issue
2008-05-05 07:58ra-endianStatusnew => assigned
2008-05-05 07:58ra-endianAssigned To => simon-endian
2008-05-08 11:07peter-endianAssigned Tosimon-endian => peter-endian
2008-05-08 11:09peter-endianNote Added: 0001132
2008-05-08 11:12peter-endianStatusassigned => resolved
2008-05-08 11:12peter-endianFixed in Version => 2.2-rc1
2008-05-08 11:12peter-endianResolutionopen => fixed
2009-10-27 12:03peter-endianStatusresolved => closed

Notes
(0001132)
peter-endian   
2008-05-08 11:09   
thank you for the report.

here is a little patch which fixes the problem:

Index: src/html/proxy.pac
===================================================================
--- src/html/proxy.pac (revision 13120)
+++ src/html/proxy.pac (working copy)
@@ -146,9 +146,9 @@
 sub get_port($) {
     my $zone = shift;
     my %conf;
- $zone = lc($zone);
- if (-e $PROXY_ENABLED.$zone) {
- readhash($PROXY_SETTINGS, \%conf);
+ $zone = uc($zone);
+ readhash($PROXY_SETTINGS, \%conf);
+ if ($conf{"PROXY_$zone"} =~ /^enabled|auth$/) {
        return $conf{'PROXY_PORT'};
     }
     return "";