diff options
Diffstat (limited to 'mitmproxy/addons/intercept.py')
-rw-r--r-- | mitmproxy/addons/intercept.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mitmproxy/addons/intercept.py b/mitmproxy/addons/intercept.py index 9e1a283e..d39d1962 100644 --- a/mitmproxy/addons/intercept.py +++ b/mitmproxy/addons/intercept.py @@ -1,3 +1,5 @@ +import typing + from mitmproxy import flowfilter from mitmproxy import exceptions from mitmproxy import ctx @@ -7,6 +9,17 @@ class Intercept: def __init__(self): self.filt = None + def load(self, loader): + loader.add_option( + "intercept_active", bool, False, + "Intercept toggle" + ) + + loader.add_option( + "intercept", typing.Optional[str], None, + "Intercept filter expression." + ) + def configure(self, updated): if "intercept" in updated: if not ctx.options.intercept: |