mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
"Update Booster" fertiggestellt und getestet.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@494 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -8,41 +8,46 @@
|
||||
'title' => "Webproxy",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subnetwork->{'30.urlfilter'} = {'caption' => 'URL-Filter',
|
||||
$subnetwork->{'21.urlfilter'} = {'caption' => $Lang::tr{'url filter'},
|
||||
'uri' => '/cgi-bin/urlfilter.cgi',
|
||||
'title' => "URL-Filter",
|
||||
'title' => $Lang::tr{'url filter'},
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subnetwork->{'40.dhcp'} = {'caption' => $Lang::tr{'dhcp server'},
|
||||
$subnetwork->{'22.updxlrator'} = {'caption' => $Lang::tr{'update accelerator'},
|
||||
'uri' => '/cgi-bin/updatexlrator.cgi',
|
||||
'title' => $Lang::tr{'update accelerator'},
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subnetwork->{'30.dhcp'} = {'caption' => $Lang::tr{'dhcp server'},
|
||||
'uri' => '/cgi-bin/dhcp.cgi',
|
||||
'title' => "$Lang::tr{'dhcp server'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subnetwork->{'50.scheduler'} = {
|
||||
$subnetwork->{'40.scheduler'} = {
|
||||
'caption' => $Lang::tr{'connscheduler'},
|
||||
'uri' => '/cgi-bin/connscheduler.cgi',
|
||||
'title' => "$Lang::tr{'connscheduler'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subnetwork->{'60.hosts'} = {
|
||||
$subnetwork->{'50.hosts'} = {
|
||||
'caption' => $Lang::tr{'edit hosts'},
|
||||
'uri' => '/cgi-bin/hosts.cgi',
|
||||
'title' => "$Lang::tr{'edit hosts'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subnetwork->{'70.upload'} = {
|
||||
$subnetwork->{'60.upload'} = {
|
||||
'caption' => $Lang::tr{'upload'},
|
||||
'uri' => '/cgi-bin/upload.cgi',
|
||||
'title' => "$Lang::tr{'upload'}",
|
||||
'enabled' => 0,
|
||||
};
|
||||
$subnetwork->{'80.aliases'} = {
|
||||
$subnetwork->{'70.aliases'} = {
|
||||
'caption' => $Lang::tr{'aliases'},
|
||||
'uri' => '/cgi-bin/aliases.cgi',
|
||||
'title' => "$Lang::tr{'aliases'}",
|
||||
'enabled' => 0,
|
||||
};
|
||||
$subnetwork->{'90.wakeonlan'} = {
|
||||
$subnetwork->{'80.wakeonlan'} = {
|
||||
'caption' => $Lang::tr{'WakeOnLan'},
|
||||
'uri' => '/cgi-bin/wakeonlan.cgi',
|
||||
'title' => "$Lang::tr{'WakeOnLan'}",
|
||||
|
||||
@@ -982,11 +982,18 @@ usr/lib/squid/smb_auth.sh
|
||||
usr/lib/squid/squid_ldap_auth
|
||||
usr/lib/squid/unlinkd
|
||||
usr/sbin/squid
|
||||
usr/sbin/updxlrator
|
||||
#usr/share/man/man8/cachemgr.cgi.8
|
||||
#usr/share/man/man8/ncsa_auth.8
|
||||
#usr/share/man/man8/squid.8
|
||||
#usr/share/man/man8/squid_ldap_auth.8
|
||||
var/ipfire/updatexlrator/autocheck/cron.daily
|
||||
var/ipfire/updatexlrator/autocheck/cron.monthly
|
||||
var/ipfire/updatexlrator/autocheck/cron.weekly
|
||||
var/ipfire/updatexlrator/bin/checkup
|
||||
var/ipfire/updatexlrator/bin/download
|
||||
var/log/cache
|
||||
#var/log/squid
|
||||
var/log/squid/access.log
|
||||
var/log/updatexlrator
|
||||
#var/logs
|
||||
|
||||
@@ -305,8 +305,6 @@ WARNING: translation string unused: written sectors
|
||||
WARNING: translation string unused: xtaccess bad transfert
|
||||
WARNING: translation string unused: year
|
||||
WARNING: untranslated string: IPFires hostname
|
||||
WARNING: untranslated string: Number of IPs for the pie chart
|
||||
WARNING: untranslated string: Number of Ports for the pie chart
|
||||
WARNING: untranslated string: allmsg
|
||||
WARNING: untranslated string: alt proxy
|
||||
WARNING: untranslated string: dial profile
|
||||
|
||||
@@ -309,8 +309,6 @@ WARNING: translation string unused: written sectors
|
||||
WARNING: translation string unused: year
|
||||
WARNING: translation string unused: yearly firewallhits
|
||||
WARNING: untranslated string: IPFires hostname
|
||||
WARNING: untranslated string: Number of IPs for the pie chart
|
||||
WARNING: untranslated string: Number of Ports for the pie chart
|
||||
WARNING: untranslated string: alt proxy
|
||||
WARNING: untranslated string: down
|
||||
WARNING: untranslated string: firewall logs ip
|
||||
|
||||
@@ -305,16 +305,14 @@ if ($lines != 0) { &oldernewer(); }
|
||||
print <<END
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td width='10%' align='center' class='boldbase'><b>$Lang::tr{'time'}</b></td>
|
||||
<td width='13%' align='center' class='boldbase'><b>$Lang::tr{'chain'}</b></td>
|
||||
<td width='5%' align='center' class='boldbase'><b>$Lang::tr{'iface'}</b></td>
|
||||
<td width='5%' align='center' class='boldbase'><b>$Lang::tr{'proto'}</b></td>
|
||||
<td width='16%' align='center' class='boldbase'><b>$Lang::tr{'source'}</b></td>
|
||||
<td align='center' class='boldbase'><b>$Lang::tr{'time'}</b></td>
|
||||
<td align='center' class='boldbase'><b>$Lang::tr{'chain'}</b></td>
|
||||
<td align='center' class='boldbase'><b>$Lang::tr{'iface'}</b></td>
|
||||
<td align='center' class='boldbase'><b>$Lang::tr{'proto'}</b></td>
|
||||
<td align='center' class='boldbase'><b>$Lang::tr{'source'}<br/>$Lang::tr{'destination'}</b></td>
|
||||
<td align='center' class='boldbase'><b>$Lang::tr{'src port'}<br />$Lang::tr{'dst port'}</b></td>
|
||||
<td align='center' class='boldbase'><b>Flag</b></td>
|
||||
<td width='10%' align='center' class='boldbase'><b>$Lang::tr{'src port'}</b></td>
|
||||
<td width='5%' align='center' class='boldbase'><b>$Lang::tr{'mac address'}</b></td>
|
||||
<td width='16%' align='center' class='boldbase'><b>$Lang::tr{'destination'}</b></td>
|
||||
<td width='20%' align='center' class='boldbase'><b>$Lang::tr{'dst port'}</b></td>
|
||||
<td align='center' class='boldbase'><b>$Lang::tr{'mac address'}</b></td>
|
||||
</tr>
|
||||
END
|
||||
;
|
||||
@@ -360,16 +358,10 @@ foreach $_ (@log)
|
||||
<td align='center'>$comment</td>
|
||||
<td align='center'>$iface</td>
|
||||
<td align='center'>$proto</td>
|
||||
<td align='center'><a href='/cgi-bin/ipinfo.cgi?ip=$srcaddr'>$srcaddr</a></td>
|
||||
<td align='center'><a href='/cgi-bin/ipinfo.cgi?ip=$srcaddr'>$srcaddr</a><br /><a href='/cgi-bin/ipinfo.cgi?ip=$dstaddr'>$dstaddr</a></td>
|
||||
<td align='center'>$srcport<br/>$dstport</td>
|
||||
<td align='center'><a href='../country.cgi#$fcode'><img src='/images/flags/$fcode.png' border='0' align='absmiddle' alt='$ccode'></a></td>
|
||||
<td align='center'>$srcport</td>
|
||||
<td align='center'>$macaddr</td>
|
||||
<td align='center'>
|
||||
<table width='100%' cellpadding='0' cellspacing='0'><tr>
|
||||
<td align='center'><a href='/cgi-bin/ipinfo.cgi?ip=$dstaddr'>$dstaddr</a></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
<td align='center'>$dstport</td>
|
||||
</tr>
|
||||
END
|
||||
;
|
||||
|
||||
@@ -454,7 +454,7 @@ for($s=0;$s<$lines;$s++)
|
||||
{
|
||||
$show++;
|
||||
$percent = $value[$s] * 100 / $linesjc;
|
||||
$percent = sprintf("%.3f", $percent);
|
||||
$percent = sprintf("%.f", $percent);
|
||||
$total = $total + $value[$s];
|
||||
if ( ($colour % 10) == 1 ){print "<TR BGCOLOR='$colour1'>\n";}
|
||||
if ( ($colour % 10) == 2 ){print "<TR BGCOLOR='$colour2'>\n";}
|
||||
@@ -496,7 +496,7 @@ if ( ($colour % 10) == 0 ){print "<TR BGCOLOR='$colour10'>\n";}
|
||||
my $dif;
|
||||
$dif = $linesjc - $total;
|
||||
$percent = $dif * 100 / $linesjc;
|
||||
$percent = sprintf("%.3f", $percent);
|
||||
$percent = sprintf("%.f", $percent);
|
||||
print <<END
|
||||
<TD ALIGN='CENTER'></TD>
|
||||
<TD ALIGN='CENTER'>$Lang::tr{'otherip'}</TD>
|
||||
|
||||
@@ -453,7 +453,7 @@ for($s=0;$s<$lines;$s++)
|
||||
{
|
||||
$show++;
|
||||
$percent = $value[$s] * 100 / $linesjc;
|
||||
$percent = sprintf("%.3f", $percent);
|
||||
$percent = sprintf("%.f", $percent);
|
||||
$total = $total + $value[$s];
|
||||
if ( ($colour % 10) == 1 ){print "<TR BGCOLOR='$colour1'>\n";}
|
||||
if ( ($colour % 10) == 2 ){print "<TR BGCOLOR='$colour2'>\n";}
|
||||
@@ -490,7 +490,7 @@ if ( ($colour % 10) == 0 ){print "<TR BGCOLOR='$colour10'>\n";}
|
||||
my $dif;
|
||||
$dif = $linesjc - $total;
|
||||
$percent = $dif * 100 / $linesjc;
|
||||
$percent = sprintf("%.3f", $percent);
|
||||
$percent = sprintf("%.f", $percent);
|
||||
print <<END
|
||||
<TD ALIGN='CENTER'></TD>
|
||||
<TD ALIGN='CENTER'>$Lang::tr{'otherport'}</TD>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# IPCop CGIs
|
||||
# (c) 2004-2007 marco.s - http://www.advproxy.net
|
||||
#
|
||||
# This code is distributed under the terms of the GPL
|
||||
#
|
||||
# $Id: advproxy.cgi,v 2.0.0 [beta] 2006/09/03 00:00:00 marco.s Exp $
|
||||
# $Id: advproxy.cgi,v 2.1.0 2007/03/06 00:00:00 marco.s Exp $
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
# enable only the following on debugging purpose
|
||||
#use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
use warnings;
|
||||
use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
@@ -24,11 +24,9 @@ my $https_port='444';
|
||||
my %proxysettings=();
|
||||
my %netsettings=();
|
||||
my %filtersettings=();
|
||||
my %updaccelsettings=();
|
||||
my %xlratorsettings=();
|
||||
my %stdproxysettings=();
|
||||
my %mainsettings=();
|
||||
my $urlfilter_addon=0;
|
||||
my $updaccel_addon=0;
|
||||
|
||||
my %checked=();
|
||||
my %selected=();
|
||||
@@ -146,25 +144,14 @@ close(FILE);
|
||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||
|
||||
if (-e "${General::swroot}/urlfilter/version") { $urlfilter_addon = 1; }
|
||||
if (-e "${General::swroot}/updatexlrator/version") { $updaccel_addon = 1; }
|
||||
|
||||
if ($urlfilter_addon) {
|
||||
$filtersettings{'CHILDREN'} = '5';
|
||||
if (-e "${General::swroot}/urlfilter/settings") {
|
||||
&General::readhash("${General::swroot}/urlfilter/settings", \%filtersettings);
|
||||
}
|
||||
$urlfilterversion = `cat ${General::swroot}/urlfilter/version`;
|
||||
$urlfilterversion =~ s/([^\s]+).*/$1/;
|
||||
$filtersettings{'CHILDREN'} = '5';
|
||||
if (-e "${General::swroot}/urlfilter/settings") {
|
||||
&General::readhash("${General::swroot}/urlfilter/settings", \%filtersettings);
|
||||
}
|
||||
|
||||
if ($updaccel_addon) {
|
||||
$updaccelsettings{'CHILDREN'} = '10';
|
||||
if (-e "${General::swroot}/updatexlrator/settings") {
|
||||
&General::readhash("${General::swroot}/updatexlrator/settings", \%updaccelsettings);
|
||||
}
|
||||
$updaccelversion = `cat ${General::swroot}/updatexlrator/version`;
|
||||
$updaccelversion =~ s/([^\s]+).*/$1/;
|
||||
$xlratorsettings{'CHILDREN'} = '5';
|
||||
if (-e "${General::swroot}/updatexlrator/settings") {
|
||||
&General::readhash("${General::swroot}/updatexlrator/settings", \%xlratorsettings);
|
||||
}
|
||||
|
||||
&Header::showhttpheaders();
|
||||
@@ -202,6 +189,8 @@ $proxysettings{'L1_DIRS'} = '16';
|
||||
$proxysettings{'OFFLINE_MODE'} = 'off';
|
||||
$proxysettings{'CLASSROOM_EXT'} = 'off';
|
||||
$proxysettings{'SUPERVISOR_PASSWORD'} = '';
|
||||
$proxysettings{'NO_PROXY_LOCAL'} = 'off';
|
||||
$proxysettings{'NO_PROXY_LOCAL_BLUE'} = 'off';
|
||||
$proxysettings{'TIME_ACCESS_MODE'} = 'allow';
|
||||
$proxysettings{'TIME_FROM_HOUR'} = '00';
|
||||
$proxysettings{'TIME_FROM_MINUTE'} = '00';
|
||||
@@ -254,14 +243,8 @@ $proxysettings{'IDENT_REQUIRED'} = 'off';
|
||||
$proxysettings{'IDENT_TIMEOUT'} = '10';
|
||||
$proxysettings{'IDENT_ENABLE_ACL'} = 'off';
|
||||
$proxysettings{'IDENT_USER_ACL'} = 'positive';
|
||||
|
||||
if ($urlfilter_addon) {
|
||||
$proxysettings{'ENABLE_FILTER'} = 'off';
|
||||
}
|
||||
|
||||
if ($updaccel_addon) {
|
||||
$proxysettings{'ENABLE_UPDXLRATOR'} = 'off';
|
||||
}
|
||||
$proxysettings{'ENABLE_FILTER'} = 'off';
|
||||
$proxysettings{'ENABLE_UPDXLRATOR'} = 'off';
|
||||
|
||||
$ncsa_buttontext = $Lang::tr{'advproxy NCSA create user'};
|
||||
|
||||
@@ -305,6 +288,10 @@ if ($proxysettings{'ACTION'} eq $Lang::tr{'remove'})
|
||||
&deluser($proxysettings{'ID'});
|
||||
}
|
||||
|
||||
$checked{'ENABLE_UPDXLRATOR'}{'off'} = '';
|
||||
$checked{'ENABLE_UPDXLRATOR'}{'on'} = '';
|
||||
$checked{'ENABLE_UPDXLRATOR'}{$proxysettings{'ENABLE_UPDXLRATOR'}} = "checked='checked'";
|
||||
|
||||
if ($proxysettings{'ACTION'} eq $Lang::tr{'edit'})
|
||||
{
|
||||
$proxysettings{'NCSA_EDIT_MODE'} = 'yes';
|
||||
@@ -587,8 +574,8 @@ ERROR:
|
||||
|
||||
if (-e "${General::swroot}/proxy/settings") { &General::readhash("${General::swroot}/proxy/settings", \%stdproxysettings); }
|
||||
$stdproxysettings{'PROXY_PORT'} = $proxysettings{'PROXY_PORT'};
|
||||
if ($urlfilter_addon) { $stdproxysettings{'ENABLE_FILTER'} = $proxysettings{'ENABLE_FILTER'}; }
|
||||
if ($updaccel_addon) { $stdproxysettings{'ENABLE_UPDXLRATOR'} = $proxysettings{'ENABLE_UPDXLRATOR'}; }
|
||||
$stdproxysettings{'ENABLE_FILTER'} = $proxysettings{'ENABLE_FILTER'};
|
||||
$stdproxysettings{'ENABLE_UPDXLRATOR'} = $proxysettings{'ENABLE_UPDXLRATOR'};
|
||||
&General::writehash("${General::swroot}/proxy/settings", \%stdproxysettings);
|
||||
|
||||
&writeconfig;
|
||||
@@ -680,6 +667,13 @@ $checked{'LOGUSERAGENT'}{$proxysettings{'LOGUSERAGENT'}} = "checked='checked'";
|
||||
$selected{'ERR_LANGUAGE'}{$proxysettings{'ERR_LANGUAGE'}} = "selected='selected'";
|
||||
$selected{'ERR_DESIGN'}{$proxysettings{'ERR_DESIGN'}} = "selected='selected'";
|
||||
|
||||
$checked{'NO_PROXY_LOCAL'}{'off'} = '';
|
||||
$checked{'NO_PROXY_LOCAL'}{'on'} = '';
|
||||
$checked{'NO_PROXY_LOCAL'}{$proxysettings{'NO_PROXY_LOCAL'}} = "checked='checked'";
|
||||
$checked{'NO_PROXY_LOCAL_BLUE'}{'off'} = '';
|
||||
$checked{'NO_PROXY_LOCAL_BLUE'}{'on'} = '';
|
||||
$checked{'NO_PROXY_LOCAL_BLUE'}{$proxysettings{'NO_PROXY_LOCAL_BLUE'}} = "checked='checked'";
|
||||
|
||||
$checked{'CLASSROOM_EXT'}{'off'} = '';
|
||||
$checked{'CLASSROOM_EXT'}{'on'} = '';
|
||||
$checked{'CLASSROOM_EXT'}{$proxysettings{'CLASSROOM_EXT'}} = "checked='checked'";
|
||||
@@ -806,17 +800,13 @@ $checked{'IDENT_USER_ACL'}{'positive'} = '';
|
||||
$checked{'IDENT_USER_ACL'}{'negative'} = '';
|
||||
$checked{'IDENT_USER_ACL'}{$proxysettings{'IDENT_USER_ACL'}} = "checked='checked'";
|
||||
|
||||
if ($urlfilter_addon) {
|
||||
$checked{'ENABLE_FILTER'}{'off'} = '';
|
||||
$checked{'ENABLE_FILTER'}{'on'} = '';
|
||||
$checked{'ENABLE_FILTER'}{$proxysettings{'ENABLE_FILTER'}} = "checked='checked'";
|
||||
}
|
||||
$checked{'ENABLE_FILTER'}{'off'} = '';
|
||||
$checked{'ENABLE_FILTER'}{'on'} = '';
|
||||
$checked{'ENABLE_FILTER'}{$proxysettings{'ENABLE_FILTER'}} = "checked='checked'";
|
||||
|
||||
if ($updaccel_addon) {
|
||||
$checked{'ENABLE_UPDXLRATOR'}{'off'} = '';
|
||||
$checked{'ENABLE_UPDXLRATOR'}{'on'} = '';
|
||||
$checked{'ENABLE_UPDXLRATOR'}{$proxysettings{'ENABLE_UPDXLRATOR'}} = "checked='checked'";
|
||||
}
|
||||
$checked{'ENABLE_UPDXLRATOR'}{'off'} = '';
|
||||
$checked{'ENABLE_UPDXLRATOR'}{'on'} = '';
|
||||
$checked{'ENABLE_UPDXLRATOR'}{$proxysettings{'ENABLE_UPDXLRATOR'}} = "checked='checked'";
|
||||
|
||||
&Header::openpage($Lang::tr{'advproxy advanced web proxy configuration'}, 1, '');
|
||||
|
||||
@@ -1086,11 +1076,10 @@ print <<END
|
||||
<td width='25%'></td> <td width='20%'> </td><td width='25%'> </td><td width='30%'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='base'>$Lang::tr{'advproxy allowed subnets'}:</td>
|
||||
<td colspan='2'> </td>
|
||||
<td colspan='4' class='base'>$Lang::tr{'advproxy allowed subnets'}:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><textarea name='SRC_SUBNETS' cols='32' rows='6' wrap='off'>
|
||||
<td colspan='2' rowspan='4'><textarea name='SRC_SUBNETS' cols='32' rows='6' wrap='off'>
|
||||
END
|
||||
;
|
||||
|
||||
@@ -1105,6 +1094,33 @@ if (!$proxysettings{'SRC_SUBNETS'})
|
||||
|
||||
print <<END
|
||||
</textarea></td>
|
||||
END
|
||||
;
|
||||
|
||||
$line = $Lang::tr{'advproxy no internal proxy on green'};
|
||||
$line =~ s/Green/<font color="$Header::colourgreen">Green<\/font>/i;
|
||||
print "<td class='base'>$line:</td>\n";
|
||||
print <<END
|
||||
<td><input type='checkbox' name='NO_PROXY_LOCAL' $checked{'NO_PROXY_LOCAL'}{'on'} /></td>
|
||||
</tr>
|
||||
END
|
||||
;
|
||||
if ($netsettings{'BLUE_DEV'}) {
|
||||
$line = $Lang::tr{'advproxy no internal proxy on blue'};
|
||||
$line =~ s/Blue/<font color="$Header::colourblue">Blue<\/font>/i;
|
||||
print "<tr>\n";
|
||||
print "<td class='base'>$line:</td>\n";
|
||||
print <<END
|
||||
<td><input type='checkbox' name='NO_PROXY_LOCAL_BLUE' $checked{'NO_PROXY_LOCAL_BLUE'}{'on'} /></td>
|
||||
</tr>
|
||||
END
|
||||
;
|
||||
}
|
||||
print <<END
|
||||
<tr>
|
||||
<td colspan='2'> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'> </td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1502,11 +1518,10 @@ print <<END
|
||||
END
|
||||
;
|
||||
|
||||
if ($urlfilter_addon) {
|
||||
print <<END
|
||||
print <<END
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td class='base' colspan='4'><b>$Lang::tr{'advproxy url filter'}</b> [<font color='$Header::colourred'> $urlfilterversion </font>]</td>
|
||||
<td class='base' colspan='4'><b>$Lang::tr{'advproxy url filter'}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='base' width='25%'>$Lang::tr{'advproxy enabled'}:</td>
|
||||
@@ -1516,14 +1531,10 @@ if ($urlfilter_addon) {
|
||||
</tr>
|
||||
</table>
|
||||
<hr size='1'>
|
||||
END
|
||||
; }
|
||||
|
||||
if ($updaccel_addon) {
|
||||
print <<END
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td class='base' colspan='4'><b>$Lang::tr{'advproxy update accelerator'}</b> [<font color='$Header::colourred'> $updaccelversion </font>]</td>
|
||||
<td class='base' colspan='4'><b>$Lang::tr{'advproxy update accelerator'}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='base' width='25%'>$Lang::tr{'advproxy enabled'}:</td>
|
||||
@@ -1533,10 +1544,7 @@ if ($updaccel_addon) {
|
||||
</tr>
|
||||
</table>
|
||||
<hr size='1'>
|
||||
END
|
||||
; }
|
||||
|
||||
print <<END
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td colspan='5'><b>$Lang::tr{'advproxy AUTH method'}</b></td>
|
||||
@@ -2213,7 +2221,7 @@ END
|
||||
print <<END
|
||||
</table>
|
||||
<br>
|
||||
<table width='100%'>
|
||||
<table>
|
||||
<tr>
|
||||
<td class='boldbase'> <b>$Lang::tr{'legend'}:</b></td>
|
||||
<td> <img src='/images/edit.gif' alt='$Lang::tr{'edit'}' /></td>
|
||||
@@ -3114,10 +3122,13 @@ acl IPCop_http port $http_port
|
||||
acl IPCop_https port $https_port
|
||||
acl IPCop_ips dst $netsettings{'GREEN_ADDRESS'}
|
||||
acl IPCop_networks src "$acl_src_subnets"
|
||||
acl IPCop_servers dst "$acl_src_subnets"
|
||||
acl IPCop_green_network src $netsettings{'GREEN_NETADDRESS'}/$netsettings{'GREEN_NETMASK'}
|
||||
acl IPCop_green_servers dst $netsettings{'GREEN_NETADDRESS'}/$netsettings{'GREEN_NETMASK'}
|
||||
END
|
||||
;
|
||||
if ($netsettings{'BLUE_DEV'}) { print FILE "acl IPCop_blue_network src $netsettings{'BLUE_NETADDRESS'}/$netsettings{'BLUE_NETMASK'}\n"; }
|
||||
if ($netsettings{'BLUE_DEV'}) { print FILE "acl IPCop_blue_servers dst $netsettings{'BLUE_NETADDRESS'}/$netsettings{'BLUE_NETMASK'}\n"; }
|
||||
if (!-z $acl_src_banned_ip) { print FILE "acl IPCop_banned_ips src \"$acl_src_banned_ip\"\n"; }
|
||||
if (!-z $acl_src_banned_mac) { print FILE "acl IPCop_banned_mac arp \"$acl_src_banned_mac\"\n"; }
|
||||
if (!-z $acl_src_unrestricted_ip) { print FILE "acl IPCop_unrestricted_ips src \"$acl_src_unrestricted_ip\"\n"; }
|
||||
@@ -3301,9 +3312,23 @@ if ($delaypools) {
|
||||
print FILE "delay_access 2 deny all\n";
|
||||
}
|
||||
|
||||
print FILE "delay_initial_bucket_level 100%\n";
|
||||
print FILE "delay_initial_bucket_level 100\n";
|
||||
print FILE "\n";
|
||||
}
|
||||
|
||||
if ($proxysettings{'NO_PROXY_LOCAL'} eq 'on')
|
||||
{
|
||||
print FILE "#Prevent internal proxy access to Green\n";
|
||||
print FILE "http_access deny IPCop_green_servers !IPCop_green_network\n\n";
|
||||
}
|
||||
|
||||
if ($proxysettings{'NO_PROXY_LOCAL_BLUE'} eq 'on')
|
||||
{
|
||||
print FILE "#Prevent internal proxy access from Blue\n";
|
||||
print FILE "http_access allow IPCop_blue_network IPCop_blue_servers\n";
|
||||
print FILE "http_access deny IPCop_blue_network IPCop_servers\n\n";
|
||||
}
|
||||
|
||||
print FILE <<END
|
||||
#Set custom configured ACLs
|
||||
END
|
||||
@@ -3628,38 +3653,35 @@ END
|
||||
|
||||
print FILE "\nnever_direct allow all\n\n";
|
||||
}
|
||||
if (($urlfilter_addon) && ($updaccel_addon) && ($proxysettings{'ENABLE_FILTER'} eq 'on') && ($proxysettings{'ENABLE_UPDXLRATOR'} eq 'on'))
|
||||
if (($proxysettings{'ENABLE_FILTER'} eq 'on') && ($proxysettings{'ENABLE_UPDXLRATOR'} eq 'on'))
|
||||
{
|
||||
print FILE "url_rewrite_program /usr/sbin/redirect_wrapper\n";
|
||||
if ($filtersettings{'CHILDREN'} > $updaccelsettings{'CHILDREN'})
|
||||
if ($filtersettings{'CHILDREN'} > $xlratorsettings{'CHILDREN'})
|
||||
{
|
||||
print FILE "url_rewrite_children $filtersettings{'CHILDREN'}\n\n";
|
||||
} else {
|
||||
print FILE "url_rewrite_children $updaccelsettings{'CHILDREN'}\n\n";
|
||||
print FILE "url_rewrite_children $xlratorsettings{'CHILDREN'}\n\n";
|
||||
}
|
||||
} else
|
||||
{
|
||||
if ($urlfilter_addon) {
|
||||
if ($proxysettings{'ENABLE_FILTER'} eq 'on')
|
||||
{
|
||||
print FILE <<END
|
||||
|
||||
if ($proxysettings{'ENABLE_FILTER'} eq 'on')
|
||||
{
|
||||
print FILE <<END
|
||||
url_rewrite_program /usr/bin/squidGuard
|
||||
url_rewrite_children $filtersettings{'CHILDREN'}
|
||||
|
||||
END
|
||||
;
|
||||
}
|
||||
;
|
||||
}
|
||||
if ($updaccel_addon) {
|
||||
if ($proxysettings{'ENABLE_UPDXLRATOR'} eq 'on')
|
||||
{
|
||||
print FILE <<END
|
||||
if ($proxysettings{'ENABLE_UPDXLRATOR'} eq 'on')
|
||||
{
|
||||
print FILE <<END
|
||||
url_rewrite_program /usr/sbin/updxlrator
|
||||
url_rewrite_children $updaccelsettings{'CHILDREN'}
|
||||
url_rewrite_children $xlratorsettings{'CHILDREN'}
|
||||
|
||||
END
|
||||
;
|
||||
}
|
||||
;
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
use strict;
|
||||
|
||||
# enable only the following on debugging purpose
|
||||
#use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
use warnings;
|
||||
use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
use IO::Socket;
|
||||
|
||||
@@ -21,9 +21,6 @@ require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
|
||||
my $updxlratorversion = `cat ${General::swroot}/updatexlrator/version`;
|
||||
my $sysupdflagfile = "${General::swroot}/updatexlrator/.up2date";
|
||||
|
||||
my %checked=();
|
||||
my %selected=();
|
||||
my %netsettings=();
|
||||
@@ -60,8 +57,6 @@ my $chk_cron_dly = "${General::swroot}/updatexlrator/autocheck/cron.daily";
|
||||
my $chk_cron_wly = "${General::swroot}/updatexlrator/autocheck/cron.weekly";
|
||||
my $chk_cron_mly = "${General::swroot}/updatexlrator/autocheck/cron.monthly";
|
||||
|
||||
my $latest=substr(&check4updates,0,length($updxlratorversion));
|
||||
|
||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
|
||||
@@ -236,18 +231,6 @@ if ($errormessage) {
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
if (($updxlratorversion lt $latest) && (-e $sysupdflagfile)) { unlink($sysupdflagfile); }
|
||||
|
||||
if (!-e $sysupdflagfile) {
|
||||
&Header::openbox('100%', 'left', $Lang::tr{'updxlrtr update notification'});
|
||||
print "<table width='100%' cellpadding='5'>\n";
|
||||
print "<tr>\n";
|
||||
print "<td bgcolor='$hintcolour' class='base'>$Lang::tr{'updxlrtr update information'}</td>";
|
||||
print "</tr>\n";
|
||||
print "</table>\n";
|
||||
&Header::closebox();
|
||||
}
|
||||
|
||||
print "<form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'>\n";
|
||||
|
||||
&Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr update accelerator'}");
|
||||
@@ -340,7 +323,7 @@ print <<END
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td align='right'>
|
||||
<sup><small><a href='http://www.advproxy.net/update-accelerator/' target='_blank'>Update Accelerator $updxlratorversion</a></small></sup>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -621,35 +604,6 @@ print "</table>\n";
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
sub check4updates
|
||||
{
|
||||
if ((-e "${General::swroot}/red/active") && (-e $sysupdflagfile) && (int(-M $sysupdflagfile) > 7))
|
||||
{
|
||||
my @response=();;
|
||||
|
||||
my $remote = IO::Socket::INET->new(
|
||||
PeerHost => 'www.advproxy.net',
|
||||
PeerPort => 'http(80)',
|
||||
Timeout => 1
|
||||
);
|
||||
|
||||
if ($remote)
|
||||
{
|
||||
print $remote "GET http://www.advproxy.net/update-accelerator/version/ipcop/latest HTTP/1.0\n";
|
||||
print $remote "User-Agent: Mozilla/4.0 (compatible; IPCop $General::version; $Lang::language; updatexlrator)\n\n";
|
||||
while (<$remote>) { push(@response,$_); }
|
||||
close $remote;
|
||||
if ($response[0] =~ /^HTTP\/\d+\.\d+\s200\sOK\s*$/)
|
||||
{
|
||||
system("touch $sysupdflagfile");
|
||||
return "$response[$#response]";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
sub savesettings
|
||||
{
|
||||
if (-e $chk_cron_dly) { unlink($chk_cron_dly); }
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
'HDD temperature' => 'HDD-Temperatur',
|
||||
'Local VPN IP' => 'Internes Netzwerk (GREEN)',
|
||||
'MTU' => 'MTU Size',
|
||||
'Number of IPs for the pie chart' => 'Anzahl der angezeigten IPs im Diagramm',
|
||||
'Number of Ports for the pie chart' => 'Anzahl der angezeigten Ports im Diagramm',
|
||||
'OpenVPN' => 'OpenVPN',
|
||||
'Ping' => 'Ping ',
|
||||
'Remote IP' => 'Entfernte IP / Hostname (DynDNS)',
|
||||
@@ -234,6 +236,8 @@
|
||||
'advproxy no clients defined' => 'Keine Clients definiert',
|
||||
'advproxy no connection auth' => 'Keine verbindungsorientierte Authentifizierungsweiterleitung',
|
||||
'advproxy no cre groups' => 'Es sind keine Zugriffsgruppen verfügbar',
|
||||
'advproxy no internal proxy on blue' => ' Deaktiviere internen Proxy von Blue in andere Subnetze',
|
||||
'advproxy no internal proxy on green' => 'Deaktiviere internen Proxy nach Green aus anderen Subnetzen',
|
||||
'advproxy number of L1 dirs' => 'Anzahl der Level-1 Unterverzeichnisse',
|
||||
'advproxy offline mode' => 'Aktiviere Offline-Modus',
|
||||
'advproxy privacy' => 'Datenschutz',
|
||||
@@ -1347,6 +1351,7 @@
|
||||
'unknown' => 'Unbekannt',
|
||||
'unnamed' => 'Unbenannt',
|
||||
'update' => 'Aktualisieren',
|
||||
'update accelerator' => 'Update-Booster',
|
||||
'update time' => 'Aktualisiere die Uhrzeit:',
|
||||
'update transcript' => 'Aktualisieren',
|
||||
'updatedatabase' => 'Datenbank auf Stand der letzten Reports setzen',
|
||||
@@ -1416,6 +1421,7 @@
|
||||
'upstream proxy host:port' => 'Vorgelagerter Proxy (hostname:port)',
|
||||
'upstream username' => 'Proxy-Benutzername:',
|
||||
'uptime and users' => 'Uptime und Benutzer:',
|
||||
'url filter' => 'URL-Filter',
|
||||
'urlfilter access' => 'Zugriff',
|
||||
'urlfilter activity detection' => 'Aktivitätserkennung',
|
||||
'urlfilter add new time constraint rule' => 'Neue Zeitbeschränkungsregel hinzufügen',
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
'HDD temperature' => 'HDD temperature',
|
||||
'Local VPN IP' => 'Internal Network (GREEN):',
|
||||
'MTU' => 'MTU Size:',
|
||||
'Number of IPs for the pie chart' => 'Number of IPs for the pie chart',
|
||||
'Number of Ports for the pie chart' => 'Number of ports for the pie chart',
|
||||
'OpenVPN' => 'OpenVPN',
|
||||
'Ping' => 'Ping :',
|
||||
'Remote IP' => 'Remote IP / Hostname (DynDNS):',
|
||||
@@ -234,6 +236,8 @@
|
||||
'advproxy no clients defined' => 'No clients defined',
|
||||
'advproxy no connection auth' => 'No connection oriented authentication forwarding',
|
||||
'advproxy no cre groups' => 'There are no access groups available',
|
||||
'advproxy no internal proxy on blue' => 'Disable internal proxy access from Blue to other subnets',
|
||||
'advproxy no internal proxy on green' => 'Disable internal proxy access to Green from other subnets',
|
||||
'advproxy number of L1 dirs' => 'Number of level-1 subdirectories',
|
||||
'advproxy offline mode' => 'Enable offline mode',
|
||||
'advproxy privacy' => 'Privacy',
|
||||
@@ -1367,6 +1371,7 @@
|
||||
'unknown' => 'UNKNOWN',
|
||||
'unnamed' => 'Unnamed',
|
||||
'update' => 'Update',
|
||||
'update accelerator' => 'update booster',
|
||||
'update time' => 'Update the time:',
|
||||
'update transcript' => 'Update transcript',
|
||||
'updatedatabase' => 'Update Database with last Report',
|
||||
@@ -1437,6 +1442,7 @@
|
||||
'upstream proxy host:port' => 'Upstream proxy (host:port)',
|
||||
'upstream username' => 'Upstream username:',
|
||||
'uptime and users' => 'Uptime and users:',
|
||||
'url filter' => 'content filter',
|
||||
'urlfilter access' => 'Access',
|
||||
'urlfilter activity detection' => 'Activity detection',
|
||||
'urlfilter add new time constraint rule' => 'Add new time constraint rule',
|
||||
|
||||
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
|
||||
if (strcmp(argv[1], "generatepolicy")==0)
|
||||
{
|
||||
printf("\nGenerating Policy File");
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/twadmin --generate-polfile --site-keyfile /var/ipfire/tripwire/site.key --site-passphrase %s --polfile /var/ipfire/tripwire/tw.pol --cfgfile /var/ipfire/tripwire/tw.cfg /var/ipfire/tripwire/twpol.txt", argv[2]);
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/twadmin --create-polfile --site-keyfile /var/ipfire/tripwire/site.key --site-passphrase %s --polfile /var/ipfire/tripwire/tw.pol --cfgfile /var/ipfire/tripwire/tw.cfg /var/ipfire/tripwire/twpol.txt", argv[2]);
|
||||
safe_system(command);
|
||||
printf("\nInitialising - This may take a while depending on your Policy");
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/tripwire --init -c /var/ipfire/tripwire/tw.cfg -p /var/ipfire/tripwire/tw.cfg --local-passphrase %s", argv[3]);
|
||||
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
|
||||
if (strcmp(argv[1], "resetpolicy")==0)
|
||||
{
|
||||
printf("\nGenerating Policy File");
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/twadmin --generate-polfile --site-keyfile /var/ipfire/tripwire/site.key --site-passphrase %s --polfile /var/ipfire/tripwire/tw.pol --cfgfile /var/ipfire/tripwire/tw.cfg /var/ipfire/tripwire/twpol.default", argv[2]);
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/twadmin --create-polfile --site-keyfile /var/ipfire/tripwire/site.key --site-passphrase %s --polfile /var/ipfire/tripwire/tw.pol --cfgfile /var/ipfire/tripwire/tw.cfg /var/ipfire/tripwire/twpol.default", argv[2]);
|
||||
safe_system(command);
|
||||
printf("\nInitialising - This may take a while depending on your Policy");
|
||||
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/tripwire --init -c /var/ipfire/tripwire/tw.cfg -p /var/ipfire/tripwire/tw.cfg --local-passphrase %s", argv[3]);
|
||||
|
||||
Reference in New Issue
Block a user