From 488d1b7c88f57f1848d917c8b2815e990edd3c89 Mon Sep 17 00:00:00 2001 From: Maniacikarus Date: Thu, 30 Oct 2008 19:19:55 +0100 Subject: [PATCH] Upgraded squidclamav to current stable Added cache_dir null support for squid Upgraded proxy to advproxy 3.0 --- html/cgi-bin/proxy.cgi | 378 ++++++++++++++++++++++++++++++----------- lfs/squid | 2 +- lfs/squidclamav | 6 +- 3 files changed, 286 insertions(+), 100 deletions(-) diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index e349dfd14..c6410da28 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2008 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -18,6 +18,13 @@ # along with this program. If not, see . # # # ############################################################################### +# +# (c) 2004-2008 marco.s - http://www.advproxy.net +# +# This code is distributed under the terms of the GPL +# +# $Id: advproxy.cgi,v 3.0.0 2008/08/18 00:00:00 marco.s Exp $ +# use strict; @@ -112,8 +119,14 @@ my $acl_src_unrestricted_ip = "$acldir/src_unrestricted_ip.acl"; my $acl_src_unrestricted_mac = "$acldir/src_unrestricted_mac.acl"; my $acl_src_noaccess_ip = "$acldir/src_noaccess_ip.acl"; my $acl_src_noaccess_mac = "$acldir/src_noaccess_mac.acl"; -my $acl_dst_nocache = "$acldir/dst_nocache.acl"; my $acl_dst_noauth = "$acldir/dst_noauth.acl"; +my $acl_dst_noauth_dom = "$acldir/dst_noauth_dom.acl"; +my $acl_dst_noauth_net = "$acldir/dst_noauth_net.acl"; +my $acl_dst_noauth_url = "$acldir/dst_noauth_url.acl"; +my $acl_dst_nocache = "$acldir/dst_nocache.acl"; +my $acl_dst_nocache_dom = "$acldir/dst_nocache_dom.acl"; +my $acl_dst_nocache_net = "$acldir/dst_nocache_net.acl"; +my $acl_dst_nocache_url = "$acldir/dst_nocache_url.acl"; my $acl_dst_throttle = "$acldir/dst_throttle.acl"; my $acl_ports_safe = "$acldir/ports_safe.acl"; my $acl_ports_ssl = "$acldir/ports_ssl.acl"; @@ -144,8 +157,14 @@ unless (-e $acl_src_unrestricted_ip) { system("touch $acl_src_unrestricted_ip") unless (-e $acl_src_unrestricted_mac) { system("touch $acl_src_unrestricted_mac"); } unless (-e $acl_src_noaccess_ip) { system("touch $acl_src_noaccess_ip"); } unless (-e $acl_src_noaccess_mac) { system("touch $acl_src_noaccess_mac"); } -unless (-e $acl_dst_nocache) { system("touch $acl_dst_nocache"); } -unless (-e $acl_dst_noauth) { system("touch $acl_dst_noauth"); } +unless (-e $acl_dst_noauth) { system("touch $acl_dst_noauth"); } +unless (-e $acl_dst_noauth_dom) { system("touch $acl_dst_noauth_dom"); } +unless (-e $acl_dst_noauth_net) { system("touch $acl_dst_noauth_net"); } +unless (-e $acl_dst_noauth_url) { system("touch $acl_dst_noauth_url"); } +unless (-e $acl_dst_nocache) { system("touch $acl_dst_nocache"); } +unless (-e $acl_dst_nocache_dom) { system("touch $acl_dst_nocache_dom"); } +unless (-e $acl_dst_nocache_net) { system("touch $acl_dst_nocache_net"); } +unless (-e $acl_dst_nocache_url) { system("touch $acl_dst_nocache_url"); } unless (-e $acl_dst_throttle) { system("touch $acl_dst_throttle"); } unless (-e $acl_ports_safe) { system("touch $acl_ports_safe"); } unless (-e $acl_ports_ssl) { system("touch $acl_ports_ssl"); } @@ -329,8 +348,11 @@ if (($proxysettings{'ACTION'} eq $Lang::tr{'save'}) || ($proxysettings{'ACTION'} if (!($proxysettings{'CACHE_SIZE'} =~ /^\d+/) || ($proxysettings{'CACHE_SIZE'} < 10)) { - $errormessage = $Lang::tr{'advproxy errmsg hdd cache size'}; - goto ERROR; + if (!($proxysettings{'CACHE_SIZE'} eq '0')) + { + $errormessage = $Lang::tr{'advproxy errmsg hdd cache size'}; + goto ERROR; + } } if (!($proxysettings{'CACHE_MEM'} =~ /^\d+/) || ($proxysettings{'CACHE_MEM'} < 1)) @@ -503,6 +525,10 @@ if (($proxysettings{'ACTION'} eq $Lang::tr{'save'}) || ($proxysettings{'ACTION'} $errormessage = $Lang::tr{'advproxy errmsg invalid bdc'}; goto ERROR; } + + $proxysettings{'NTLM_DOMAIN'} = lc($proxysettings{'NTLM_DOMAIN'}); + $proxysettings{'NTLM_PDC'} = lc($proxysettings{'NTLM_PDC'}); + $proxysettings{'NTLM_BDC'} = lc($proxysettings{'NTLM_BDC'}); } if ($proxysettings{'AUTH_METHOD'} eq 'radius') { @@ -588,6 +614,9 @@ ERROR: if (-e "${General::swroot}/proxy/settings") { &General::readhash("${General::swroot}/proxy/settings", \%stdproxysettings); } $stdproxysettings{'PROXY_PORT'} = $proxysettings{'PROXY_PORT'}; + $stdproxysettings{'UPSTREAM_PROXY'} = $proxysettings{'UPSTREAM_PROXY'}; + $stdproxysettings{'UPSTREAM_USER'} = $proxysettings{'UPSTREAM_USER'}; + $stdproxysettings{'UPSTREAM_PASSWORD'} = $proxysettings{'UPSTREAM_PASSWORD'}; $stdproxysettings{'ENABLE_FILTER'} = $proxysettings{'ENABLE_FILTER'}; $stdproxysettings{'ENABLE_UPDXLRATOR'} = $proxysettings{'ENABLE_UPDXLRATOR'}; $stdproxysettings{'ENABLE_CLAMAV'} = $proxysettings{'ENABLE_CLAMAV'}; @@ -953,19 +982,28 @@ print <$Lang::tr{'advproxy upstream proxy'} - $Lang::tr{'advproxy via forwarding'}: - $Lang::tr{'advproxy upstream proxy host:port'}* + $Lang::tr{'advproxy via forwarding'}: + + $Lang::tr{'advproxy upstream proxy host:port'} * + - $Lang::tr{'advproxy client IP forwarding'}: - $Lang::tr{'advproxy upstream username'}* + $Lang::tr{'advproxy client IP forwarding'}: + + $Lang::tr{'advproxy upstream username'}: * + - $Lang::tr{'advproxy username forwarding'}: - $Lang::tr{'advproxy upstream password'}:* + $Lang::tr{'advproxy username forwarding'}: + + $Lang::tr{'advproxy upstream password'}: * + - $Lang::tr{'advproxy no connection auth'}: + $Lang::tr{'advproxy no connection auth'}: + +   +  
@@ -974,9 +1012,16 @@ print <$Lang::tr{'advproxy log settings'} - $Lang::tr{'advproxy log enabled'}: - $Lang::tr{'advproxy log query'}: - $Lang::tr{'advproxy log useragent'}: + $Lang::tr{'advproxy log enabled'}: + + $Lang::tr{'advproxy log query'}: + + + +   +   + $Lang::tr{'advproxy log useragent'}: +
@@ -985,7 +1030,7 @@ print <$Lang::tr{'advproxy cache management'} - + $Lang::tr{'advproxy ram cache size'}: @@ -1023,7 +1068,7 @@ print < -