we don't support socks auth, refs #738

This commit is contained in:
Maximilian Hils 2015-08-31 17:29:14 +02:00
parent b04e6e56ab
commit 481cc6ea84
2 changed files with 10 additions and 0 deletions

View File

@ -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(

View File

@ -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)