Article delegate-en/454 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A447@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: A functionnality of delegate ?
19 May 1999 07:15:15 GMT ysato@etl.go.jp (Yutaka Sato)


On 05/18/99(00:36) you "Techadmin" <px4aqbdyi-e6yerofurylr.ml@ml.delegate.org> wrote
in <_A447@delegate-en.ML_>
 |I'd like to make a http proxy which filters out URLs by reading the HTML files, per example, which
 |deny acces to all html files which contains the word "warez".
 |Does Delegate support this kind of filtering ?

A naive filtering based on contents of transferred data can be
achieved with "CFI script" like this:

delegated -P8080 FTOCL=/path/of/ftocl.cfi

[The content of /path/of/ftocl.cfi]
#!/bin/sh
Content-Type: text/html
Filter: 
 TMP=/tmp/dg-cfi.$$;
 cat > $TMP;
 grep -l "People" $TMP > /dev/null;
 if [ $? = 0 ]; then 
  echo "HTTP/1.0 403";
 else
  cat $TMP;
 fi;
 rm $TMP

But note that this filtering mechanism is very inefficient to be
used for heavily loaded DeleGates.

Cheers,
Yutaka
--
Yutaka Sato <ysato@etl.go.jp> http://www.etl.go.jp/~ysato/   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V