[Pkg-privacy-commits] [obfsproxy] 220/353: Don't pass TransportConfig to the transport __init__().
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:02:02 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 cea735c6dae8b79c51ae33383524ad4382847a15
Author: George Kadianakis <desnacked at riseup.net>
Date: Wed Jan 29 18:14:55 2014 +0000
Don't pass TransportConfig to the transport __init__().
Passing it to setup() is enough. Transports that need it on __init__()
can keep it on their state.
---
obfsproxy/network/extended_orport.py | 2 +-
obfsproxy/network/network.py | 2 +-
obfsproxy/network/socks.py | 2 +-
obfsproxy/transports/b64.py | 2 +-
obfsproxy/transports/dummy.py | 2 +-
obfsproxy/transports/obfs2.py | 10 +++++-----
obfsproxy/transports/obfs3.py | 10 +++++-----
7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/obfsproxy/network/extended_orport.py b/obfsproxy/network/extended_orport.py
index f9153bd..cb8ea4f 100644
--- a/obfsproxy/network/extended_orport.py
+++ b/obfsproxy/network/extended_orport.py
@@ -369,7 +369,7 @@ class ExtORPortServerFactory(network.StaticDestinationClientFactory):
def buildProtocol(self, addr):
log.debug("%s: New connection from %s:%d." % (self.name, log.safe_addr_str(addr.host), addr.port))
- circuit = network.Circuit(self.transport_class(self.pt_config))
+ circuit = network.Circuit(self.transport_class())
# XXX instantiates a new factory for each client
clientFactory = ExtORPortClientFactory(circuit, self.cookie_file, addr, self.transport_name)
diff --git a/obfsproxy/network/network.py b/obfsproxy/network/network.py
index 038f4b6..4a8b641 100644
--- a/obfsproxy/network/network.py
+++ b/obfsproxy/network/network.py
@@ -363,7 +363,7 @@ class StaticDestinationServerFactory(Factory):
def buildProtocol(self, addr):
log.debug("%s: New connection from %s:%d." % (self.name, log.safe_addr_str(addr.host), addr.port))
- circuit = Circuit(self.transport_class(self.pt_config))
+ circuit = Circuit(self.transport_class())
# XXX instantiates a new factory for each client
clientFactory = StaticDestinationClientFactory(circuit, self.mode)
diff --git a/obfsproxy/network/socks.py b/obfsproxy/network/socks.py
index 7d48672..c7e8f47 100644
--- a/obfsproxy/network/socks.py
+++ b/obfsproxy/network/socks.py
@@ -172,6 +172,6 @@ class SOCKSv4Factory(Factory):
def buildProtocol(self, addr):
log.debug("%s: New connection." % self.name)
- circuit = network.Circuit(self.transport_class(self.pt_config))
+ circuit = network.Circuit(self.transport_class())
return SOCKSv4Protocol(circuit)
diff --git a/obfsproxy/transports/b64.py b/obfsproxy/transports/b64.py
index 7fde12c..f3300c4 100644
--- a/obfsproxy/transports/b64.py
+++ b/obfsproxy/transports/b64.py
@@ -45,7 +45,7 @@ class B64Transport(BaseTransport):
base64 before pushing them to the network.
"""
- def __init__(self, transport_config):
+ def __init__(self):
super(B64Transport, self).__init__()
def receivedDownstream(self, data):
diff --git a/obfsproxy/transports/dummy.py b/obfsproxy/transports/dummy.py
index 21ecf59..b92900d 100644
--- a/obfsproxy/transports/dummy.py
+++ b/obfsproxy/transports/dummy.py
@@ -12,7 +12,7 @@ class DummyTransport(BaseTransport):
without obfuscating them.
"""
- def __init__(self, transport_config):
+ def __init__(self):
"""
If you override __init__, you ought to call the super method too.
"""
diff --git a/obfsproxy/transports/obfs2.py b/obfsproxy/transports/obfs2.py
index 5ddee74..f8ba7c9 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, transport_config):
+ def __init__(self):
"""Initialize the obfs2 pluggable transport."""
super(Obfs2Transport, self).__init__()
@@ -292,13 +292,13 @@ class Obfs2Client(Obfs2Transport):
The client and server differ in terms of their padding strings.
"""
- def __init__(self, transport_config):
+ def __init__(self):
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"
- Obfs2Transport.__init__(self, transport_config)
+ Obfs2Transport.__init__(self)
class Obfs2Server(Obfs2Transport):
@@ -308,12 +308,12 @@ class Obfs2Server(Obfs2Transport):
The client and server differ in terms of their padding strings.
"""
- def __init__(self, transport_config):
+ def __init__(self):
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"
- Obfs2Transport.__init__(self, transport_config)
+ Obfs2Transport.__init__(self)
diff --git a/obfsproxy/transports/obfs3.py b/obfsproxy/transports/obfs3.py
index 454f407..0b6e6e8 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, transport_config):
+ def __init__(self):
"""Initialize the obfs3 pluggable transport."""
super(Obfs3Transport, self).__init__()
@@ -196,8 +196,8 @@ class Obfs3Client(Obfs3Transport):
The client and server differ in terms of their padding strings.
"""
- def __init__(self, transport_config):
- Obfs3Transport.__init__(self, transport_config)
+ def __init__(self):
+ Obfs3Transport.__init__(self)
self.send_keytype = "Initiator obfuscated data"
self.recv_keytype = "Responder obfuscated data"
@@ -212,8 +212,8 @@ class Obfs3Server(Obfs3Transport):
The client and server differ in terms of their padding strings.
"""
- def __init__(self, transport_config):
- Obfs3Transport.__init__(self, transport_config)
+ def __init__(self):
+ Obfs3Transport.__init__(self)
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