aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2013-03-03 10:37:06 +1300
committerAldo Cortesi <aldo@nullcube.com>2013-03-03 10:37:06 +1300
commit5c6587d4a80cc45b23154237ca94858da60c7da5 (patch)
treee5890b755c94ee1bf01000c73c9738c4f33dc5da /libmproxy/proxy.py
parentbbdb59b9f94e4c0fa887e4ddb4cf3df3413f27fe (diff)
downloadmitmproxy-5c6587d4a80cc45b23154237ca94858da60c7da5.tar.gz
mitmproxy-5c6587d4a80cc45b23154237ca94858da60c7da5.tar.bz2
mitmproxy-5c6587d4a80cc45b23154237ca94858da60c7da5.zip
Move HTTP auth module to netlib.
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 458ea2b5..1bf57b8a 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -16,9 +16,8 @@ import sys, os, string, socket, time
import shutil, tempfile, threading
import SocketServer
from OpenSSL import SSL
-from netlib import odict, tcp, http, wsgi, certutils, http_status
+from netlib import odict, tcp, http, wsgi, certutils, http_status, http_auth
import utils, flow, version, platform, controller
-import authentication
KILL = 0
@@ -619,14 +618,14 @@ def process_proxy_options(parser, options):
if len(options.auth_singleuser.split(':')) != 2:
parser.error("Please specify user in the format username:password")
username, password = options.auth_singleuser.split(':')
- password_manager = authentication.SingleUserPasswordManager(username, password)
+ password_manager = http_auth.PassManSingleUser(username, password)
elif options.auth_nonanonymous:
- password_manager = authentication.PermissivePasswordManager()
+ password_manager = http_auth.PassManNonAnon()
elif options.auth_htpasswd:
- password_manager = authentication.HtpasswdPasswordManager(options.auth_htpasswd)
- authenticator = authentication.BasicProxyAuth(password_manager, "mitmproxy")
+ password_manager = http_auth.PassManHtpasswd(options.auth_htpasswd)
+ authenticator = http_auth.BasicProxyAuth(password_manager, "mitmproxy")
else:
- authenticator = authentication.NullProxyAuth(None)
+ authenticator = http_auth.NullProxyAuth(None)
return ProxyConfig(
certfile = options.cert,