content filtering : programming advice needed

From: Magossa'nyi A'rpa'd <mag@dont-contact.us>
Date: Sat, 14 Jun 1997 12:37:08 +0100

Hi!

I want squid to enable flexible content filtering. I thought of some
possibility to call external filter program on retrieving a page, before
writing it to the cache or giving away to clients. I know you've talked on
it some times, and the consensus was that it is too computational intensive.
I consider it not beeing more computational intensive than cleaning up heaps
of client machines after retrieving a hostile ActiveX widget. And one more
configuration option doesn't hurt too much, IMHO.

I think I've found the point in the source where the hack could take place.
In protoStart I could pass a different fd for the *Start functions to write
the fetched url on, and could popen() the external program here. There are
some points although, which isn't clear, after spending some half an hour
reading the source:
- Is fd a unix file descriptor, or an index in an array of struct fde ?
        If the latter, how can I register a new fd? Is there a function for
that?
- AFAIK proxyhttpStart and httpStart doesn't have any argument resembling
to fd. What did I miss here?
- Is there any special requirements which must be fulfilled by the external
  filter program because of squid's event driven modell? Is ftp.c would be a
good example to create the necessary wrapping code, and if so, what would be
the differences?

Thank you for your answer.

---
GNU GPL: csak tiszta forrásból
Received on Sat Jun 14 1997 - 04:39:58 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:31 MST