[dundee] Squid Update Accelerator
Robert Ladyman
it at file-away.co.uk
Fri Mar 29 09:57:34 UTC 2013
To those of you (Roddy and Andy, I think) to whom I was wittering about this,
here is the link:
http://update-accelerator.advproxy.net/
It says it needs 'ipcop 1.4.x' (see the FAQ section), but if you read the
installation script you can see that this is only because files are in
specific locations and need to be maniputlated for IPCOP - in reality, all the
work is done by /usr/sbin/updxlrator with an entry in squid.conf of:
redirect_program /usr/sbin/updxlrator
redirect_children 5
updxlrator uses regexs (mostly) to check the urls and then places matching
files into the relevant location. It handles mirrors as well (VERY handy for
OpenSuse and probably for other distros).
For example (it doesn't wrap well!):-
# -----------------------------------------------------------
# Section: Windows Update / Windows Downloads
# -----------------------------------------------------------
if (
(($source_url =~ m@^http://[^/]*\.microsoft\.com/.*\.(exe|psf|msi|msp|msu|
dmg|cab)$@i) ||
($source_url =~ m@^http://[^/]*\.windowsupdate\.com/.*\.(exe|psf|msi|msp|
msu|dmg|cab)$@i))
&& ($source_url !~ m@^http://[^/]*\.microsoft\.com/.*(/autoupd|
selfupdate/).*\.cab at i)
&& ($source_url !~ m@\&@)
)
{
$xlrator_url = &check_cache($source_url,$hostaddr,$username,"Microsoft",
$unique);
}
This one shows mirror usage...
# -----------------------------------------------------------
# Section: Linux Downloads
# -----------------------------------------------------------
if ($source_url =~ m@^[h|f]t?tp://[^?]+\.(deb|rpm|gz)$@i)
{
$xlrator_url = &check_cache($source_url,$hostaddr,$username,"Linux",$mirror);
}
--
Robert Ladyman
File-Away Limited
3 Ralston Business Centre, Newtyle, Blairgowrie
Perthshire PH12 8TL SCOTLAND
Tel: +44 (0) 1828 898 158
Mobile: +44 (0) 7732 771 649
http://www.file-away.co.uk
============================================
Registered Office: 30 Church Street, Newtyle, Blairgowrie
Perthshire, PH12 8TZ SCOTLAND
Registered in Scotland, Company Number SC222086
More information about the dundee
mailing list