aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2017-08-04 16:38:30 +0200
committerGitHub <noreply@github.com>2017-08-04 16:38:30 +0200
commitcfd8f8b5190ded64d82f9c3c23e02d689489d08d (patch)
tree899f1b444026f5bf5a2b8c1f0ce5eefbbfc44ec8
parente0ca9c3a982a460c675865cd798840f51f4321f1 (diff)
parent7c1d20d3431fded4d1b973ca3d30f13cb9f2a3ae (diff)
downloadmitmproxy-cfd8f8b5190ded64d82f9c3c23e02d689489d08d.tar.gz
mitmproxy-cfd8f8b5190ded64d82f9c3c23e02d689489d08d.tar.bz2
mitmproxy-cfd8f8b5190ded64d82f9c3c23e02d689489d08d.zip
Merge pull request #2494 from ujjwal96/intercept-toggle
Improve intercept toggle
-rw-r--r--mitmproxy/tools/console/consoleaddons.py6
-rw-r--r--mitmproxy/tools/console/defaultkeys.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/mitmproxy/tools/console/consoleaddons.py b/mitmproxy/tools/console/consoleaddons.py
index 0b0993c8..853447cf 100644
--- a/mitmproxy/tools/console/consoleaddons.py
+++ b/mitmproxy/tools/console/consoleaddons.py
@@ -68,12 +68,14 @@ class ConsoleAddon:
"""
return ["single", "vertical", "horizontal"]
- @command.command("intercept_toggle")
+ @command.command("console.intercept.toggle")
def intercept_toggle(self) -> None:
"""
Toggles interception on/off leaving intercept filters intact.
"""
- ctx.options.intercept_active = not ctx.options.intercept_active
+ ctx.options.update(
+ intercept_active = not ctx.options.intercept_active
+ )
@command.command("console.layout.cycle")
def layout_cycle(self) -> None:
diff --git a/mitmproxy/tools/console/defaultkeys.py b/mitmproxy/tools/console/defaultkeys.py
index 4634b1e2..8139569e 100644
--- a/mitmproxy/tools/console/defaultkeys.py
+++ b/mitmproxy/tools/console/defaultkeys.py
@@ -24,7 +24,7 @@ def map(km):
km.add("ctrl f", "console.nav.pagedown", ["global"], "Page down")
km.add("ctrl b", "console.nav.pageup", ["global"], "Page up")
- km.add("I", "console.command intercept_toggle", ["global"], "Toggle intercept")
+ km.add("I", "console.intercept.toggle", ["global"], "Toggle intercept")
km.add("i", "console.command set intercept=", ["global"], "Set intercept")
km.add("W", "console.command set save_stream_file=", ["global"], "Stream to file")
km.add("A", "flow.resume @all", ["flowlist", "flowview"], "Resume all intercepted flows")