mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Added CLI argument to enable "follow flow list" mode
This commit is contained in:
parent
4024721c7b
commit
b030ff090a
@ -668,6 +668,11 @@ def mitmproxy():
|
|||||||
action="store_true", dest="eventlog",
|
action="store_true", dest="eventlog",
|
||||||
help="Show event log."
|
help="Show event log."
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-f", "--follow",
|
||||||
|
action="store_true", dest="follow",
|
||||||
|
help="Follow flow list."
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--no-mouse",
|
"--no-mouse",
|
||||||
action="store_true", dest="no_mouse",
|
action="store_true", dest="no_mouse",
|
||||||
|
@ -134,6 +134,7 @@ class Options(object):
|
|||||||
"anticomp",
|
"anticomp",
|
||||||
"client_replay",
|
"client_replay",
|
||||||
"eventlog",
|
"eventlog",
|
||||||
|
"follow",
|
||||||
"keepserving",
|
"keepserving",
|
||||||
"kill",
|
"kill",
|
||||||
"intercept",
|
"intercept",
|
||||||
@ -212,6 +213,7 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
|
|
||||||
self.eventlog = options.eventlog
|
self.eventlog = options.eventlog
|
||||||
self.eventlist = urwid.SimpleListWalker([])
|
self.eventlist = urwid.SimpleListWalker([])
|
||||||
|
self.follow = options.follow
|
||||||
|
|
||||||
if options.client_replay:
|
if options.client_replay:
|
||||||
self.client_playback_path(options.client_replay)
|
self.client_playback_path(options.client_replay)
|
||||||
@ -562,6 +564,9 @@ class ConsoleMaster(flow.FlowMaster):
|
|||||||
else:
|
else:
|
||||||
body = flowlist.FlowListBox(self)
|
body = flowlist.FlowListBox(self)
|
||||||
|
|
||||||
|
if self.follow:
|
||||||
|
self.toggle_follow_flows()
|
||||||
|
|
||||||
signals.push_view_state.send(
|
signals.push_view_state.send(
|
||||||
self,
|
self,
|
||||||
window = window.Window(
|
window = window.Window(
|
||||||
|
@ -54,6 +54,7 @@ def mitmproxy(args=None): # pragma: nocover
|
|||||||
console_options.palette = options.palette
|
console_options.palette = options.palette
|
||||||
console_options.palette_transparent = options.palette_transparent
|
console_options.palette_transparent = options.palette_transparent
|
||||||
console_options.eventlog = options.eventlog
|
console_options.eventlog = options.eventlog
|
||||||
|
console_options.follow = options.follow
|
||||||
console_options.intercept = options.intercept
|
console_options.intercept = options.intercept
|
||||||
console_options.limit = options.limit
|
console_options.limit = options.limit
|
||||||
console_options.no_mouse = options.no_mouse
|
console_options.no_mouse = options.no_mouse
|
||||||
|
Loading…
Reference in New Issue
Block a user