fix HTTPS Proxy-Authentication, refs #824

This commit is contained in:
Maximilian Hils
2015-11-14 21:55:02 +01:00
parent 0d98b9dcc5
commit d6bd1cb4a6
2 changed files with 7 additions and 1 deletions

View File

@@ -309,7 +309,10 @@ class HttpLayer(Layer):
self.log("request", "debug", [repr(request)])
# Handle Proxy Authentication
if not self.authenticate(request):
# Proxy Authentication conceptually does not work in transparent mode.
# We catch this misconfiguration on startup. Here, we sort out requests
# after a successful CONNECT request (which do not need to be validated anymore)
if self.mode != "transparent" and not self.authenticate(request):
return
# Make sure that the incoming request matches our expectations

View File

@@ -141,6 +141,9 @@ def process_proxy_options(parser, options):
if options.auth_nonanonymous or options.auth_singleuser or options.auth_htpasswd:
if options.transparent_proxy:
return parser.error("Proxy Authentication not supported in transparent mode.")
if options.socks_proxy:
return parser.error(
"Proxy Authentication not supported in SOCKS mode. "