[squid-users] Writing a squid plugin

Antony Stone Antony.Stone at squid.open.source.it
Fri Feb 26 13:34:13 UTC 2016


On Friday 26 February 2016 at 12:52:46, Avraham Serour wrote:

> Hi,
> 
> I would like to write a plugin for squid, if it at all possible, I'm
> inspired by the idea of a squid prefetch package I saw once (and can't find
> the link again right now), the script was in perl and basically tail -f the
> quid log
> 
> I did something similar in python but I'm thinking it is not very efficient
> since I need to parse the log and request whatever my rule engine decides
> 
> I'm thinking it would be better to hook on the event that something was
> fetched and just tell squid to put something in the cache, I don't need to
> wait for the response.
> 
> does squid has some API for plugins? would I need to recompile squid by
> myself?

I would suggest creating an ICAP service, and getting Squid to pass responses 
to it (so you end up seeing the raw HTML and can parse out links and then send 
requests back in to Squid to fetch those links in advance of the browser which 
initiated the original request).

http://wiki.squid-cache.org/Features/ICAP


Antony.

-- 
Late in 1972 President Richard Nixon announced that the rate of increase of 
inflation was decreasing.   This was the first time a sitting president used a 
third derivative to advance his case for re-election.

 - Hugo Rossi, Notices of the American Mathematical Society

                                                   Please reply to the list;
                                                         please *don't* CC me.


More information about the squid-users mailing list