[Pkg-privacy-commits] [obfsproxy] 275/353: Till HTTP CONNECT is actually supported, properly reject use
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:02:10 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 908d093b3e57eb55afa003a17018138e452bfa8c
Author: Yawning Angel <yawning at schwanenlied.me>
Date: Wed Mar 19 23:15:29 2014 +0000
Till HTTP CONNECT is actually supported, properly reject use
---
obfsproxy/managed/client.py | 4 ++++
obfsproxy/network/network.py | 3 ++-
obfsproxy/pyobfsproxy.py | 4 ++++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/obfsproxy/managed/client.py b/obfsproxy/managed/client.py
index ffcdd49..f5aeb0d 100644
--- a/obfsproxy/managed/client.py
+++ b/obfsproxy/managed/client.py
@@ -33,6 +33,10 @@ def do_managed_client():
# Apply the proxy settings if any
proxy = ptclient.config.getProxy()
if proxy:
+ if proxy.scheme == "http":
+ log.error("HTTP CONNECT proxy not supported yet")
+ ptclient.reportProxyError("Invalid scheme (%s)" % (proxy.scheme))
+ return
if settings.config.proxy:
log.warning("Proxy specified via commandline and by managed-proxy protocol, using manage-proxy's")
settings.config.proxy = proxy
diff --git a/obfsproxy/network/network.py b/obfsproxy/network/network.py
index 3a8d124..fe4b020 100644
--- a/obfsproxy/network/network.py
+++ b/obfsproxy/network/network.py
@@ -421,7 +421,8 @@ def create_proxy_client(host, port, proxy_spec, klass=None, klass_args=None):
d = SOCKSPoint.connect(klass)
return d
elif proxy_spec.scheme == "http":
- pass
+ # TODO: This should be supported one day
+ raise NotImplementedError("HTTP CONNECT proxy unsupported")
else:
# Should *NEVER* happen
raise RuntimeError("Invalid proxy scheme %s" % proxy_spec.scheme)
diff --git a/obfsproxy/pyobfsproxy.py b/obfsproxy/pyobfsproxy.py
index ce813b0..4cde4ad 100755
--- a/obfsproxy/pyobfsproxy.py
+++ b/obfsproxy/pyobfsproxy.py
@@ -124,6 +124,10 @@ def consider_cli_args(args):
# managed proxies without a logfile must not log at all.
log.disable_logs()
+ if settings.config.proxy and settings.config.proxy.scheme == 'http':
+ log.error("obfsproxy does not yet support HTTP CONNECT")
+ sys.exit(1)
+
def run_transport_setup(pt_config):
"""Run the setup() method for our transports."""
for transport, transport_class in transports.transports.items():
--
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