mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
we don't support socks auth, refs #738
This commit is contained in:
parent
b04e6e56ab
commit
481cc6ea84
@ -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(
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user