[zorp-hu] Zorp http filterURL
Kosa Attila
atkosa@shinwa.hu
Thu, 18 Jul 2002 11:17:28 +0200
--QGBKWVSgmlsIyJ+t
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hello!
Halasz Gabor kert meg, hogy tovabbitsam ezt a levelet a
listara, mert jelenleg nem tud irni ide.
Allitasa szerint a tab/szokoz dolgok jok, nem azzal van
a problema. Az "if" reszek nelkul mukodik a konfigja.
--
Udvozlettel
Zsiga
--QGBKWVSgmlsIyJ+t
Content-Type: message/rfc822
Content-Disposition: inline
Return-Path: <halasz.g@nns.hu>
Delivered-To: atkosa@shinwa.hu
Received: from localhost [127.0.0.1]
by localhost with POP3 (fetchmail-5.9.11)
for atkosa@localhost (single-drop); Thu, 18 Jul 2002 09:54:44 +0200 (CEST)
Received: from fw.shinwa.hu (fw.shinwa.hu [192.168.1.1])
by mail.shinwa.hu (Postfix) with ESMTP id 0080823173
for <atkosa@shinwa.hu>; Thu, 18 Jul 2002 09:53:50 +0200 (CEST)
Received: from netfinity.nns.masq (unknown [194.88.54.245])
by fw.shinwa.hu (Postfix) with ESMTP id 8C75246B2
for <atkosa@shinwa.hu>; Thu, 18 Jul 2002 09:53:50 +0200 (CEST)
Received: (qmail-ldap/ctrl 3841 invoked from network); 18 Jul 2002 07:53:49 -0000
Received: from mc2400.nns.masq (HELO nns.hu) ([192.168.100.100]) (envelope-sender <halasz.g@nns.hu>)
by netfinity.nns.masq (qmail-ldap-1.03) with SMTP
for <atkosa@shinwa.hu>; 18 Jul 2002 07:53:49 -0000
Sender: halaszg@shinwa.hu
Message-ID: <3D367411.9EFFA915@nns.hu>
Date: Thu, 18 Jul 2002 09:53:53 +0200
From: Gabor Halasz <halasz.g@nns.hu>
Organization: NNS kft
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.18-jfs-1.0.17-xfs-1.1-P2-SMP i686)
X-Accept-Language: hu, en
MIME-Version: 1.0
To: Kosa Attila <atkosa@shinwa.hu>
Subject: Zorp, mar megint
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: 7bit
X-UIDL: L2i!!D2%#!#Yl!!T1o"!
Hali!
Meg mindig nem tudok irni a listara, de majd ma feljelentkezem masik
szerverrol, de ez surgos:
class Http_C(HttpProxy):
def config(self):
HttpProxy.config(self)
self.request["GET"] = (HTTP_REQ_POLICY, self.filterURL)
def filterURL(self, method, url, version):
if (url == "http://webmail.xxx.hu")
self.request_url = "http://129.184.93.3/"
return HTTP_REQ_ACCEPT
if (url == "http://www.xxx.hu")
return HTTP_REQ_ACCEPT
if (url == "https://www.xxx.hu")
return HTTP_REQ_ACCEPT
self.error_info = "Content denied by policy."
return HTTP_REQ_REJECT
Jul 17 19:56:06 thewall Http[9042]: zorp version 1.4.3 starting up
Jul 17 19:56:06 thewall Http[9044]: (zorp/nosession): File
"/etc/zorp/test.py", line 37
Jul 17 19:56:06 thewall Http[9044]: (zorp/nosession): if (url ==
"http://webmail.xxx.hu")
Jul 17 19:56:06 thewall Http[9044]:
(zorp/nosession): ^
Jul 17 19:56:06 thewall Http[9044]: (zorp/nosession): SyntaxError: invalid
syntax
Jul 17 19:56:06 thewall Http[9042]: (zorp/nosession): Error opening policy
file /etc/zorp/test.py
Jul 17 19:56:06 thewall Http[9042]: zorp version 1.4.3 going down.
Nincs valami otleted? Fogalmam nincs, mi nem tetszik a parsernek... kosz.
--
Magyarok haza!! - az Avarok
--QGBKWVSgmlsIyJ+t--