]>
git.ipfire.org Git - people/trikolon/ipfire-2.x.git/blob - config/urlfilter/redirect_wrapper
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 # Based on Steffen Schoch (sschoch@users.sourceforge.net) #
22 ###############################################################################
28 # define here your redirectors (use a comma sperated list)
29 my $redirectors = [ '/usr/bin/squidGuard', '/usr/sbin/updxlrator' ];
31 # Attention: keep in mind that the order of your redirectors is important.
32 # It doesn't make sense to scan for viruses on pages you restrict access to...
33 # So place first your tools which restrict access, then the tools which do the
37 ##### no need to change anything below this line #####
50 for($i = 0; $i < @
$redirectors; $i++) {
51 $pidlist->[$i] = open2
($rlist->[$i], $wlist->[$i], $redirectors->[$i]);
56 for($i = 0; $i < @
$redirectors; $i++) {
57 $wlist->[$i]->print($line);
58 $return = $rlist->[$i]->getline;
59 last if($return ne "\n" and $return ne $line);
60 # break if redirector changes data