[Pkg-privacy-commits] [obfsproxy] 47/353: Removed hardcoded destination for proxy
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 a0cefa70b2b520006edf58588ce2f4c8d37d6171
Author: Brandon Wiley <brandon at blanu.net>
Date: Wed Aug 29 18:41:03 2012 -0500
Removed hardcoded destination for proxy
---
src/obfsproxy/framework/managed/server.py | 4 ++--
src/obfsproxy/framework/proxy.py | 7 +++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/obfsproxy/framework/managed/server.py b/src/obfsproxy/framework/managed/server.py
index 358e5dd..e6ad23d 100755
--- a/src/obfsproxy/framework/managed/server.py
+++ b/src/obfsproxy/framework/managed/server.py
@@ -16,7 +16,7 @@ from obfsproxy.transports.dust_transport import DustServer
from obfsproxy.transports.obfs3 import Obfs3Server
from pyptlib.easy.server import init, reportSuccess, reportFailure, \
- reportEnd
+ reportEnd, getORPort
class TransportLaunchException(Exception):
@@ -27,7 +27,7 @@ class TransportLaunchException(Exception):
class ManagedServer:
def __init__(self):
- self.handler = ProxyHandler()
+ self.handler = ProxyHandler('127.0.0.1', getORPort())
self.supportedTransports = {
'dummy': DummyServer,
diff --git a/src/obfsproxy/framework/proxy.py b/src/obfsproxy/framework/proxy.py
index 791082d..8a7141d 100644
--- a/src/obfsproxy/framework/proxy.py
+++ b/src/obfsproxy/framework/proxy.py
@@ -20,13 +20,16 @@ from obfsproxy.framework.pump import Pump
class ProxyHandler:
-
"""
The ProxyHandler class implements the server-side handling of pluggable transports.
"""
transport = None
+ def __init__(self, addr, port):
+ self.addr=addr
+ self.port=port
+
def setTransport(self, transport):
""" setTransport sets the pluggable transport for this proxy server """
@@ -38,7 +41,7 @@ class ProxyHandler:
print 'connection'
client = Client()
- yield client.connect('blanu.net', 80) # FIXME - remove hardcoded destination
+ yield client.connect(self.addr, self.port)
self.pump = Pump(conn, client, self.transport)
self.pump.run()
--
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