Be faster using squid

There are so many ways to get faster on surfing or browsing.One of them is by using cache-proxy, here I used Squid 2.7.STABLE5.

What is cache proxy? Well, it will be useful to catch sites that you visit often. With squid, all of that saved in to the computer. So if you access the same content/ sites, it will be opened fastly, because the sites is just from your computer. If there is something new, they will download it into your computer. Just the new, not all of the content.
OK, how to installed? Here we go :
  1. Download Squid Proxy 2.7 Stable5 for Windows
  2. Extract file, and put the folder to the nice place, for example “C:\squid\ [wherever, up to you]
  3. Enter to the folder “C:\squid\etc\“. There are some squid’s files :
- cachemgr.conf.default
- mime.conf.default
- squid.conf.default
- squid_radius_auth.conf.default

rename all of the files, by removing the -default“. So, they will be seemed like this:
- cachemgr.conf
- mime.conf
- squid.conf
- squid_radius_auth.conf

  1. Open “squid.conf” with yiur fave editor (EditPlus, Ultra Edit, Notepad ++, or else).
  2. Do a search (CTRL+F) “TAG: http_port“, check below this line “# Squid normally listens to port 3128” If the next line is “http_port 3128” skip this step. But if there is no line “http_port 3128”, add it. The file looks like  this :
# TAG: http_port
# Usage: port [options]
# hostname:port [options]
# 1.2.3.4:port [options]
# If you run Squid on a dual-homed machine with an internal
# and an external interface we recommend you to specify the
# internal address:port in http_port. This way Squid will only be
# visible on the internal address.
#
# Squid normally listens to port 3128
http_port 3128

  1. Do a search (CTRL+F) “TAG: visible_hostname“, make sure there is “visible_hostname localhost” line after ‘# none’ line.
# TAG: visible_hostname
# If you want to present a special hostname in error messages, etc,
# define this. Otherwise, the return value of gethostname()
# will be used. If you have multiple caches in a cluster and
# get errors about IP-forwarding you must set them to have individual
# names with this setting.
#
#Default:
# none
visible_hostname localhost

  1. Do a search (CTRL+F) “http_access allow localnet “, make sure the next line is “http_access allow localhost”.
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

  1. Find (CTRL+F) “TAG: dns_nameservers“, at line “dns_nameservers“, Fill out the line with your DNS you usual used, or your ISP’s DNS, with format “dns_nameservers [primary DNS] [secondary DNS]“. Example “dns_nameservers 208.67.220.220 208.67.222.222“.
# TAG: dns_nameservers
# Use this if you want to specify a list of DNS name servers
# (IP addresses) to use instead of those given in your
# /etc/resolv.conf file.
# On Windows platforms, if no value is specified here or in
# the /etc/resolv.conf file, the list of DNS name servers are
# taken from the Windows registry, both static and dynamic DHCP
# configurations are supported.
#
# Example: dns_nameservers 10.0.0.1 192.172.0.4
#
#Default:
# none
dns_nameservers 208.67.220.220 208.67.222.222

Save (CTRL+S)squid.conf”.
  1. Open “Command Prompt“, enter “squid” folder by command “cd C:\squid\sbin\“.
C:\>cd c:\squid\sbin\
C:\squid\sbin>
  1. type “squid -z“.
C:\squid\sbin>squid -z
2008/11/18 08:45:20| Creating Swap Directories

C:\squid\sbin>
  1. type “squid -d l -D“, then press combination key “CTRL+C“.
C:\squid\sbin>squid -d l -D
2008/11/18 08:46:17| Starting Squid Cache version 2.7.STABLE5 for i686-pc-winnt.
..
2008/11/18 08:46:17| Running on Windows XP

C:\squid\sbin>
  1. type “squid -i
C:\squid\sbin>squid -i
Registry stored HKLM\SOFTWARE\GNU\Squid\2.6\Squid\ConfigFile value c:/squid/etc/
squid.conf
Squid Cache version 2.7.STABLE5 for i686-pc-winnt
installed successfully as Squid Windows System Service.
To run, start it from the Services Applet of Control Panel.
Don’t forget to edit squid.conf before starting it.

C:\squid\sbin>
  1. [the last] type “squid -O -D
C:\squid\sbin>squid -O -D
Registry stored HKLM\SOFTWARE\GNU\Squid\2.6\Squid\CommandLine value -D

C:\squid\sbin>
  1. OK, to use the proxy, go to “Control Panel” -> “Administrative Tools” -> “Services“. Find  “squid” -> “Right click” -> “Start
  2. change your proxy to “localhost” port “3128“.
  3. Test it  guys :D


Note :
To remove squid, type this command in Command Prompt [Enter C:\squid\sbin first before type this command] “squid -r -n squid.
C:\squid\sbin>squid -r -n squid
Service squid deleted successfully.

That’s it! Good luck.