Sunday, November 11, 2012

[LINUX_Newbies] Re: Squid

 

On 25Oct2012 09:20, Anuranga <anuranga@nlfplc.com> wrote:
| I already have the relevant Kapersky update files in a folder
| i want to serve them. all my PCs set up to use squid.
| yep, all update request show up in access log.
|
| GET http://dnl-09.geo.kaspersky.com/index/6/u0607g.xml.klz

Sorry for the very slow reply.

You want to write a small redirector for squid.
See these URLs:

http://wiki.squid-cache.org/Features/Redirectors
http://www.squid-cache.org/Doc/config/url_rewrite_program/

The former URL includes some simple example perl scripts.
A redirector reads URLs (actually a simple line containing a URL and a
few other fields) and returns modified URLs if needed. Squid then
fetches the modified URL instead of the requested URL.

The important thing with the redirector (aside from simple stuff like
just doing the right thing) is to always flush the output after writing
the response line (that is what the "$|=1" in the example perl scripts
arranges).

I would augument your redirector to actually check that the requisite
file exists in your private store of update files. If it does, issue the
redirect. If not, issue the "no change" response and log the missing
file so you can fetch missing updates as they are found.

Cheers,
--
Cameron Simpson <cs@zip.com.au>

Here was a man who not only had a ready mind and a quick wit,
but could also sing. - _Rope_

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)
Recent Activity:
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.
.

__,_._,___

No comments:

Post a Comment