[Pkg-privacy-commits] [obfsproxy] 196/353: Update the constructors of all existing four transports to expect a `transport_config' variable which is an instance of the new `TransportConfig' class.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:01:59 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 c5c2973999187c233758449d5baa09ce8c9ec8f5
Author: Philipp Winter <phw at torproject.org>
Date:   Thu Sep 26 23:46:26 2013 +0200

    Update the constructors of all existing four transports to expect a
    `transport_config' variable which is an instance of the new `TransportConfig'
    class.
---
 obfsproxy/transports/b64.py   |  3 +++
 obfsproxy/transports/dummy.py |  3 +++
 obfsproxy/transports/obfs2.py | 10 +++++-----
 obfsproxy/transports/obfs3.py | 10 +++++-----
 4 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/obfsproxy/transports/b64.py b/obfsproxy/transports/b64.py
index 6a34987..eb63c4d 100644
--- a/obfsproxy/transports/b64.py
+++ b/obfsproxy/transports/b64.py
@@ -45,6 +45,9 @@ class B64Transport(BaseTransport):
     base64 before pushing them to the network.
     """
 
+    def __init__(self, transport_config):
+        pass
+
     def receivedDownstream(self, data, circuit):
         """
         Got data from downstream; relay them upstream.
diff --git a/obfsproxy/transports/dummy.py b/obfsproxy/transports/dummy.py
index ad8d56c..9e46f8e 100644
--- a/obfsproxy/transports/dummy.py
+++ b/obfsproxy/transports/dummy.py
@@ -12,6 +12,9 @@ class DummyTransport(BaseTransport):
     without obfuscating them.
     """
 
+    def __init__(self, transport_config):
+        pass
+
     def receivedDownstream(self, data, circuit):
         """
         Got data from downstream; relay them upstream.
diff --git a/obfsproxy/transports/obfs2.py b/obfsproxy/transports/obfs2.py
index e34948b..9bbc446 100644
--- a/obfsproxy/transports/obfs2.py
+++ b/obfsproxy/transports/obfs2.py
@@ -51,7 +51,7 @@ class Obfs2Transport(base.BaseTransport):
     Obfs2Transport implements the obfs2 protocol.
     """
 
-    def __init__(self):
+    def __init__(self, transport_config):
         """Initialize the obfs2 pluggable transport."""
 
         # Check if the shared_secret class attribute was instantiated
@@ -280,14 +280,14 @@ class Obfs2Client(Obfs2Transport):
     The client and server differ in terms of their padding strings.
     """
 
-    def __init__(self):
+    def __init__(self, transport_config):
         self.send_pad_keytype = 'Initiator obfuscation padding'
         self.recv_pad_keytype = 'Responder obfuscation padding'
         self.send_keytype = "Initiator obfuscated data"
         self.recv_keytype = "Responder obfuscated data"
         self.we_are_initiator = True
 
-        Obfs2Transport.__init__(self)
+        Obfs2Transport.__init__(self, transport_config)
 
 
 class Obfs2Server(Obfs2Transport):
@@ -297,13 +297,13 @@ class Obfs2Server(Obfs2Transport):
     The client and server differ in terms of their padding strings.
     """
 
-    def __init__(self):
+    def __init__(self, transport_config):
         self.send_pad_keytype = 'Responder obfuscation padding'
         self.recv_pad_keytype = 'Initiator obfuscation padding'
         self.send_keytype = "Responder obfuscated data"
         self.recv_keytype = "Initiator obfuscated data"
         self.we_are_initiator = False
 
-        Obfs2Transport.__init__(self)
+        Obfs2Transport.__init__(self, transport_config)
 
 
diff --git a/obfsproxy/transports/obfs3.py b/obfsproxy/transports/obfs3.py
index 0727cc2..8f95229 100644
--- a/obfsproxy/transports/obfs3.py
+++ b/obfsproxy/transports/obfs3.py
@@ -31,7 +31,7 @@ class Obfs3Transport(base.BaseTransport):
     Obfs3Transport implements the obfs3 protocol.
     """
 
-    def __init__(self):
+    def __init__(self, transport_config):
         """Initialize the obfs3 pluggable transport."""
 
         # Our state.
@@ -195,8 +195,8 @@ class Obfs3Client(Obfs3Transport):
     The client and server differ in terms of their padding strings.
     """
 
-    def __init__(self):
-        Obfs3Transport.__init__(self)
+    def __init__(self, transport_config):
+        Obfs3Transport.__init__(self, transport_config)
 
         self.send_keytype = "Initiator obfuscated data"
         self.recv_keytype = "Responder obfuscated data"
@@ -211,8 +211,8 @@ class Obfs3Server(Obfs3Transport):
     The client and server differ in terms of their padding strings.
     """
 
-    def __init__(self):
-        Obfs3Transport.__init__(self)
+    def __init__(self, transport_config):
+        Obfs3Transport.__init__(self, transport_config)
 
         self.send_keytype = "Responder obfuscated data"
         self.recv_keytype = "Initiator obfuscated data"

-- 
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