From 3efcba777f31b8995445c0f5cb0dea7bf2d33d52 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 15 Aug 2017 14:04:28 +0200 Subject: [PATCH] add connection_strategy option --- mitmproxy/addons/proxyserver.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mitmproxy/addons/proxyserver.py b/mitmproxy/addons/proxyserver.py index 7e7b05501..b4ad5b02e 100644 --- a/mitmproxy/addons/proxyserver.py +++ b/mitmproxy/addons/proxyserver.py @@ -58,6 +58,13 @@ class Proxyserver: self.options = None self._lock = asyncio.Lock() + def load(self, loader): + loader.add_option( + "connection_strategy", str, "eager", + "Determine when server connections should be established.", + choices=("eager", "lazy") + ) + def running(self): self.options = ctx.options self.event_queue = ctx.master.event_queue