mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-05-12 08:42:11 +08:00
Revamp SSL configuration.
- Move option parsing utiliities to proxy.py - Don't have a global config object. Pass it as an argument to ProxyServer. - Simplify certificate generation logic.
This commit is contained in:
@@ -15,7 +15,7 @@ HTTPS_PORT = random.randint(30000, 40000)
|
||||
|
||||
class TestMaster(controller.Master):
|
||||
def __init__(self, port, testq):
|
||||
serv = proxy.ProxyServer(port)
|
||||
serv = proxy.ProxyServer(proxy.Config("data/testkey.pem"), port)
|
||||
controller.Master.__init__(self, serv)
|
||||
self.testq = testq
|
||||
self.log = []
|
||||
@@ -54,7 +54,6 @@ class ServerThread(threading.Thread):
|
||||
|
||||
class _TestServers(libpry.TestContainer):
|
||||
def setUpAll(self):
|
||||
proxy.config = proxy.Config("data/testkey.pem")
|
||||
self.tqueue = Queue.Queue()
|
||||
# We don't make any concurrent requests, so we can access
|
||||
# the attributes on this object safely.
|
||||
|
||||
Reference in New Issue
Block a user