diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2013-03-11 11:49:36 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2013-03-11 11:49:36 +1300 |
commit | c34d1e3de6483b1ab8a1a3add53fb84364c68249 (patch) | |
tree | 0e0ef7797b4ff25996374351056c9e40b771976b /doc-src | |
parent | 5ceef16486f71e28440f80799183190543f162f0 (diff) | |
download | mitmproxy-c34d1e3de6483b1ab8a1a3add53fb84364c68249.tar.gz mitmproxy-c34d1e3de6483b1ab8a1a3add53fb84364c68249.tar.bz2 mitmproxy-c34d1e3de6483b1ab8a1a3add53fb84364c68249.zip |
Docs, examples.
Diffstat (limited to 'doc-src')
-rw-r--r-- | doc-src/certinstall/firefox.html | 24 | ||||
-rw-r--r-- | doc-src/certinstall/ios.html | 19 | ||||
-rw-r--r-- | doc-src/certinstall/osx.html | 13 | ||||
-rw-r--r-- | doc-src/certinstall/windows7.html | 29 | ||||
-rw-r--r-- | doc-src/features/proxyauth.html | 5 | ||||
-rw-r--r-- | doc-src/features/sticky.html | 6 | ||||
-rw-r--r-- | doc-src/index.py | 3 | ||||
-rw-r--r-- | doc-src/mitmproxy.html | 6 | ||||
-rw-r--r-- | doc-src/scripting/inlinescripts.html | 11 | ||||
-rw-r--r-- | doc-src/ssl.html | 7 |
10 files changed, 81 insertions, 42 deletions
diff --git a/doc-src/certinstall/firefox.html b/doc-src/certinstall/firefox.html index a107aebc..2b299868 100644 --- a/doc-src/certinstall/firefox.html +++ b/doc-src/certinstall/firefox.html @@ -1,19 +1,23 @@ How to install the __mitmproxy__ certificate authority in Firefox: -### 1. If needed, copy the ~/.mitmproxy/mitmproxy-ca-cert.pem file to the target. +<ol> + <li> If needed, copy the ~/.mitmproxy/mitmproxy-ca-cert.pem file to the target. </li> -### 2: Open preferences, click on "Advanced", then select"Encryption": + <li>Open preferences, click on "Advanced", then select"Encryption": + <img src="@!urlTo('firefox3.jpg')!@"/> + </li> -<img src="@!urlTo('firefox3.jpg')!@"/> + <li> Click "View Certificates", "Import", and select the certificate file: + <img src="@!urlTo('firefox3-import.jpg')!@"/> + </li> -### 3: Click "View Certificates", "Import", and select the certificate file: + <li>Tick "Trust this CS to identify web sites", and click "Ok": + <img src="@!urlTo('firefox3-trust.jpg')!@"/> + </li> -<img src="@!urlTo('firefox3-import.jpg')!@"/> + <li> You should now see the mitmproxy certificate listed in the Authorities + tab.</li> -### 4: Tick "Trust this CS to identify web sites", and click "Ok": - -<img src="@!urlTo('firefox3-trust.jpg')!@"/> - -You should now see the mitmproxy certificate listed in the Authorities tab. +</ol> diff --git a/doc-src/certinstall/ios.html b/doc-src/certinstall/ios.html index d306dfc6..81e2cce6 100644 --- a/doc-src/certinstall/ios.html +++ b/doc-src/certinstall/ios.html @@ -1,18 +1,21 @@ How to install the __mitmproxy__ certificate authority on IOS devices: -### 1: Set up the Mail app on the device to receive email. +<ol> + <li>Set up the Mail app on the device to receive email.</li> -### 2: Mail the mitmproxy-ca-cert.pem file to the device, and tap on the attachment. + <li>Mail the mitmproxy-ca-cert.pem file to the device, and tap on the attachment.</li> -### 3: You will be prompted to install a profile. Click "Install": + <li>You will be prompted to install a profile. Click "Install": -<img src="@!urlTo('ios-profile.png')!@"/> + <img src="@!urlTo('ios-profile.png')!@"/></li> -### 4: Accept the warning by clicking "Install" again: + <li>Accept the warning by clicking "Install" again: -<img src="@!urlTo('ios-warning.png')!@"/> + <img src="@!urlTo('ios-warning.png')!@"/></li> -### 5: The certificate should now be trusted: + <li>The certificate should now be trusted: -<img src="@!urlTo('ios-installed.png')!@"/> + <img src="@!urlTo('ios-installed.png')!@"/></li> + +</ol> diff --git a/doc-src/certinstall/osx.html b/doc-src/certinstall/osx.html index 465ada43..61e4be71 100644 --- a/doc-src/certinstall/osx.html +++ b/doc-src/certinstall/osx.html @@ -1,13 +1,16 @@ How to install the __mitmproxy__ certificate authority in OSX: -### 1: Open Finder, and double-click on the mitmproxy-ca-cert.pem file. +<ol> + <li>Open Finder, and double-click on the mitmproxy-ca-cert.pem file.</li> -### 2: You will be prompted to add the certificate. Click "Always Trust": + <li>You will be prompted to add the certificate. Click "Always Trust": -<img src="@!urlTo('osx-addcert-alwaystrust.png')!@"/> + <img src="@!urlTo('osx-addcert-alwaystrust.png')!@"/> + </li> -You may be prompted for your password. You should now see the mitmproxy cert -listed under "Certificates". + <li> You may be prompted for your password. You should now see the + mitmproxy cert listed under "Certificates".</li> +</ol> diff --git a/doc-src/certinstall/windows7.html b/doc-src/certinstall/windows7.html index 7c2bb3ef..7a2414a2 100644 --- a/doc-src/certinstall/windows7.html +++ b/doc-src/certinstall/windows7.html @@ -1,19 +1,32 @@ How to install the __mitmproxy__ certificate authority in Windows 7: -### 1: Copy the ~/.mitmproxy/mitmproxy-ca-cert.p12 file to the target system. +<ol> -### 2: Double-click the certificate file. You should see a certificate import wizard: + <li> Copy the ~/.mitmproxy/mitmproxy-ca-cert.p12 file to the target system. </li> -<img src="@!urlTo('win7-wizard.png')!@"/> + <li> + Double-click the certificate file. You should see a certificate import wizard: -### 3: Click "Next" until you're prompted for the certificate store: + <img src="@!urlTo('win7-wizard.png')!@"/> + </li> -<img src="@!urlTo('win7-certstore.png')!@"/> + <li> + Click "Next" until you're prompted for the certificate store: -### 4: Select "Place all certificates in the following store", and select "Trusted Root Certification Authorities": + <img src="@!urlTo('win7-certstore.png')!@"/> -<img src="@!urlTo('win7-certstore-trustedroot.png')!@"/> + </li> -### 5: Click "Next" and "Finish". + + <li> + <p>Select "Place all certificates in the following store", and select "Trusted Root Certification Authorities":</p> + + <img src="@!urlTo('win7-certstore-trustedroot.png')!@"/> + + </li> + + <li> Click "Next" and "Finish". </li> + +</ol> diff --git a/doc-src/features/proxyauth.html b/doc-src/features/proxyauth.html index 0618ee68..c22d50f3 100644 --- a/doc-src/features/proxyauth.html +++ b/doc-src/features/proxyauth.html @@ -1,8 +1,9 @@ - Asks the user for authentication before they are permitted to use the proxy. Authentication headers are stripped from the flows, so they are not passed to -upstream servers. For now, only HTTP Basic authentication is supported. +upstream servers. For now, only HTTP Basic authentication is supported. The +proxy auth options are ignored if the proxy is in transparent or reverse proxy +mode. <table class="table"> <tbody> diff --git a/doc-src/features/sticky.html b/doc-src/features/sticky.html index 1b79f922..59116067 100644 --- a/doc-src/features/sticky.html +++ b/doc-src/features/sticky.html @@ -22,8 +22,7 @@ with the secured resources. <th width="20%">command-line</th> <td> <ul> - <li>-t (sticky cookies on all requests)</li> - <li>-T FILTER (sticky cookies on requests matching filter</li> + <li>-t FILTER</li> </ul> </td> </tr> @@ -48,8 +47,7 @@ replay of HTTP Digest authentication. <th width="20%">command-line</th> <td> <ul> - <li>-u (sticky auth on all requests)</li> - <li>-U FILTER (sticky auth on requests matching filter</li> + <li>-u FILTER</li> </ul> </td> </tr> diff --git a/doc-src/index.py b/doc-src/index.py index aa178fa0..7b65adb9 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -27,11 +27,12 @@ def mpath(p): ns.index_contents = file(mpath("README.mkd")).read() def example(s): - d = file(mpath(s)).read() + d = file(mpath(s)).read().rstrip() extemp = """<div class="example">%s<div class="example_legend">(%s)</div></div>""" return extemp%(countershape.template.Syntax("py")(d), s) ns.example = example + filt_help = [] for i in filt.filt_unary: filt_help.append( diff --git a/doc-src/mitmproxy.html b/doc-src/mitmproxy.html index f5bdbef8..678d41b5 100644 --- a/doc-src/mitmproxy.html +++ b/doc-src/mitmproxy.html @@ -1,7 +1,9 @@ __mitmproxy__ is a console tool that allows interactive examination and -modification of HTTP traffic. Use the _?_ shortcut key to view, -context-sensitive documentation from any __mitmproxy__ screen. +modification of HTTP traffic. It differs from mitmdump in that all flows are +kept in memory, which means that it's intended for taking and manipulating +small-ish samples. Use the _?_ shortcut key to view, context-sensitive +documentation from any __mitmproxy__ screen. ## Flow list diff --git a/doc-src/scripting/inlinescripts.html b/doc-src/scripting/inlinescripts.html index 7abf743c..39752b7f 100644 --- a/doc-src/scripting/inlinescripts.html +++ b/doc-src/scripting/inlinescripts.html @@ -13,6 +13,15 @@ lets the script interact with the global mitmproxy state. The __response__ event also gets an instance of Flow, which we can use to manipulate the response itself. +We can now run this script as follows: + +<pre class="terminal"> +> mitmdump -s add_header.py +</pre> + +The new header will be added to all responses passing through the proxy. + + ## Events @@ -60,7 +69,7 @@ Called once on script shutdown, after any other events. The main classes you will deal with in writing mitmproxy scripts are: -<table class="kvtable"> +<table class="table"> <tr> <th>libmproxy.flow.ClientConnection</th> <td>Describes a client connection.</td> diff --git a/doc-src/ssl.html b/doc-src/ssl.html index 7ee9438e..8708fe6f 100644 --- a/doc-src/ssl.html +++ b/doc-src/ssl.html @@ -3,7 +3,7 @@ The first time __mitmproxy__ or __mitmdump__ is started, the following set of certificate files for a dummy Certificate Authority are created in the config directory (~/.mitmproxy by default): -<table> +<table class="table"> <tr> <td>mitmproxy-ca.pem</td> <td>The private key and certificate in PEM format.</td> @@ -17,6 +17,11 @@ directory (~/.mitmproxy by default): <td>mitmproxy-ca-cert.p12</td> <td>The certificate in PKCS12 format. For use on Windows.</td> </tr> + <tr> + <td>mitmproxy-ca-cert.cer</td> + <td>Same file as .pem, but with an extension expected by some Android + devices.</td> + </tr> </table> This CA is used for on-the-fly generation of dummy certificates for SSL |