alexott / squid-gsb

Support for Google Safe Browsing API in Squid
http://alexott.net/en/cf/squid-gsbapi.html
GNU General Public License v2.0
8 stars 1 forks source link

Chaining Squid-GSB with other rewriters #8

Open pmjdebruijn opened 13 years ago

pmjdebruijn commented 13 years ago

I would want to chain Squid-GSB with other URL rewriters. Having Squid call a wrapper script which forks a pipeline of rewriters: for example:

gsb_redirector | squidguard | safesearch.pl

Currently gsb_redirector returns an empty like when everything is fine and dandy, but that prevents squidguard and safesearch.pl from doing their work.

Also moving gsb_redirector to the end of the pipeline isn't a great idea either, since gsb_redirector requires unmangled URLs to be able to detect the bad ones.

So ideally I would like an option in the configuration file where I can specifiy that gsb_redirector stdin==stdout for clean URLs.

pmjdebruijn commented 13 years ago

I just noticed that squidguard also outputs empty lines when receiving a valid nonblocked URL. So I guess it'll have to move that to the end of the pipeline.

Also note, that squidguard requires a full newstyle squid line. So when processing squid lines, the extra's do need to be output again (they can't be permanently chopped off).

pmjdebruijn commented 13 years ago

I think you fixed this already too?

alexott commented 13 years ago

Yes, it should be fixed, but I have no place where to check this - could you do this?