[squid-users] how to filter urls with the external_acl_type option?

From: Zael Rey <zaelrey_at_gmail.com>
Date: Tue, 19 Jul 2011 12:57:27 -0700

Hello there I',m working in a script to filter with squid using:

external_acl_type myAclType %SRC %URI
/home/konrad/testing/myexternalacltype.pl
acl MyAcl external myAclType
http_access allow MyAcl

this is the script I have and for some reason its not working :

#!/usr/bin/perl -w
$|=1;
open(STDERR, ">/tmp/external_acl.log");
select(STDERR); $| = 1; # make unbuffered
select(STDOUT); $| = 1; # make unbuffered
print STDERR "INI: $$\n\n";;

use MIME::Base64 ();
while (<>) {
    print STDERR "<--- $_\n\n";;
    print "ERR\n";
}

Its supposed to block when it has ERR but it does not, it allows always
can you tell my whats wrong pls.

the log file is /tmp/external_acl.log
INI: 5101

192.168.100.131 http://clients1.google.com.mx/generate_204

owsing/downloads?client=googlechrome&appver=12.0.742.124&pver=2.2&wrkey=AKEgNiuxyrXd6Ogn0--yqQphNRgBvtmHMJ6qOaSuWkcLGp37Xr7Q8yn8PC7E_P6KDikrGokHnnvHaS-39wHdVm6e1rt8ApQWSw==

192.168.100.131
http://safebrowsing-cache.google.com/safebrowsing/rd/ChVnb29nLWJhZGJpbi1kaWdlc3R2YXIQABjlCCDmCCoFZgQAAAEyBWUEAAAB

192.168.100.131
http://safebrowsing-cache.google.com/safebrowsing/rd/ChVnb29nLWJhZGJpbnVybC1zaGF2YXIQARj9DiD-DioFfgcAAAEyBX0HAAAB

192.168.100.131
http://safebrowsing-cache.google.com/safebrowsing/rd/ChVnb29nLWJhZGJpbnVybC1zaGF2YXIQABj4DCD8DCoFegYAAAcyBXgGAAAD

192.168.100.131
http://safebrowsing-cache.google.com/safebrowsing/rd/ChNnb29nLW1hbHdhcmUtc2hhdmFyEAEY-7QDIIS1AyoFftoAAH8yBXvaAAAH
.
.
.

and the log file cache.log
.
.
.

2011/07/19 11:42:32| cbdataValid: 0xb9448558
2011/07/19 11:42:32| helperHandleRead: 4 bytes from myAclType #1.
2011/07/19 11:42:32| commSetSelect: FD 7 type 1
2011/07/19 11:42:32| commSetEvents(fd=7)
2011/07/19 11:42:32| helperHandleRead: 'ERR
'
2011/07/19 11:42:32| helperHandleRead: end of reply found: ERR

2011/07/19 11:42:32| cbdataValid: 0xb970b4b0
2011/07/19 11:42:32| externalAclHandleReply: reply="ERR"
2011/07/19 11:42:32| cbdataValid: 0xb94309a0
2011/07/19 11:42:32| external_acl_cache_add: Adding '192.168.100.131
http://www.google.com.mx/csi?v=3&s=webhp&action=&e=17259,18168,28505,29819,30316,30727,30813,31406,31482,31493,31643&ei=KNAlTvu0MpCEtgfww9mPDA&expi=17259,18168,28505,29819,30316,30727,30813,31406,31482,31493,31643&imc=0&imn=0&imp=0&rt=xjsls.84,prt.88,xjses.134,xjsee.255,xjs.258,ol.506,iml.88'
= 0
2011/07/19 11:42:32| cbdataUnlock: 0xb94309a0
2011/07/19 11:42:32| cbdataValid: 0xb970b358
2011/07/19 11:42:32| cbdataLock: 0xb9771af8
2011/07/19 11:42:32| cbdataValid: 0xb94307e0
2011/07/19 11:42:32| aclCheck: checking 'http_access deny MyAcl'
2011/07/19 11:42:32| aclMatchAclList: checking MyAcl
2011/07/19 11:42:32| aclMatchAcl: checking 'acl M
.
.
.

Hope someone could lend me some help with this, thanks
Received on Tue Jul 19 2011 - 19:57:54 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 20 2011 - 12:00:03 MDT