diff --git a/mitmproxy/tools/console/flowview.py b/mitmproxy/tools/console/flowview.py index bed0a2901..a4d147440 100644 --- a/mitmproxy/tools/console/flowview.py +++ b/mitmproxy/tools/console/flowview.py @@ -144,9 +144,9 @@ class FlowDetails(tabs.Tabs): for line in lines: if message["from_client"]: - line.insert(0, f"{common.SYMBOL_FROM_CLIENT} ") + line.insert(0, ("from_client", f"{common.SYMBOL_FROM_CLIENT} ")) else: - line.insert(0, f"{common.SYMBOL_TO_CLIENT} ") + line.insert(0, ("to_client", f"{common.SYMBOL_TO_CLIENT} ")) widget_lines.append(urwid.Text(line)) diff --git a/mitmproxy/tools/console/palettes.py b/mitmproxy/tools/console/palettes.py index a680a5a7d..15745df59 100644 --- a/mitmproxy/tools/console/palettes.py +++ b/mitmproxy/tools/console/palettes.py @@ -37,6 +37,9 @@ class Palette: # JSON view 'json_string', 'json_number', 'json_boolean', + # TCP flow details + 'from_client', 'to_client', + # Grid Editor 'focusfield', 'focusfield_error', 'field_error', 'editfield', @@ -177,6 +180,10 @@ class LowDark(Palette): json_number = ('light magenta', 'default'), json_boolean = ('dark magenta', 'default'), + # TCP flow details + from_client = ('light blue', 'default'), + to_client = ('light red', 'default'), + # Grid Editor focusfield = ('black', 'light gray'), focusfield_error = ('dark red', 'light gray'), @@ -282,6 +289,10 @@ class LowLight(Palette): json_number = ('light magenta', 'default'), json_boolean = ('dark magenta', 'default'), + # TCP flow details + from_client = ('dark blue', 'default'), + to_client = ('dark red', 'default'), + # Grid Editor focusfield = ('black', 'light gray'), focusfield_error = ('dark red', 'light gray'), @@ -397,6 +408,10 @@ class SolarizedLight(LowLight): json_number = (sol_blue, 'default'), json_boolean = (sol_magenta, 'default'), + # TCP flow details + from_client = (sol_blue, 'default'), + to_client = (sol_red, 'default'), + # Grid Editor focusfield = (sol_base00, sol_base2), focusfield_error = (sol_red, sol_base2), @@ -475,6 +490,10 @@ class SolarizedDark(LowDark): json_number = (sol_blue, 'default'), json_boolean = (sol_magenta, 'default'), + # TCP flow details + from_client = (sol_blue, 'default'), + to_client = (sol_red, 'default'), + # Grid Editor focusfield = (sol_base0, sol_base02), focusfield_error = (sol_red, sol_base02),