squid redirectos (was Re: [plug] Cookies)

Anthony J. Breeds-Taurima tony at cantech.net.au
Thu Nov 30 15:05:54 WST 2000


On Thu, 30 Nov 2000 billk at iinet.net.au wrote:

> Also, on a close topic (defeating tracking), does anyone have a reference
> on how to get squid to serve up a graphic of my choice and not doubleclick
> adds.  Sites are adding script to thier pages to check that the add is
> fetched before working fully, and I have seen it defeated by squid sending
> some inoculous local graphic instead.

create the graphic of your choice.

In my example I created a 1 pixel tranparent gif.
place the image on an http server.

then write a perl script called zipit (or any other name you like)

--
#!/usr/bin/perl

$|=1;
while (<>) {
	s|http://.*doubleclick.,*? |http://www.you.we.server/image.gif |;
	print;
}
--

This should point any request any an item on doubleclick to your image.


Once you've written (and tested) the script
add a couple of lines (or uncomment them) to squid.conf

redirector_program /path/to/zapit.pl
redirector_children 5

then run squid -k reconfigure  and you should never see those pesky ads
again.

Now having sid that .... All of the above is from memory and is the code is
untested.  you'll want to read http://www.squid-cache.org/Doc/FAQ/FAQ-15.html
to get the low down ...

Yours Tony.

/*
 * "The significant problems we face cannot be solved at the
 * same level of thinking we were at when we created them."
 * --Albert Einstein
 */




More information about the plug mailing list