[zorp] Stacking programs doesn’t work and how to modify POST parameters?

thomas.wenz at gmx-topmail.de thomas.wenz at gmx-topmail.de
Sun Jun 29 23:32:13 CEST 2008


Hi,

I installed zorp 3.1.14 (GPL) in Debian Etch a few days ago. It 
works fine and is a really great program but I’ve got 2 problems 
with the http-proxy-module Iwhich I just can't find a soluation.
Perhaps someone can help me, I don't know what to try further...

1.
I want to be able to block sites with specific contents and in
some cases modify the content.
But I can't stack a program on the request or response. I always get
an “Invalid Request” when I want to modify the request stack or an
“Invalid Response” when I want to modify the response stack.

I think this should normally work as there’s a test in
tests/functional/http/transfer/chunked-conversion.test in the
source package of Zorp. I used the following code from the
example there and it does not work:

class MyHttp(HttpProxy):        
        def config(self):
                HttpProxy.config(self)
                self.timeout_request=30000
                self.request_stack["GET"] = (HTTP_STK_DATA, "/bin/cat")
                self.response_stack["GET"] = (HTTP_STK_DATA, "/bin/cat")

The other possibility I found in a doc at
http://www.balabit.com/dl/white_papers/zorp-gateway-v3.1-tutorial-https-en.pdf
and at
http://www.balabit.hu/dl/html/zorp-reference-guide.html/ch01s01.html#embedded_analysis
doesn’t work either and shows the same error messages. The code looks
like this:
self.response_stack["GET"] = (HTTP_STK_DATA, (Z_STACK_PROGRAM, "/bin/sed '/http:/s//https:/g'"))

Exchangig HTTP_STK_DATA with HTTP_STK_MIME doesn't change anything
either.

Exchanging self.request_stack["GET"] with self.request_stack["POST"]
just shows the difference that the error only occurs on POST-Requests
and not on normal GET because it's just ignored or so.

The strange thing is that it seems like the external program isn’t
even called because when I insert the command
“touch /home/testuser/test”, the file is not touched. I also
couldn’t find anything corresponding in strace output.

2. 
Is it somehow possible to modify/block POST-Parameters? Modifying
the GET-Requests using the self.request_url-Parameter is easy but
I could not find any way to do this with POST-data. I tried passing
it to an external program for analyzing/modifying but this does not
work (see 1)?


I also tried an upgrade to 3.3 but it seems like common-gpl isn't
included yet. When I left it out of my sources.list I then ran into 
problems concerning the locales package (could not be installed 
because of errors). Is 3.3 for another Debian version or Ubuntu? 
Could the 3.3 solve my problems above?

Thanks in advance for your help,
Thomas Wenz
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser


More information about the zorp mailing list