Posts tagged Squid

We use squid as proxy in our lab, which means, I have complete control on what junta in my lab view. Squid has a very lovely mechanism called url_rewrite_program. I usually, use it to get some control over what junta do on the LAN during office hours (like limit facebook access only to lunch time and after office hours)  - You should probably read about Squid, and SquidGuard to know more about this.

SquidGuard is plain awesomeness. So, I decided to emulate its logic ie., replace the URLs which I want to block for certain users with the URL I want to be presented. So, all I need is a program which replaces the required Logo with the Image I specify.

This is the code that does exactly the same.

Add a +x to that file, Add it to your squid.conf as `url_rewrite_program /path/to/program` and reload your Squid. End result would be something like … this. That’s all folks.

Page 1 of 1