aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc-src/02-docstyle.css4
-rw-r--r--doc-src/_layout.html10
-rw-r--r--doc-src/anticache.html6
-rw-r--r--doc-src/clientreplay.html5
-rw-r--r--doc-src/filters.html4
-rw-r--r--doc-src/index.py14
-rw-r--r--doc-src/install.html61
-rw-r--r--doc-src/proxyauth.html2
-rw-r--r--doc-src/setheaders.html2
-rw-r--r--libmproxy/authentication.py4
-rw-r--r--setup.py3
11 files changed, 62 insertions, 53 deletions
diff --git a/doc-src/02-docstyle.css b/doc-src/02-docstyle.css
index ad2235e7..855899f6 100644
--- a/doc-src/02-docstyle.css
+++ b/doc-src/02-docstyle.css
@@ -3,3 +3,7 @@
font-size: 1em;
background: #000000;
}
+
+pre {
+ color: #333;
+}
diff --git a/doc-src/_layout.html b/doc-src/_layout.html
index 826279ef..a4e84bcc 100644
--- a/doc-src/_layout.html
+++ b/doc-src/_layout.html
@@ -24,14 +24,16 @@
$!nav("faq.html", this, state)!$
<li class="nav-header">Features</li>
+ $!nav("anticache.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("setheaders.html", this, state)!$
$!nav("sticky.html", this, state)!$
$!nav("reverseproxy.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>
$!nav("ssl.html", this, state)!$
@@ -58,7 +60,9 @@
</div>
<div class="span9">
+ <div class="page-header">
<h1>@!this.title!@</h1>
+ </div>
$!body!$
</div>
diff --git a/doc-src/anticache.html b/doc-src/anticache.html
index 79f0683d..d97e9f5f 100644
--- a/doc-src/anticache.html
+++ b/doc-src/anticache.html
@@ -5,6 +5,6 @@
When the __anticache__ option is passed to mitmproxy, it removes headers
(__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
-sure you capture an HTTP exchange in its totality, and during [client
-replay](@!urlTo("clientreplay.html")!@).
-
+sure you capture an HTTP exchange in its totality. It's also often used during
+[client replay](@!urlTo("clientreplay.html")!@), when you want to make sure the
+server responds with complete data.
diff --git a/doc-src/clientreplay.html b/doc-src/clientreplay.html
index d4b1c3ff..c94f5034 100644
--- a/doc-src/clientreplay.html
+++ b/doc-src/clientreplay.html
@@ -9,6 +9,5 @@ before starting the next request. This might differ from the recorded
conversation, where requests may have been made concurrently.
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.
diff --git a/doc-src/filters.html b/doc-src/filters.html
index 2424c6f8..c7f0f78b 100644
--- a/doc-src/filters.html
+++ b/doc-src/filters.html
@@ -2,13 +2,15 @@
Many commands in __mitmproxy__ and __mitmdump__ take a filter expression.
Filter expressions consist of the following operators:
-<table>
+<table class="table">
+ <tbody>
<!--(for i in filt_help)-->
<tr>
<td class="filt_cmd">@!i[0]!@</td>
<td class="filt_help">@!i[1]!@</td>
</tr>
<!--(end)-->
+ </tbody>
</table>
- Regexes are Python-style
diff --git a/doc-src/index.py b/doc-src/index.py
index 9684306b..f2a07db8 100644
--- a/doc-src/index.py
+++ b/doc-src/index.py
@@ -65,16 +65,20 @@ pages = [
Page("install.html", "Installation"),
Page("mitmproxy.html", "mitmproxy"),
Page("mitmdump.html", "mitmdump"),
+
+ Page("anticache.html", "Anticache"),
Page("clientreplay.html", "Client-side replay"),
+ Page("filters.html", "Filter expressions"),
+ Page("setheaders.html", "Set Headers"),
Page("serverreplay.html", "Server-side replay"),
Page("sticky.html", "Sticky cookies and auth"),
- Page("upstreamcerts.html", "Upstream Certs"),
+ Page("proxyauth.html", "Proxy Authentication"),
Page("replacements.html", "Replacements"),
Page("reverseproxy.html", "Reverse proxy mode"),
- Page("anticache.html", "Anticache"),
- Page("filters.html", "Filter expressions"),
- Page("ssl.html", "SSL Overview"),
- Page("transparent.html", "Transparent Overview"),
+ Page("upstreamcerts.html", "Upstream Certs"),
+
+ Page("ssl.html", "Overview"),
+ Page("transparent.html", "Overview"),
Directory("certinstall"),
Directory("scripting"),
Directory("tutorials"),
diff --git a/doc-src/install.html b/doc-src/install.html
index 6f4bc530..30e2774d 100644
--- a/doc-src/install.html
+++ b/doc-src/install.html
@@ -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>
-sudo pip install mitmproxy
+## Installing the latest release
+
+A single command will download and install the latest release of mitmproxy,
+along with all its dependencies:
+
+<pre class="terminal">
+pip install mitmproxy
</pre>
-## From Source
+## Installing from source
-- When installing from source, you will need to install the
-[dependencies](@!urlTo("index.html")!@) by hand.
-- Then run the following command from the base of the source distribution:
+When installing from source, the easiest method is still to use pip. In this
+case run:
-<pre>
-sudo python setup.py install
+<pre class="terminal">
+pip install /path/to/source
</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
+- 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
command-line tools have been downloaded (XCode/Preferences/Downloads).
-- Install __pip__ using the following command:
-
-<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.
+- Now use __pip__ to do the installation, as above.
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
-dark background terminal, so you probably want to change the default. You can
-use the OSX <b>open</b> program to create a simple and effective
-<b>~/.mailcap</b> file to view HTTP bodies:
+comfortable to use on OSX. The default color scheme is optimized for a dark
+background terminal, but you can select a palette for a light terminal
+background with the --palette option. You can use the OSX <b>open</b> program
+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
audio/*; /usr/bin/open -Wn %s
image/*; /usr/bin/open -Wn %s
diff --git a/doc-src/proxyauth.html b/doc-src/proxyauth.html
new file mode 100644
index 00000000..224b9e2d
--- /dev/null
+++ b/doc-src/proxyauth.html
@@ -0,0 +1,2 @@
+
+Proxy auth.
diff --git a/doc-src/setheaders.html b/doc-src/setheaders.html
new file mode 100644
index 00000000..d000e95b
--- /dev/null
+++ b/doc-src/setheaders.html
@@ -0,0 +1,2 @@
+
+Setheaders.
diff --git a/libmproxy/authentication.py b/libmproxy/authentication.py
index 1f1f40ae..500ead6b 100644
--- a/libmproxy/authentication.py
+++ b/libmproxy/authentication.py
@@ -12,7 +12,7 @@ class NullProxyAuth():
def clean(self, headers):
"""
Clean up authentication headers, so they're not passed upstream.
- """
+ """
pass
def authenticate(self, headers):
@@ -33,7 +33,7 @@ class BasicProxyAuth(NullProxyAuth):
AUTH_HEADER = 'Proxy-Authorization'
def __init__(self, password_manager, realm):
NullProxyAuth.__init__(self, password_manager)
- self.realm = realm
+ self.realm = realm
def clean(self, headers):
del headers[self.AUTH_HEADER]
diff --git a/setup.py b/setup.py
index 6fb25c01..9a5398be 100644
--- a/setup.py
+++ b/setup.py
@@ -93,7 +93,4 @@ setup(
"Topic :: Software Development :: Testing"
],
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'
- ],
)