Nov 5, 2007

Squid - WWW Proxy Cache

Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator. It runs on Unix and Windows and is licensed under the GNU GPL.

You can download it Here
Or
sudo apt-get install squid

However, Cohomo has to edit "squid.conf" every time he starts Squid and then restart it since his IP is random. It is very complicated. So He wrote a script to replace the IP address in the row "/acl bb0 src" by the real IP.

#!/bin/bash
echo Please Type in your IP:
read myip
sudo sed -ie “/acl bb0 src */c\acl bb0 src $myip” /etc/squid/squid.conf
sudo /etc/init.d/squid restart

where "-i" means change "squid.conf" directly and "/c" means change the corresponding row.

Copy the above codes as a text, and set the permission as "Allow executing file as program". Once you want to run it, just double click this file and choose
"run in terminal".

0 Comments: