[zorp-hu] http parent proxy + transparent proxy? 2

narancs zorp-hu@lists.balabit.hu
Wed, 19 May 2004 12:38:11 +0200


Hi

sz=F3val nekem ez a doku nem egy=E9rtelm=FB, az elej=E9n csak directed =E9=
s inband, azut=E1n=20
either tr or non-tr mode.
sz=F3val hogyisvanez?

less /usr/share/zorp/pylib/Zorp/Http.py

  Using parent proxies

             There are two things to be checked to use parent proxies. Fi=
rst
             you have to pick a router which makes the proxy connect to t=
he
             parent proxy. The two possibilities are InbandRouter(), or
             DirectedRouter().

             The second thing to set is the parent_proxy and
             parent_proxy_port attribute in the HttpProxy instance. Setti=
ng
             these attributes results in proxy requests to be emitted to =
the
             target server in either transparent or non-transparent mode.

             The parent proxy attributes can be set in both the
             configuration phase (e.g. config() event), and later on a
             per-request basis.

             Example (Sample for using parent proxies in HTTP)

               class MyHttp(HttpProxy):

                 def config(self):
                   HttpProxy.config(self)
                   self.parent_proxy =3D "proxy.example.com"
                   self.parent_proxy_port =3D 3128

---
a konfighoz m=E9g ennyit:
Service("intra_http",  VirIntraHttp, router=3DTransparentRouter())

-------------------------------------------------------
Sziasztok!

zorp gpl 2.0.8.

k=E9rd=E9s: lehet-e olyat, hogy a zorp elkapja transparent proxyj=E1val =E9=
s
tov=E1bb=EDtja egy m=E1sik localhoston l=E9v=F5 proxynak?

May 19 12:13:45 zorp intra[15992]: (noname/nosession): Error parsing
policy file; filename=3D'/etc/
zorp/policy.py'
May 19 12:13:45 zorp intra[15992]: (noname/nosession): Error booting &
parsing policy;
May 19 12:13:45  intra[16252]: (Log thread):   File
"/etc/zorp/policy.py", line 297
May 19 12:13:45  intra[16252]: (Log thread):     self.parent_proxy =3D
"127.0.0.1"
May 19 12:13:45  intra[16252]: (Log thread):     ^
May 19 12:13:45  intra[16252]: (Log thread): SyntaxError: invalid syntax
May 19 12:13:48  intra[15992]: (noname/nosession): Error loading initial
policy, exiting;

konfig:

class PPIntraHttp(HttpProxyURIFilter):
        matcher=3DRegexpFileMatcher('/etc/zorp/http.deny',
'/etc/zorp/http.ignore')

        def config(self):
                HttpProxyURIFilter.config(self)
                self.transparent_mode =3D TRUE
                 self.parent_proxy =3D "127.0.0.1"
                 self.parent_proxy_port =3D 8080