[Pkg-privacy-commits] [obfsproxy] 45/353: Transports should take a circuit
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:01:37 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 294fc452f329f95750deb812a4901aaf0b089c5c
Author: Brandon Wiley <brandon at blanu.net>
Date: Wed Aug 29 18:17:37 2012 -0500
Transports should take a circuit
---
src/obfsproxy/transports/base.py | 6 +++---
src/obfsproxy/transports/dust_transport.py | 5 ++---
src/obfsproxy/transports/obfs3.py | 5 ++---
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/obfsproxy/transports/base.py b/src/obfsproxy/transports/base.py
index 8567894..44f10be 100644
--- a/src/obfsproxy/transports/base.py
+++ b/src/obfsproxy/transports/base.py
@@ -14,11 +14,11 @@ class BaseDaemon:
The BaseDaemon class is a base class for implementing pluggable transport clients and server.
"""
- def __init__(self, downstreamConnection, upstreamConnection):
+ def __init__(self, circuit):
""" Store the upstream and downstream sockets for use in other methods. """
- self.downstreamConnection = downstreamConnection
- self.upstreamConnection = upstreamConnection
+ self.downstreamConnection = circuit.downstream
+ self.upstreamConnection = circuit.upstream
def read(
self,
diff --git a/src/obfsproxy/transports/dust_transport.py b/src/obfsproxy/transports/dust_transport.py
index 14d46ed..1cd245b 100644
--- a/src/obfsproxy/transports/dust_transport.py
+++ b/src/obfsproxy/transports/dust_transport.py
@@ -24,14 +24,13 @@ class DustDaemon(BaseDaemon):
It implements the functionality which is common across both the client and server implementations.
"""
- def __init__(self, downstreamConnection, upstreamConnection):
+ def __init__(self, circuit):
"""
Initializes the daemon with a downstream and upstream socket.
This also sets the protocol state to HANDSHAKE_WRITE and generates an ephemeral keypair.
"""
- BaseDaemon.__init__(self, downstreamConnection,
- upstreamConnection)
+ BaseDaemon.__init__(self, circuit)
self.state = HANDSHAKE_WRITE
self.ekeypair = createEphemeralKeypair()
diff --git a/src/obfsproxy/transports/obfs3.py b/src/obfsproxy/transports/obfs3.py
index 9e4ca7b..9749b05 100644
--- a/src/obfsproxy/transports/obfs3.py
+++ b/src/obfsproxy/transports/obfs3.py
@@ -25,14 +25,13 @@ class Obfs3Daemon(BaseDaemon):
It is subclassed by Obfs2Client and Obfs2Server.
"""
- def __init__(self, downstreamConnection, upstreamConnection):
+ def __init__(self, circuit):
"""
Initializes the daemon with a downstream and upstream socket.
This also sets the protocol state to HANDSHAKE_WRITE and generates an ephemeral keypair.
"""
- BaseDaemon.__init__(self, downstreamConnection,
- upstreamConnection)
+ BaseDaemon.__init__(self, circuit)
self.state = HANDSHAKE_WRITE
self.ekeypair = createEphemeralKeypair()
--
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