« Yeah, I'm Rated | Main | Classic Funny »

December 22, 2005

Squid Annoyances

After having to deal with Doubleclick annoyances for more than a few years I have had enough. The cookies, the ads, it all had to stop! I had tried AdBlocker for Firefox, but for some reason it kept blocking some Flash movies that I didn't want blocked, what other alternative did I have? There are these pieces of software called proxy servers that can be used for any number of reasons, some legitimate, some not. I did some hunting around and found a port of Squid for Windows [acmeconsulting.it].

I installed it and after some headache I was able to get it to run. The first problem I ran into was an abnormal program termination that killed the process without any other error messages, even with full debug turned on. I did some playing around and just for giggles I tried passing in the -D switch. This switch tells Squid to not perform initial DNS testing and you know what? That did the trick. Super, so now I just needed to tell the Squid not to do any initial DNS testing in the config file and everything would be dandy, I could load it as a Windows service, money would fall from the sky, women would through themselves at me , well you get the idea.

No such luck. You can't turn it off in the config file, but what you can do is give alternative hosts to resolve. I gave it localhost and everything is working just dandy now. But the adventure doesn't stop there, no that would be too easy. When content is blocked an error page is displayed in it's place, which is better than the advertisements I was looking to block, but still made the pages I was looking at ugly.

Now, there is a mechanism in Squid to set your very own error page, but what they don't really tell you is that whatever error page you create Squid will tack some more stuff onto it. What I had wanted was a black spot where advertisements normally go and now I have what I consider an advertisements for Squid instead, I was not a happy camper. There must be a way to make the pages appear blank I said to myself. CSS, yeah, CSS is always the answer! Just put some CSS styling into the head and voila!, blank pages. This is what my error page ('ERR_BLANK') looks like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <style type="text/css"><!-- address { display:none; } hr { display:none; } --></style> </HEAD><BODY>

Posted by Guy at December 22, 2005 9:39 AM