Squid is an open source package available at http://www.squid-cache.org that caches web files to a local server, increasing throughput for users and decreasing the amount of traffic on WAN connections. A Mac OS X software package named SquidMan, which includes Squid is available at http://web.me.com/adg/squidman/index.html. SquidMan makes installing and using Squid much easier, giving nice buttons to use for management rather than managing Squid using configuration files.
Once SquidMan is downloaded, copy the SquidMan application bundle to the /Applications directory. Then open it. At the Helper Tool Installation screen click on the Yes button.
At the Squid Missing screen click on the OK button to install squid itself.
The Preferences screen then opens. Click on the Clients tab and, if you would like to restrict access to only a set of IP addresses, define them (or use the net mask to define a range).
Click on the General tab. Here, provide the following information:
- HTTP Port: The port number that the proxy will run on.
- Visible hostname: The hostname of the server (e.g. proxy.318.com).
- Cache size: The total amount of space used for the proxies cache.
- Maximum object size: The maximum size of single cached files.
- Rotate logs: The frequency with which log files are rotated (I usually use Manually here).
- Start Squid on launch: Automatically start squid when SquidMan is launched, and delay start by x number of seconds.
- Quid Squid on logout: Define whether logging out of the server also stops squid.
- Show errors produced by Squid: Displays squid’s errors in SquidMan.
Click on the Parent and define a proxy server that this one will use (if there is one, otherwise it just uses the web to directly access files). This feature is only used if you are daisy chaining multiple squid servers.
Click on the Direct tab and enter any sites that should not be proxied. Internal staging environments are a great example of sites that should bypass proxy servers.
At the Template tab, enter any custom variables.
Squid is usually used to cache and speed up web access, so the default configuration file is optimized for small files. In order to cache larger files effectively, change the configuration to allow for larger files (up to 64 megabytes) and allow for more total disk storage of cached files (up to 8 gigabytes in our tests for a few specific projects, but much larger is fine). This usually depends on the total available disk space on the machine which will run squid.
These are some of the options which we updated for a specific project we’re working on in the squid.conf (Template):
http_port 3128 transparent (add transparent if using NAT to redirect http requests):
maximum_object_size_in_memory 65536 KB
cache_dir ufs /usr/local/var/squid/cache 8192 16 256
maximum_object_size 65536 KB
These days, we prefer to use squid running in NetBSD’s pkgsrc, although any method of installation (such as the squidman approach) should be acceptable.
Next, click on the SquidMan application which should have been running the whole time and click Start Squid.
The squid daemon then starts. Looking at the processes running on the host reveals that it is run as follows:
/usr/local/squid/sbin/squid -f /Users/admin/Library/Preferences/squid.conf
Client systems can then be configured to use the squid proxy, or PAC (Proxy auto-config) file can be configured to configure clients. Another option being transparent parodying:
rdr de0 0.0.0.0/0 port 80 -> (local Squid server) port 3128 tcp



