From 481cc6ea842dc3c531c45a4bd228bdd6ebcc4229 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 31 Aug 2015 17:29:14 +0200 Subject: we don't support socks auth, refs #738 --- libmproxy/proxy/config.py | 7 +++++++ test/test_proxy.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/libmproxy/proxy/config.py b/libmproxy/proxy/config.py index 8d2a286d..2a1b84cb 100644 --- a/libmproxy/proxy/config.py +++ b/libmproxy/proxy/config.py @@ -136,6 +136,13 @@ def process_proxy_options(parser, options): ) if options.auth_nonanonymous or options.auth_singleuser or options.auth_htpasswd: + + if options.socks_proxy: + return parser.error( + "Proxy Authentication not supported in SOCKS mode. " + "https://github.com/mitmproxy/mitmproxy/issues/738" + ) + if options.auth_singleuser: if len(options.auth_singleuser.split(':')) != 2: return parser.error( diff --git a/test/test_proxy.py b/test/test_proxy.py index cc6a79d0..3707fabe 100644 --- a/test/test_proxy.py +++ b/test/test_proxy.py @@ -93,6 +93,9 @@ class TestProcessProxyOptions: self.assert_err("not allowed with", "-R", "http://localhost", "-T") + def test_socks_auth(self): + self.assert_err("Proxy Authentication not supported in SOCKS mode.", "--socks", "--nonanonymous") + def test_client_certs(self): with tutils.tmpdir() as cadir: self.assert_noerr("--client-certs", cadir) -- cgit v1.2.3