[squid-users] i want to block images with size more than 40 KB

snakeeyes ahmed.zaeem at netstream.ps
Thu Mar 19 00:35:28 UTC 2015


Thank you so much  Amos and leonardo
Can you provide me any sample config to start with ?
I feel it so difficult to me .
I had a look @ ""ACL elements"" section in thw wiki about matching size of image but didn’t find clear thing.
So again I feel that I will create access list that match size > than 50 Byte and with mime type like jpg or bmp and then deny it.

Could you help me with startup config plz ?

-----Original Message-----
From: squid-users [mailto:squid-users-bounces at lists.squid-cache.org] On Behalf Of Leonardo Rodrigues
Sent: Wednesday, March 18, 2015 7:32 AM
To: squid-users at lists.squid-cache.org
Subject: Re: [squid-users] i want to block images with size more than 40 KB

On 18/03/15 08:06, Amos Jeffries wrote:
> On 19/03/2015 5:57 a.m., snakeeyes wrote:
>> I need help in blocking images that has size less than 40 KB
>>
>>   
> Use the Squid provided access controls to manage access to things.
> <http://wiki.squid-cache.org/SquidFaq/SquidAcl>
>

     You should know that you cannot evaluate the response size using only the request data. So to acchieve what you want, data from the reply must be considered as well, the response size for example.

     Images can be identified by the presence of '.jpg' or '.png' on the request URL, but images can be generated on-the-fly by scripts as well, so you wont see those extensions all the time. In that case, analyzing replies mime headers can be usefull as well, the reply mime type having 'image' is a great indication that we're receiving an image.

     Put all that together and you'll acchieve the rules you want to. 
But keep in mind that you'll probably break A LOT of sites who 'slices' 
images, background images, menus and all sort of things. I would call that a VERY bad idea, but can be acchieved with a few rules.



-- 


	Atenciosamente / Sincerily,
	Leonardo Rodrigues
	Solutti Tecnologia
	http://www.solutti.com.br

	Minha armadilha de SPAM, NÃO mandem email
	gertrudes at solutti.com.br
	My SPAMTRAP, do not email it



_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users



More information about the squid-users mailing list