Squid range_offset_limit mod progress

I haven’t posted for a while, so I thought I’d write about the progress in getting that range_offset_limit mod working for squid. I’d gotten it working as a pattern, but I was asked to instead implement it using squid’s acl system. This gives much finer grained control than simply a pattern, since it can match against other fields such as source address, destination address, time of day, etc.

It took me a bit to get the acl system, but I think I have it. The changes are compiling right now…aside from some errors about unused functions I had to clean up (squid uses -Werror), it has gone well so far.

So now the format of the option will be:

range_offset_limit (bytes) [[!]aclname]

I’ve devised a pretty cool system for testing different version of squid, too. In my squid init script, I subbed a few things with variables so I can comment out the ubuntu-supplied squid file locations and instead point to /usr/local/squid/. I set up /usr/local/squid as a symbolic link to /usr/local/squid-whatever-version. Each of those uses /var/spool/squid3 as their cache, so the version 3 squids can all pull from the same cache_dir. This makes sure our Windows updates are always cached, even when I’m switching versions of squid.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: