1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
5
<link href="01-reset-fonts-grids-base.css" type="text/css" rel="StyleSheet"/>
6
<link href="02-docstyle.css" type="text/css" rel="StyleSheet"/>
7
<link href="syntax.css" type="text/css" rel="StyleSheet"/>
8
<title>mitmproxy</title></head><body><div id="doc">
9
<div style="" id="hd" class="doc">
11
<a href="intro.html">prev</a>
13
<a href="index.html">index</a> |
14
<a href="mitmdump.html">next</a>
18
<h1><a href="index.html">mitmproxy 0.6 docs</a></h1>
22
<div style="" class="yui-b">
24
<p><strong>mitmproxy</strong> is a console tool that allows interactive examination and
25
modification of HTTP traffic. The <em>?</em> shortcut key shows complete documentation
26
on <strong>mitmproxy</strong>'s functionality.</p>
28
<h2>The interface: connection list</h2>
30
<p><img src="screenshots/mitmproxy.png"/></p>
32
<p>The connection list shows an index of captured flows in chronological order.
33
So, in this case, we can we can see that we visited <strong>gmail.com</strong>, which then
34
returned a 301 redirect to mail.google.com.</p>
36
<p>The statusbar at the bottom tells us that there are 11 flows in the view, that
37
we are using the "pretty" view mode (more on that below), and that the proxy is
38
bound to port 8080 of all interfaces.</p>
40
<p>Also visible is the <strong>Event log</strong>, which can be toggled on and off with the <em>v</em>
41
keyboard shortcut. This displays events like client connection information,
42
errors, and script output.</p>
44
<h2>Example: Interception</h2>
46
<p><strong>mitmproxy</strong>'s interception functionality lets you pause an HTTP request or
47
response, inspect and modify it, and then accept it to send it on to the server
50
<h3>1: Set an interception pattern</h3>
52
<p><img src="screenshots/intercept-filt.png"/></p>
54
<p>We press <em>i</em> to set an interception pattern. In this case, the <strong>~q</strong> filter
55
pattern tells <strong>mitmproxy</strong> to intercept all requests. For complete filter
56
syntax, see the <a href="filters.html">Filter expressions</a> section of this
57
document, or the built-in help function in <strong>mitmproxy</strong>.</p>
59
<h3>2: Intercepted connections are indicated with a red exclamation mark:</h3>
61
<p><img src="screenshots/intercept-mid.png"/></p>
63
<h3>3: You can now view and modify the request:</h3>
65
<p><img src="screenshots/intercept-options.png"/></p>
67
<p>In this case, we viewed the request by selecting it, pressed <em>e</em> for "edit"
68
and <em>m</em> for "method" to change the HTTP request method.</p>
70
<h3>4: Accept the intercept to continue</h3>
72
<p><img src="screenshots/intercept-result.png"/></p>
74
<p>Finally, we press <em>a</em> to accept the modified request, which is then sent on to
75
the server. In this case, we changed the request from an HTTP GET to to
76
OPTIONS, and Google's server has responded with a 405 "Method not allowed". </p>
81
<div style="" id="ft" class="doc">
82
<p>© mitmproxy project, 2011</p>
b'\\ No newline at end of file'