[Pkg-privacy-commits] [obfsproxy] 74/353: Make it work with the latest pyptlib.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:01:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository obfsproxy.

commit 0cda30e064faa0a69a873be60f841f2c70531b09
Author: George Kadianakis <desnacked at riseup.net>
Date:   Mon Oct 8 23:41:01 2012 -0400

    Make it work with the latest pyptlib.
---
 obfsproxy/managed/client.py | 4 ++--
 obfsproxy/managed/server.py | 4 ++--
 obfsproxy/network/socks.py  | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/obfsproxy/managed/client.py b/obfsproxy/managed/client.py
index cf97943..183f0cf 100644
--- a/obfsproxy/managed/client.py
+++ b/obfsproxy/managed/client.py
@@ -8,7 +8,7 @@ from twisted.internet import reactor, error
 import obfsproxy.transports.transports as transports
 
 from pyptlib.client import init, reportSuccess, reportFailure, reportEnd
-from pyptlib.config import EnvException
+from pyptlib.config import EnvError
 
 import obfsproxy.common.log as log
 import pprint
@@ -18,7 +18,7 @@ class ManagedClient:
     def __init__(self):
         try:
             managedInfo = init(transports.transports.keys())
-        except EnvException:
+        except EnvError:
             log.warn("Client managed-proxy protocol failed.")
             return
 
diff --git a/obfsproxy/managed/server.py b/obfsproxy/managed/server.py
index 17c3795..4781250 100644
--- a/obfsproxy/managed/server.py
+++ b/obfsproxy/managed/server.py
@@ -8,7 +8,7 @@ from twisted.internet import reactor, error, address, tcp
 import obfsproxy.transports.transports as transports
 
 from pyptlib.server import init, reportSuccess, reportFailure, reportEnd
-from pyptlib.config import EnvException
+from pyptlib.config import EnvError
 
 import obfsproxy.common.log as log
 import pprint
@@ -18,7 +18,7 @@ class ManagedServer:
     def __init__(self):
         try:
             managedInfo = init(transports.transports.keys())
-        except EnvException:
+        except EnvError:
             log.warn("Server managed-proxy protocol failed.")
             return
 
diff --git a/obfsproxy/network/socks.py b/obfsproxy/network/socks.py
index 46bd46d..528cf13 100644
--- a/obfsproxy/network/socks.py
+++ b/obfsproxy/network/socks.py
@@ -100,9 +100,9 @@ class SOCKSv4Factory(Factory):
     A SOCKSv4 factory.
     """
 
-    def __init__(self, transport):
+    def __init__(self, transport_class):
         # XXX self.logging = log
-        self.transport = transport
+        self.transport_class = transport_class
         self.circuits = []
 
         self.name = "socks_fact_%s" % hex(id(self))
@@ -113,7 +113,7 @@ class SOCKSv4Factory(Factory):
     def buildProtocol(self, addr):
         log.info("%s: New connection." % self.name)
 
-        circuit = network.Circuit(self.transport)
+        circuit = network.Circuit(self.transport_class())
         self.circuits.append(circuit)
 
         return SOCKSv4Protocol(circuit)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfsproxy.git



More information about the Pkg-privacy-commits mailing list