Edit on GitHub

#  User Interface

First of all, we need to become familiar with mitmproxy’s user interface. Open the terminal window in which you started mitmproxy. You are in the default view of mitmproxy, which shows a list of flows. You should see your browser’s HTTP requests to load this tutorial. mitmproxy adds rows to the view as new requests come in.

Video Content

  1. Welcome to the mitmproxy tutorial. In this lesson we cover the user interface.
00:00
  1. This is the default view of mitmproxy.
00:14
  1. mitmproxy adds rows to the view as new requests come in.
00:18
  1. Let’s generate some requests using curl in a separate terminal.
00:23
  1. Use curl’s --proxy option to configure mitmproxy as a proxy.
00:31
  1. We use the text-based weather service wttr.in.
00:46
  1. You see the requests to wttr.in in the list of flows.
01:12
  1. mitmproxy is controlled using keyboard shortcuts.
01:17
  1. Use your arrow keys and to change the focused flow (>>).
01:21
  1. The focused flow (>>) is used as a target for various commands.
01:30
  1. One such command shows the flow details, it is bound to ENTER.
01:36
  1. Press ENTER to view the details of the focused flow.
01:42
  1. The flow details view has 3 panes: request, response, and detail.
01:47
  1. Use your arrow keys and to switch between panes.
01:52
  1. Press q to exit the current view.
02:10
  1. Press ? to get a list of all available keyboard shortcuts.
02:14
  1. Tip: Remember the ? shortcut. It works in every view.
02:28
  1. Press q to exit the current view.
02:33
  1. Each shortcut is internally bound to a command.
02:36
  1. You can also execute commands directly (without using shortcuts).
02:40
  1. Press : to open the command prompt at the bottom.
02:46
  1. Enter console.view.flow @focus.
02:51
  1. The command console.view.flow opens the details view for a flow.
03:01
  1. The argument @focus defines the target flow.
03:06
  1. Press ENTER to execute the command.
03:11
  1. Commands unleash the full power of mitmproxy, i.e., to configure interceptions.
03:14
  1. You now know basics of mitmproxy’s UI and how to control it.
03:21
  1. In the next lesson you will learn to intercept flows.
03:28

In the next lesson, you will learn to intercept requests before sending them to the server.