Documentation, setup.py updates, styling.
This commit is contained in:
parent
e93b343ac4
commit
7b3d3dc85e
|
@ -3,3 +3,7 @@
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
background: #000000;
|
background: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
|
@ -24,14 +24,16 @@
|
||||||
$!nav("faq.html", this, state)!$
|
$!nav("faq.html", this, state)!$
|
||||||
|
|
||||||
<li class="nav-header">Features</li>
|
<li class="nav-header">Features</li>
|
||||||
|
$!nav("anticache.html", this, state)!$
|
||||||
$!nav("clientreplay.html", this, state)!$
|
$!nav("clientreplay.html", this, state)!$
|
||||||
|
$!nav("filters.html", this, state)!$
|
||||||
|
$!nav("proxyauth.html", this, state)!$
|
||||||
|
$!nav("replacements.html", this, state)!$
|
||||||
$!nav("serverreplay.html", this, state)!$
|
$!nav("serverreplay.html", this, state)!$
|
||||||
|
$!nav("setheaders.html", this, state)!$
|
||||||
$!nav("sticky.html", this, state)!$
|
$!nav("sticky.html", this, state)!$
|
||||||
$!nav("reverseproxy.html", this, state)!$
|
$!nav("reverseproxy.html", this, state)!$
|
||||||
$!nav("upstreamcerts.html", this, state)!$
|
$!nav("upstreamcerts.html", this, state)!$
|
||||||
$!nav("replacements.html", this, state)!$
|
|
||||||
$!nav("anticache.html", this, state)!$
|
|
||||||
$!nav("filters.html", this, state)!$
|
|
||||||
|
|
||||||
<li class="nav-header">SSL interception</li>
|
<li class="nav-header">SSL interception</li>
|
||||||
$!nav("ssl.html", this, state)!$
|
$!nav("ssl.html", this, state)!$
|
||||||
|
@ -58,7 +60,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span9">
|
<div class="span9">
|
||||||
|
<div class="page-header">
|
||||||
<h1>@!this.title!@</h1>
|
<h1>@!this.title!@</h1>
|
||||||
|
</div>
|
||||||
$!body!$
|
$!body!$
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,6 @@
|
||||||
When the __anticache__ option is passed to mitmproxy, it removes headers
|
When the __anticache__ option is passed to mitmproxy, it removes headers
|
||||||
(__if-none-match__ and __if-modified-since__) that might elicit a
|
(__if-none-match__ and __if-modified-since__) that might elicit a
|
||||||
304-not-modified response from the server. This is useful when you want to make
|
304-not-modified response from the server. This is useful when you want to make
|
||||||
sure you capture an HTTP exchange in its totality, and during [client
|
sure you capture an HTTP exchange in its totality. It's also often used during
|
||||||
replay](@!urlTo("clientreplay.html")!@).
|
[client replay](@!urlTo("clientreplay.html")!@), when you want to make sure the
|
||||||
|
server responds with complete data.
|
||||||
|
|
|
@ -9,6 +9,5 @@ before starting the next request. This might differ from the recorded
|
||||||
conversation, where requests may have been made concurrently.
|
conversation, where requests may have been made concurrently.
|
||||||
|
|
||||||
You may want to use client-side replay in conjunction with the
|
You may want to use client-side replay in conjunction with the
|
||||||
[anticache](@!urlTo("anticache.html")!@) option.
|
[anticache](@!urlTo("anticache.html")!@) option, to make sure the server
|
||||||
|
responds with complete data.
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
Many commands in __mitmproxy__ and __mitmdump__ take a filter expression.
|
Many commands in __mitmproxy__ and __mitmdump__ take a filter expression.
|
||||||
Filter expressions consist of the following operators:
|
Filter expressions consist of the following operators:
|
||||||
|
|
||||||
<table>
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
<!--(for i in filt_help)-->
|
<!--(for i in filt_help)-->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="filt_cmd">@!i[0]!@</td>
|
<td class="filt_cmd">@!i[0]!@</td>
|
||||||
<td class="filt_help">@!i[1]!@</td>
|
<td class="filt_help">@!i[1]!@</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--(end)-->
|
<!--(end)-->
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
- Regexes are Python-style
|
- Regexes are Python-style
|
||||||
|
|
|
@ -65,16 +65,20 @@ pages = [
|
||||||
Page("install.html", "Installation"),
|
Page("install.html", "Installation"),
|
||||||
Page("mitmproxy.html", "mitmproxy"),
|
Page("mitmproxy.html", "mitmproxy"),
|
||||||
Page("mitmdump.html", "mitmdump"),
|
Page("mitmdump.html", "mitmdump"),
|
||||||
|
|
||||||
|
Page("anticache.html", "Anticache"),
|
||||||
Page("clientreplay.html", "Client-side replay"),
|
Page("clientreplay.html", "Client-side replay"),
|
||||||
|
Page("filters.html", "Filter expressions"),
|
||||||
|
Page("setheaders.html", "Set Headers"),
|
||||||
Page("serverreplay.html", "Server-side replay"),
|
Page("serverreplay.html", "Server-side replay"),
|
||||||
Page("sticky.html", "Sticky cookies and auth"),
|
Page("sticky.html", "Sticky cookies and auth"),
|
||||||
Page("upstreamcerts.html", "Upstream Certs"),
|
Page("proxyauth.html", "Proxy Authentication"),
|
||||||
Page("replacements.html", "Replacements"),
|
Page("replacements.html", "Replacements"),
|
||||||
Page("reverseproxy.html", "Reverse proxy mode"),
|
Page("reverseproxy.html", "Reverse proxy mode"),
|
||||||
Page("anticache.html", "Anticache"),
|
Page("upstreamcerts.html", "Upstream Certs"),
|
||||||
Page("filters.html", "Filter expressions"),
|
|
||||||
Page("ssl.html", "SSL Overview"),
|
Page("ssl.html", "Overview"),
|
||||||
Page("transparent.html", "Transparent Overview"),
|
Page("transparent.html", "Overview"),
|
||||||
Directory("certinstall"),
|
Directory("certinstall"),
|
||||||
Directory("scripting"),
|
Directory("scripting"),
|
||||||
Directory("tutorials"),
|
Directory("tutorials"),
|
||||||
|
|
|
@ -1,54 +1,49 @@
|
||||||
|
|
||||||
## Using Pip
|
The preferred way to install mitmproxy - whether you're installing the latest
|
||||||
|
release or from source - is to use [pip](http://www.pip-installer.org/). If you
|
||||||
|
don't already have pip on your system, you can find installation instructions
|
||||||
|
[here](http://www.pip-installer.org/en/latest/installing.html).
|
||||||
|
|
||||||
The preferred way to install mitmproxy is to use
|
|
||||||
[pip](http://pypi.python.org/pypi/pip). A single command will install the
|
|
||||||
latest release of mitmproxy, along with all its dependencies:
|
|
||||||
|
|
||||||
<pre>
|
## Installing the latest release
|
||||||
sudo pip install mitmproxy
|
|
||||||
|
A single command will download and install the latest release of mitmproxy,
|
||||||
|
along with all its dependencies:
|
||||||
|
|
||||||
|
<pre class="terminal">
|
||||||
|
pip install mitmproxy
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
## From Source
|
## Installing from source
|
||||||
|
|
||||||
- When installing from source, you will need to install the
|
When installing from source, the easiest method is still to use pip. In this
|
||||||
[dependencies](@!urlTo("index.html")!@) by hand.
|
case run:
|
||||||
- Then run the following command from the base of the source distribution:
|
|
||||||
|
|
||||||
<pre>
|
<pre class="terminal">
|
||||||
sudo python setup.py install
|
pip install /path/to/source
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
Note that if you're installing current git master, you will also have to
|
||||||
|
install the current git master of [netlib](http://github.com/cortesi/netlib) by
|
||||||
|
hand.
|
||||||
|
|
||||||
## OSX
|
## OSX
|
||||||
|
|
||||||
|
- If you're running a Python interpreter installed with homebrew (or similar),
|
||||||
|
you may have to install some dependencies by hand.
|
||||||
- Make sure that XCode is installed from the App Store, and that the
|
- Make sure that XCode is installed from the App Store, and that the
|
||||||
command-line tools have been downloaded (XCode/Preferences/Downloads).
|
command-line tools have been downloaded (XCode/Preferences/Downloads).
|
||||||
- Install __pip__ using the following command:
|
- Now use __pip__ to do the installation, as above.
|
||||||
|
|
||||||
<pre>
|
|
||||||
sudo easy_install pip
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
- Now use __pip__ to set up the dependencies and do the install:
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
sudo pip install mitmproxy
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
This procedure may vary if, for instance, you've installed Python from an
|
|
||||||
external source like [homebrew](http://mxcl.github.com/homebrew/). In that
|
|
||||||
case, the easiest way to proceed is to first install __easy_install__, then
|
|
||||||
continue as above.
|
|
||||||
|
|
||||||
There are a few bits of customization you might want to do to make mitmproxy
|
There are a few bits of customization you might want to do to make mitmproxy
|
||||||
comfortable to use. At the moment, mitmproxy's color scheme is optimized for a
|
comfortable to use on OSX. The default color scheme is optimized for a dark
|
||||||
dark background terminal, so you probably want to change the default. You can
|
background terminal, but you can select a palette for a light terminal
|
||||||
use the OSX <b>open</b> program to create a simple and effective
|
background with the --palette option. You can use the OSX <b>open</b> program
|
||||||
<b>~/.mailcap</b> file to view HTTP bodies:
|
to create a simple and effective <b>~/.mailcap</b> file to view request and
|
||||||
|
response bodies:
|
||||||
|
|
||||||
<pre>
|
<pre class="terminal">
|
||||||
application/*; /usr/bin/open -Wn %s
|
application/*; /usr/bin/open -Wn %s
|
||||||
audio/*; /usr/bin/open -Wn %s
|
audio/*; /usr/bin/open -Wn %s
|
||||||
image/*; /usr/bin/open -Wn %s
|
image/*; /usr/bin/open -Wn %s
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
Proxy auth.
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
Setheaders.
|
|
@ -12,7 +12,7 @@ class NullProxyAuth():
|
||||||
def clean(self, headers):
|
def clean(self, headers):
|
||||||
"""
|
"""
|
||||||
Clean up authentication headers, so they're not passed upstream.
|
Clean up authentication headers, so they're not passed upstream.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def authenticate(self, headers):
|
def authenticate(self, headers):
|
||||||
|
@ -33,7 +33,7 @@ class BasicProxyAuth(NullProxyAuth):
|
||||||
AUTH_HEADER = 'Proxy-Authorization'
|
AUTH_HEADER = 'Proxy-Authorization'
|
||||||
def __init__(self, password_manager, realm):
|
def __init__(self, password_manager, realm):
|
||||||
NullProxyAuth.__init__(self, password_manager)
|
NullProxyAuth.__init__(self, password_manager)
|
||||||
self.realm = realm
|
self.realm = realm
|
||||||
|
|
||||||
def clean(self, headers):
|
def clean(self, headers):
|
||||||
del headers[self.AUTH_HEADER]
|
del headers[self.AUTH_HEADER]
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -93,7 +93,4 @@ setup(
|
||||||
"Topic :: Software Development :: Testing"
|
"Topic :: Software Development :: Testing"
|
||||||
],
|
],
|
||||||
install_requires=["netlib", "urwid>=1.1", "pyasn1>0.1.2", "pyopenssl>=0.12", "PIL", "lxml"],
|
install_requires=["netlib", "urwid>=1.1", "pyasn1>0.1.2", "pyopenssl>=0.12", "PIL", "lxml"],
|
||||||
dependency_links=[
|
|
||||||
'https://github.com/cortesi/netlib/tarball/master#egg=netlib-0.1'
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue