mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-30 14:58:38 +00:00
First draft of "How mitmproxy works", a complete guide to the mechanics of the proxy process
This commit is contained in:
parent
04552375a9
commit
f5e49ef598
@ -4,6 +4,13 @@
|
|||||||
background: #000000;
|
background: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
|
margin-top: 10px;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tablenum {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
572
doc-src/_explicit.graffle/data.plist
Normal file
572
doc-src/_explicit.graffle/data.plist
Normal file
@ -0,0 +1,572 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>ActiveLayerIndex</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>ApplicationVersion</key>
|
||||||
|
<array>
|
||||||
|
<string>com.omnigroup.OmniGraffle.MacAppStore</string>
|
||||||
|
<string>139.16</string>
|
||||||
|
</array>
|
||||||
|
<key>AutoAdjust</key>
|
||||||
|
<true/>
|
||||||
|
<key>BackgroundGraphic</key>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{0, 0}, {559.19998741149902, 782.79998779296875}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>SolidGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>BaseZoom</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>CanvasOrigin</key>
|
||||||
|
<string>{0, 0}</string>
|
||||||
|
<key>ColumnAlign</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>ColumnSpacing</key>
|
||||||
|
<real>36</real>
|
||||||
|
<key>CreationDate</key>
|
||||||
|
<string>2013-01-02 19:31:53 +0000</string>
|
||||||
|
<key>Creator</key>
|
||||||
|
<string>Aldo Cortesi</string>
|
||||||
|
<key>DisplayScale</key>
|
||||||
|
<string>1.000 cm = 1.000 cm</string>
|
||||||
|
<key>GraphDocumentVersion</key>
|
||||||
|
<integer>8</integer>
|
||||||
|
<key>GraphicsList</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>LineGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4074</integer>
|
||||||
|
<key>Points</key>
|
||||||
|
<array>
|
||||||
|
<string>{300.4483540852865, 420.70833897590637}</string>
|
||||||
|
<string>{344.88497416178387, 420.70833897590654}</string>
|
||||||
|
<string>{362.21830749511713, 420.04167230923986}</string>
|
||||||
|
<string>{413.55166625976557, 419.70833905537921}</string>
|
||||||
|
</array>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>HeadArrow</key>
|
||||||
|
<string>FilledArrow</string>
|
||||||
|
<key>Legacy</key>
|
||||||
|
<true/>
|
||||||
|
<key>TailArrow</key>
|
||||||
|
<string>0</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>LineGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4070</integer>
|
||||||
|
<key>Points</key>
|
||||||
|
<array>
|
||||||
|
<string>{84.896692911783873, 420.66667453447985}</string>
|
||||||
|
<string>{129.33331298828122, 420.66667453448002}</string>
|
||||||
|
<string>{146.66664632161454, 420.00000786781334}</string>
|
||||||
|
<string>{198.00000508626297, 419.66667461395269}</string>
|
||||||
|
</array>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>HeadArrow</key>
|
||||||
|
<string>FilledArrow</string>
|
||||||
|
<key>Legacy</key>
|
||||||
|
<true/>
|
||||||
|
<key>TailArrow</key>
|
||||||
|
<string>0</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{326.00000000000023, 391.39999198913591}, {62, 24}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>FontInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>Font</key>
|
||||||
|
<string>Helvetica</string>
|
||||||
|
<key>Size</key>
|
||||||
|
<real>12</real>
|
||||||
|
</dict>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4063</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs20 \cf0 2: Forwarded \
|
||||||
|
Request}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{110, 403.39997863769622}, {49, 12}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>FontInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>Font</key>
|
||||||
|
<string>Helvetica</string>
|
||||||
|
<key>Size</key>
|
||||||
|
<real>12</real>
|
||||||
|
</dict>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4061</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs20 \cf0 1: Request}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{430.83098347981803, 515.99999999999989}, {36, 14}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4026</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs24 \cf0 Server}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{40.499999999999993, 486.66666666666663}, {31, 14}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4025</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs24 \cf0 Client}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{417.16432189941418, 323.90565299479198}, {63.333332061767578, 185.52200317382812}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4004</integer>
|
||||||
|
<key>ImageID</key>
|
||||||
|
<integer>6</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{205.34386889139773, 289.33333333333331}, {84, 248.66667175292969}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4023</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Color</key>
|
||||||
|
<dict>
|
||||||
|
<key>b</key>
|
||||||
|
<string>0</string>
|
||||||
|
<key>g</key>
|
||||||
|
<string>0.463735</string>
|
||||||
|
<key>r</key>
|
||||||
|
<string>1</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;\red37\green17\blue0;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs24 \cf2 mitmproxy}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{4.6666666467984399, 351.33332316080771}, {102.66666412353516, 130.66667175292969}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>134</integer>
|
||||||
|
<key>ImageID</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GridInfo</key>
|
||||||
|
<dict/>
|
||||||
|
<key>GuidesLocked</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>GuidesVisible</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>HPages</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>ImageCounter</key>
|
||||||
|
<integer>7</integer>
|
||||||
|
<key>ImageLinkBack</key>
|
||||||
|
<array>
|
||||||
|
<dict/>
|
||||||
|
<dict/>
|
||||||
|
</array>
|
||||||
|
<key>ImageList</key>
|
||||||
|
<array>
|
||||||
|
<string>image6.tiff</string>
|
||||||
|
<string>image3.icns</string>
|
||||||
|
</array>
|
||||||
|
<key>KeepToScale</key>
|
||||||
|
<false/>
|
||||||
|
<key>Layers</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>Lock</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>Name</key>
|
||||||
|
<string>Layer 1</string>
|
||||||
|
<key>Print</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>View</key>
|
||||||
|
<string>YES</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>LayoutInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>Animate</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>circoMinDist</key>
|
||||||
|
<real>18</real>
|
||||||
|
<key>circoSeparation</key>
|
||||||
|
<real>0.0</real>
|
||||||
|
<key>layoutEngine</key>
|
||||||
|
<string>dot</string>
|
||||||
|
<key>neatoSeparation</key>
|
||||||
|
<real>0.0</real>
|
||||||
|
<key>twopiSeparation</key>
|
||||||
|
<real>0.0</real>
|
||||||
|
</dict>
|
||||||
|
<key>LinksVisible</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>MagnetsVisible</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>MasterSheets</key>
|
||||||
|
<array/>
|
||||||
|
<key>ModificationDate</key>
|
||||||
|
<string>2013-01-03 02:27:49 +0000</string>
|
||||||
|
<key>Modifier</key>
|
||||||
|
<string>Aldo Cortesi</string>
|
||||||
|
<key>NotesVisible</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>Orientation</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
<key>OriginVisible</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>PageBreaks</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>PrintInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSBottomMargin</key>
|
||||||
|
<array>
|
||||||
|
<string>float</string>
|
||||||
|
<string>41</string>
|
||||||
|
</array>
|
||||||
|
<key>NSHorizonalPagination</key>
|
||||||
|
<array>
|
||||||
|
<string>coded</string>
|
||||||
|
<string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string>
|
||||||
|
</array>
|
||||||
|
<key>NSLeftMargin</key>
|
||||||
|
<array>
|
||||||
|
<string>float</string>
|
||||||
|
<string>18</string>
|
||||||
|
</array>
|
||||||
|
<key>NSPaperSize</key>
|
||||||
|
<array>
|
||||||
|
<string>size</string>
|
||||||
|
<string>{595.19998741149902, 841.79998779296875}</string>
|
||||||
|
</array>
|
||||||
|
<key>NSPrintReverseOrientation</key>
|
||||||
|
<array>
|
||||||
|
<string>int</string>
|
||||||
|
<string>0</string>
|
||||||
|
</array>
|
||||||
|
<key>NSRightMargin</key>
|
||||||
|
<array>
|
||||||
|
<string>float</string>
|
||||||
|
<string>18</string>
|
||||||
|
</array>
|
||||||
|
<key>NSTopMargin</key>
|
||||||
|
<array>
|
||||||
|
<string>float</string>
|
||||||
|
<string>18</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<key>PrintOnePage</key>
|
||||||
|
<false/>
|
||||||
|
<key>ReadOnly</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>RowAlign</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>RowSpacing</key>
|
||||||
|
<real>36</real>
|
||||||
|
<key>SheetTitle</key>
|
||||||
|
<string>Canvas 1</string>
|
||||||
|
<key>SmartAlignmentGuidesActive</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>SmartDistanceGuidesActive</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>UniqueID</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UseEntirePage</key>
|
||||||
|
<false/>
|
||||||
|
<key>VPages</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>WindowInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>CurrentSheet</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>ExpandedCanvases</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Canvas 1</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>Frame</key>
|
||||||
|
<string>{{300, 236}, {974, 874}}</string>
|
||||||
|
<key>ListView</key>
|
||||||
|
<true/>
|
||||||
|
<key>OutlineWidth</key>
|
||||||
|
<integer>142</integer>
|
||||||
|
<key>RightSidebar</key>
|
||||||
|
<false/>
|
||||||
|
<key>ShowRuler</key>
|
||||||
|
<true/>
|
||||||
|
<key>Sidebar</key>
|
||||||
|
<true/>
|
||||||
|
<key>SidebarWidth</key>
|
||||||
|
<integer>120</integer>
|
||||||
|
<key>VisibleRegion</key>
|
||||||
|
<string>{{0, 202}, {550, 469.33333333333337}}</string>
|
||||||
|
<key>Zoom</key>
|
||||||
|
<real>1.5</real>
|
||||||
|
<key>ZoomValues</key>
|
||||||
|
<array>
|
||||||
|
<array>
|
||||||
|
<string>Canvas 1</string>
|
||||||
|
<real>1.5</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
BIN
doc-src/_explicit.graffle/image3.icns
Normal file
BIN
doc-src/_explicit.graffle/image3.icns
Normal file
Binary file not shown.
BIN
doc-src/_explicit.graffle/image6.tiff
Normal file
BIN
doc-src/_explicit.graffle/image6.tiff
Normal file
Binary file not shown.
1054
doc-src/_explicit_https.graffle/data.plist
Normal file
1054
doc-src/_explicit_https.graffle/data.plist
Normal file
File diff suppressed because it is too large
Load Diff
BIN
doc-src/_explicit_https.graffle/image3.icns
Normal file
BIN
doc-src/_explicit_https.graffle/image3.icns
Normal file
Binary file not shown.
BIN
doc-src/_explicit_https.graffle/image6.tiff
Normal file
BIN
doc-src/_explicit_https.graffle/image6.tiff
Normal file
Binary file not shown.
@ -19,42 +19,45 @@
|
|||||||
<ul class="nav nav-list">
|
<ul class="nav nav-list">
|
||||||
$!nav("index.html", this, state)!$
|
$!nav("index.html", this, state)!$
|
||||||
$!nav("install.html", this, state)!$
|
$!nav("install.html", this, state)!$
|
||||||
$!nav("mitmproxy.html", this, state)!$
|
$!nav("howmitmproxy.html", this, state)!$
|
||||||
$!nav("mitmdump.html", this, state)!$
|
|
||||||
$!nav("faq.html", this, state)!$
|
$!nav("faq.html", this, state)!$
|
||||||
|
|
||||||
|
<li class="nav-header">Tools</li>
|
||||||
|
$!nav("mitmproxy.html", this, state)!$
|
||||||
|
$!nav("mitmdump.html", this, state)!$
|
||||||
|
|
||||||
<li class="nav-header">Features</li>
|
<li class="nav-header">Features</li>
|
||||||
$!nav("anticache.html", this, state)!$
|
$!nav("anticache.html", this, state)!$
|
||||||
$!nav("clientreplay.html", this, state)!$
|
$!nav("clientreplay.html", this, state)!$
|
||||||
$!nav("filters.html", this, state)!$
|
$!nav("filters.html", this, state)!$
|
||||||
$!nav("proxyauth.html", this, state)!$
|
$!nav("proxyauth.html", this, state)!$
|
||||||
$!nav("replacements.html", this, state)!$
|
$!nav("replacements.html", this, state)!$
|
||||||
$!nav("serverreplay.html", this, state)!$
|
$!nav("serverreplay.html", this, state)!$
|
||||||
$!nav("setheaders.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)!$
|
||||||
|
|
||||||
<li class="nav-header">SSL interception</li>
|
<li class="nav-header">SSL interception</li>
|
||||||
$!nav("ssl.html", this, state)!$
|
$!nav("ssl.html", this, state)!$
|
||||||
$!nav("certinstall/firefox.html", this, state)!$
|
$!nav("certinstall/firefox.html", this, state)!$
|
||||||
$!nav("certinstall/osx.html", this, state)!$
|
$!nav("certinstall/osx.html", this, state)!$
|
||||||
$!nav("certinstall/windows7.html", this, state)!$
|
$!nav("certinstall/windows7.html", this, state)!$
|
||||||
$!nav("certinstall/ios.html", this, state)!$
|
$!nav("certinstall/ios.html", this, state)!$
|
||||||
$!nav("certinstall/android.html", this, state)!$
|
$!nav("certinstall/android.html", this, state)!$
|
||||||
|
|
||||||
<li class="nav-header">Transparent Proxying</li>
|
<li class="nav-header">Transparent Proxying</li>
|
||||||
$!nav("transparent.html", this, state)!$
|
$!nav("transparent.html", this, state)!$
|
||||||
$!nav("transparent/linux.html", this, state)!$
|
$!nav("transparent/linux.html", this, state)!$
|
||||||
$!nav("transparent/osx.html", this, state)!$
|
$!nav("transparent/osx.html", this, state)!$
|
||||||
|
|
||||||
<li class="nav-header">Tutorials</li>
|
<li class="nav-header">Tutorials</li>
|
||||||
$!nav("tutorials/30second.html", this, state)!$
|
$!nav("tutorials/30second.html", this, state)!$
|
||||||
$!nav("tutorials/gamecenter.html", this, state)!$
|
$!nav("tutorials/gamecenter.html", this, state)!$
|
||||||
|
|
||||||
<li class="nav-header">Scripting mitmproxy</li>
|
<li class="nav-header">Scripting mitmproxy</li>
|
||||||
$!nav("scripting/inlinescripts.html", this, state)!$
|
$!nav("scripting/inlinescripts.html", this, state)!$
|
||||||
$!nav("scripting/libmproxy.html", this, state)!$
|
$!nav("scripting/libmproxy.html", this, state)!$
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
771
doc-src/_transparent.graffle/data.plist
Normal file
771
doc-src/_transparent.graffle/data.plist
Normal file
@ -0,0 +1,771 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>ActiveLayerIndex</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>ApplicationVersion</key>
|
||||||
|
<array>
|
||||||
|
<string>com.omnigroup.OmniGraffle.MacAppStore</string>
|
||||||
|
<string>139.16</string>
|
||||||
|
</array>
|
||||||
|
<key>AutoAdjust</key>
|
||||||
|
<true/>
|
||||||
|
<key>BackgroundGraphic</key>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{0, 0}, {559.19998741149902, 782.79998779296875}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>SolidGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>BaseZoom</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>CanvasOrigin</key>
|
||||||
|
<string>{0, 0}</string>
|
||||||
|
<key>ColumnAlign</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>ColumnSpacing</key>
|
||||||
|
<real>36</real>
|
||||||
|
<key>CreationDate</key>
|
||||||
|
<string>2013-01-02 19:31:53 +0000</string>
|
||||||
|
<key>Creator</key>
|
||||||
|
<string>Aldo Cortesi</string>
|
||||||
|
<key>DisplayScale</key>
|
||||||
|
<string>1.000 cm = 1.000 cm</string>
|
||||||
|
<key>GraphDocumentVersion</key>
|
||||||
|
<integer>8</integer>
|
||||||
|
<key>GraphicsList</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{101.18773396809897, 358.41662979125977}, {62, 12}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>FontInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>Font</key>
|
||||||
|
<string>Helvetica</string>
|
||||||
|
<key>Size</key>
|
||||||
|
<real>12</real>
|
||||||
|
</dict>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4079</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs20 \cf0 2: Redirection}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{102.18775939941409, 405.16666666666663}, {78, 12}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>FontInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>Font</key>
|
||||||
|
<string>Helvetica</string>
|
||||||
|
<key>Size</key>
|
||||||
|
<real>12</real>
|
||||||
|
</dict>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4078</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs20 \cf0 3: HTTP Request}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>LineGraphic</string>
|
||||||
|
<key>ControlPoints</key>
|
||||||
|
<array>
|
||||||
|
<string>{-29.333333333333343, 15.666671991348267}</string>
|
||||||
|
<string>{-14, -7.3333333333333712}</string>
|
||||||
|
</array>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>37</integer>
|
||||||
|
<key>Points</key>
|
||||||
|
<array>
|
||||||
|
<string>{196.99999491373691, 331.83332316080725}</string>
|
||||||
|
<string>{198.00000508626303, 402.49998982747394}</string>
|
||||||
|
</array>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Bezier</key>
|
||||||
|
<true/>
|
||||||
|
<key>HeadArrow</key>
|
||||||
|
<string>FilledArrow</string>
|
||||||
|
<key>Legacy</key>
|
||||||
|
<true/>
|
||||||
|
<key>LineType</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>TailArrow</key>
|
||||||
|
<string>0</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{205.34387397766082, 289.3333333333328}, {84, 52.666667938232422}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4076</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Color</key>
|
||||||
|
<dict>
|
||||||
|
<key>b</key>
|
||||||
|
<string>0.547829</string>
|
||||||
|
<key>g</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>r</key>
|
||||||
|
<string>0.790866</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;\red37\green17\blue0;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs24 \cf2 router}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>LineGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4075</integer>
|
||||||
|
<key>Points</key>
|
||||||
|
<array>
|
||||||
|
<string>{304.061024983724, 422.16667167345679}</string>
|
||||||
|
<string>{348.49764506022132, 422.16667167345696}</string>
|
||||||
|
<string>{365.83097839355469, 421.50000500679027}</string>
|
||||||
|
<string>{417.16433715820312, 421.16667175292963}</string>
|
||||||
|
</array>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>HeadArrow</key>
|
||||||
|
<string>FilledArrow</string>
|
||||||
|
<key>Legacy</key>
|
||||||
|
<true/>
|
||||||
|
<key>TailArrow</key>
|
||||||
|
<string>0</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{321.11267089843761, 405.16706339518225}, {49, 12}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>FontInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>Font</key>
|
||||||
|
<string>Helvetica</string>
|
||||||
|
<key>Size</key>
|
||||||
|
<real>12</real>
|
||||||
|
</dict>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4067</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs20 \cf0 4: Request}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{101.18773682912195, 295.66660690307623}, {62, 12}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>FontInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>Font</key>
|
||||||
|
<string>Helvetica</string>
|
||||||
|
<key>Size</key>
|
||||||
|
<real>12</real>
|
||||||
|
</dict>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4058</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs20 \cf0 1: Connection}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>LineGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4041</integer>
|
||||||
|
<key>Points</key>
|
||||||
|
<array>
|
||||||
|
<string>{85.896713256836037, 421.41666793823208}</string>
|
||||||
|
<string>{199.00002034505209, 421.16666666666669}</string>
|
||||||
|
</array>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>HeadArrow</key>
|
||||||
|
<string>FilledArrow</string>
|
||||||
|
<key>Legacy</key>
|
||||||
|
<true/>
|
||||||
|
<key>TailArrow</key>
|
||||||
|
<string>0</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>LineGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>31</integer>
|
||||||
|
<key>Points</key>
|
||||||
|
<array>
|
||||||
|
<string>{84.896687825520857, 314.66666126251221}</string>
|
||||||
|
<string>{129.33330790201822, 314.66666126251238}</string>
|
||||||
|
<string>{146.66664123535153, 313.99999459584569}</string>
|
||||||
|
<string>{198, 313.66666134198505}</string>
|
||||||
|
</array>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>HeadArrow</key>
|
||||||
|
<string>FilledArrow</string>
|
||||||
|
<key>Legacy</key>
|
||||||
|
<true/>
|
||||||
|
<key>TailArrow</key>
|
||||||
|
<string>0</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{430.83098347981803, 515.99999999999989}, {36, 14}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4026</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs24 \cf0 Server}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{40.499999999999993, 486.66666666666663}, {31, 14}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>FitText</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>Flow</key>
|
||||||
|
<string>Resize</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4025</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Pad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs24 \cf0 Client}</string>
|
||||||
|
<key>VerticalPad</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</dict>
|
||||||
|
<key>Wrap</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{417.16432189941418, 323.90565299479198}, {63.333332061767578, 185.52200317382812}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4004</integer>
|
||||||
|
<key>ImageID</key>
|
||||||
|
<integer>6</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{205.34386889139773, 289.33333333333331}, {84, 248.66667175292969}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>4023</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Color</key>
|
||||||
|
<dict>
|
||||||
|
<key>b</key>
|
||||||
|
<string>0</string>
|
||||||
|
<key>g</key>
|
||||||
|
<string>0.463735</string>
|
||||||
|
<key>r</key>
|
||||||
|
<string>1</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<dict>
|
||||||
|
<key>Text</key>
|
||||||
|
<string>{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
|
||||||
|
\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
|
{\colortbl;\red255\green255\blue255;\red37\green17\blue0;}
|
||||||
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc
|
||||||
|
|
||||||
|
\f0\fs24 \cf2 mitmproxy}</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>Bounds</key>
|
||||||
|
<string>{{4.6666666467984399, 351.33332316080771}, {102.66666412353516, 130.66667175292969}}</string>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShapedGraphic</string>
|
||||||
|
<key>ID</key>
|
||||||
|
<integer>134</integer>
|
||||||
|
<key>ImageID</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>Shape</key>
|
||||||
|
<string>Rectangle</string>
|
||||||
|
<key>Style</key>
|
||||||
|
<dict>
|
||||||
|
<key>fill</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>shadow</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
<key>stroke</key>
|
||||||
|
<dict>
|
||||||
|
<key>Draws</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>GridInfo</key>
|
||||||
|
<dict/>
|
||||||
|
<key>GuidesLocked</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>GuidesVisible</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>HPages</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>ImageCounter</key>
|
||||||
|
<integer>7</integer>
|
||||||
|
<key>ImageLinkBack</key>
|
||||||
|
<array>
|
||||||
|
<dict/>
|
||||||
|
<dict/>
|
||||||
|
</array>
|
||||||
|
<key>ImageList</key>
|
||||||
|
<array>
|
||||||
|
<string>image6.tiff</string>
|
||||||
|
<string>image3.icns</string>
|
||||||
|
</array>
|
||||||
|
<key>KeepToScale</key>
|
||||||
|
<false/>
|
||||||
|
<key>Layers</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>Lock</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>Name</key>
|
||||||
|
<string>Layer 1</string>
|
||||||
|
<key>Print</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>View</key>
|
||||||
|
<string>YES</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>LayoutInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>Animate</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>circoMinDist</key>
|
||||||
|
<real>18</real>
|
||||||
|
<key>circoSeparation</key>
|
||||||
|
<real>0.0</real>
|
||||||
|
<key>layoutEngine</key>
|
||||||
|
<string>dot</string>
|
||||||
|
<key>neatoSeparation</key>
|
||||||
|
<real>0.0</real>
|
||||||
|
<key>twopiSeparation</key>
|
||||||
|
<real>0.0</real>
|
||||||
|
</dict>
|
||||||
|
<key>LinksVisible</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>MagnetsVisible</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>MasterSheets</key>
|
||||||
|
<array/>
|
||||||
|
<key>ModificationDate</key>
|
||||||
|
<string>2013-01-03 04:13:10 +0000</string>
|
||||||
|
<key>Modifier</key>
|
||||||
|
<string>Aldo Cortesi</string>
|
||||||
|
<key>NotesVisible</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>Orientation</key>
|
||||||
|
<integer>2</integer>
|
||||||
|
<key>OriginVisible</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>PageBreaks</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>PrintInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSBottomMargin</key>
|
||||||
|
<array>
|
||||||
|
<string>float</string>
|
||||||
|
<string>41</string>
|
||||||
|
</array>
|
||||||
|
<key>NSHorizonalPagination</key>
|
||||||
|
<array>
|
||||||
|
<string>coded</string>
|
||||||
|
<string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string>
|
||||||
|
</array>
|
||||||
|
<key>NSLeftMargin</key>
|
||||||
|
<array>
|
||||||
|
<string>float</string>
|
||||||
|
<string>18</string>
|
||||||
|
</array>
|
||||||
|
<key>NSPaperSize</key>
|
||||||
|
<array>
|
||||||
|
<string>size</string>
|
||||||
|
<string>{595.19998741149902, 841.79998779296875}</string>
|
||||||
|
</array>
|
||||||
|
<key>NSPrintReverseOrientation</key>
|
||||||
|
<array>
|
||||||
|
<string>int</string>
|
||||||
|
<string>0</string>
|
||||||
|
</array>
|
||||||
|
<key>NSRightMargin</key>
|
||||||
|
<array>
|
||||||
|
<string>float</string>
|
||||||
|
<string>18</string>
|
||||||
|
</array>
|
||||||
|
<key>NSTopMargin</key>
|
||||||
|
<array>
|
||||||
|
<string>float</string>
|
||||||
|
<string>18</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<key>PrintOnePage</key>
|
||||||
|
<false/>
|
||||||
|
<key>ReadOnly</key>
|
||||||
|
<string>NO</string>
|
||||||
|
<key>RowAlign</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>RowSpacing</key>
|
||||||
|
<real>36</real>
|
||||||
|
<key>SheetTitle</key>
|
||||||
|
<string>Canvas 1</string>
|
||||||
|
<key>SmartAlignmentGuidesActive</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>SmartDistanceGuidesActive</key>
|
||||||
|
<string>YES</string>
|
||||||
|
<key>UniqueID</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>UseEntirePage</key>
|
||||||
|
<false/>
|
||||||
|
<key>VPages</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>WindowInfo</key>
|
||||||
|
<dict>
|
||||||
|
<key>CurrentSheet</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
<key>ExpandedCanvases</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>name</key>
|
||||||
|
<string>Canvas 1</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>Frame</key>
|
||||||
|
<string>{{295, 141}, {974, 874}}</string>
|
||||||
|
<key>ListView</key>
|
||||||
|
<true/>
|
||||||
|
<key>OutlineWidth</key>
|
||||||
|
<integer>142</integer>
|
||||||
|
<key>RightSidebar</key>
|
||||||
|
<false/>
|
||||||
|
<key>ShowRuler</key>
|
||||||
|
<true/>
|
||||||
|
<key>Sidebar</key>
|
||||||
|
<true/>
|
||||||
|
<key>SidebarWidth</key>
|
||||||
|
<integer>120</integer>
|
||||||
|
<key>VisibleRegion</key>
|
||||||
|
<string>{{0, 208}, {550, 469.33333333333337}}</string>
|
||||||
|
<key>Zoom</key>
|
||||||
|
<real>1.5</real>
|
||||||
|
<key>ZoomValues</key>
|
||||||
|
<array>
|
||||||
|
<array>
|
||||||
|
<string>Canvas 1</string>
|
||||||
|
<real>1.5</real>
|
||||||
|
<real>1</real>
|
||||||
|
</array>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
BIN
doc-src/_transparent.graffle/image3.icns
Normal file
BIN
doc-src/_transparent.graffle/image3.icns
Normal file
Binary file not shown.
BIN
doc-src/_transparent.graffle/image6.tiff
Normal file
BIN
doc-src/_transparent.graffle/image6.tiff
Normal file
Binary file not shown.
1096
doc-src/_transparent_https.graffle/data.plist
Normal file
1096
doc-src/_transparent_https.graffle/data.plist
Normal file
File diff suppressed because it is too large
Load Diff
BIN
doc-src/_transparent_https.graffle/image3.icns
Normal file
BIN
doc-src/_transparent_https.graffle/image3.icns
Normal file
Binary file not shown.
BIN
doc-src/_transparent_https.graffle/image6.tiff
Normal file
BIN
doc-src/_transparent_https.graffle/image6.tiff
Normal file
Binary file not shown.
BIN
doc-src/explicit.png
Normal file
BIN
doc-src/explicit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
BIN
doc-src/explicit_https.png
Normal file
BIN
doc-src/explicit_https.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 77 KiB |
341
doc-src/howmitmproxy.html
Normal file
341
doc-src/howmitmproxy.html
Normal file
@ -0,0 +1,341 @@
|
|||||||
|
|
||||||
|
TODO:
|
||||||
|
|
||||||
|
- Clarify terminology: SSL vs TLS
|
||||||
|
|
||||||
|
|
||||||
|
Mitmproxy is an enormously flexible tool. Knowing exactly how the proxying
|
||||||
|
process works will help you deploy it more creatively, and let you understand
|
||||||
|
its fundamental assumptions and how to work around them. This document explains
|
||||||
|
mitmproxy's proxy mechanism by example, starting with the simplest explicit
|
||||||
|
proxy configuration, and working up to the most complicated interaction -
|
||||||
|
transparent proxying of SSL-protected traffic in the presence of SNI.
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page-header">
|
||||||
|
<h1>Explicit HTTP</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Configuring the client to use mitmproxy as an explicit proxy is the simplest
|
||||||
|
and most reliable way to intercept traffic. The proxy protocol is codified in
|
||||||
|
the [HTTP RFC](http://www.ietf.org/rfc/rfc2068.txt), so the behaviour of both
|
||||||
|
the client and the server is well defined, and usually reliable. In the
|
||||||
|
simplest possible interaction with mitmproxy, a client connects directly to the
|
||||||
|
proxy, and makes a request that looks like this:
|
||||||
|
|
||||||
|
<pre>GET http://example.com/index.html HTTP/1.1</pre>
|
||||||
|
|
||||||
|
This is a proxy GET request - an extended form of the vanilla HTTP GET request
|
||||||
|
that includes a schema and host specification, and it includes all the
|
||||||
|
information mitmproxy needs to proceed.
|
||||||
|
|
||||||
|
<img src="explicit.png"/>
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td><b>1</b></td>
|
||||||
|
|
||||||
|
<td>The client connects to the proxy and makes a request.</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td><b>2</b></td>
|
||||||
|
|
||||||
|
<td>Mitmproxy connects to the upstream server and simply forwards
|
||||||
|
the request on.</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page-header">
|
||||||
|
<h1>Explicit HTTPS</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
The process for an explicitly proxied HTTPS connection is quite different. The
|
||||||
|
client connects to the proxy and makes a request that looks like this:
|
||||||
|
|
||||||
|
<pre>CONNECT example.com:443 HTTP/1.1</pre>
|
||||||
|
|
||||||
|
A conventional proxy can neither view nor manipulate an SSL-encrypted data
|
||||||
|
stream, so a CONNECT request simply asks the proxy to open a pipe between the
|
||||||
|
client and server. The proxy here is just a facilitator - it blindly forwards
|
||||||
|
data in both directions without knowing anything about the contents. The
|
||||||
|
negotiation of the SSL connection happens over this pipe, and the subsequent
|
||||||
|
flow of requests and responses are completely opaque to the proxy.
|
||||||
|
|
||||||
|
## The MITM in mitmproxy
|
||||||
|
|
||||||
|
This is where mitmproxy's fundamental trick comes in to play. The MITM in its
|
||||||
|
name stands for Man-In-The-Middle - a reference to the process we use to
|
||||||
|
intercept and interfere with these theoretially opaque data streams. The basic
|
||||||
|
idea is to pretend to be the server to the client, and pretend to be the client
|
||||||
|
to the server. The tricky part is that the Certificate Authority system is
|
||||||
|
designed to prevent exactly this attack, by allowing a trusted third-party to
|
||||||
|
cryptographically sign a server's SSL certificates to verify that the certs are
|
||||||
|
legit. If this signature is from a non-trusted party, a secure client will
|
||||||
|
simply drop the connection and refuse to proceed. Despite the many shortcomings
|
||||||
|
of the CA system as it exists today, this is usually fatal to attempts to MITM
|
||||||
|
an SSL connection for analysis.
|
||||||
|
|
||||||
|
Our answer to this conundrum is to become a trusted Certificate Authority
|
||||||
|
ourselves. Mitmproxy includes a full CA implementation that generates
|
||||||
|
interception certificates on the fly. To get the client to trust these
|
||||||
|
certificates, we register mitmproxy as a CA with the device manually.
|
||||||
|
|
||||||
|
## Complication 1: What's the remote hostname?
|
||||||
|
|
||||||
|
To proceed with this plan, we need to know the domain name to use in the
|
||||||
|
interception certificate - the client will verify that the certificate is for
|
||||||
|
the domain it's connecting to, and abort if this is not the case. At first
|
||||||
|
blush, it seems that the CONNECT request above gives us all we need - in this
|
||||||
|
example, both of these values are "example.com". But what if the client had
|
||||||
|
initiated the connection as follows:
|
||||||
|
|
||||||
|
<pre>CONNECT 10.1.1.1:443 HTTP/1.1</pre>
|
||||||
|
|
||||||
|
Using the IP address is perfectly legitimate because it gives us enough
|
||||||
|
information to initiate the pipe, even though it doesn't reveal the remote
|
||||||
|
hostname.
|
||||||
|
|
||||||
|
Mitmproxy has a cunning mechanism that smooths this over - upstream certificate
|
||||||
|
sniffing. As soon as we see the CONNECT request, we pause the client part of
|
||||||
|
the conversation, and initiate a simultaneous connection to the server. We
|
||||||
|
complete the SSL handshake with the server, and inspect the certificates it
|
||||||
|
used. Now, we use the Common Name in the upstream SSL certificates to generate
|
||||||
|
the dummy certificate for the client. Voila, we have the correct hostname to
|
||||||
|
present to the client, even if it was never specified.
|
||||||
|
|
||||||
|
|
||||||
|
## Complication 2: Subject Alternate Name
|
||||||
|
|
||||||
|
Enter the next complication. Sometimes, the certificate Common Name is not, in
|
||||||
|
fact, the hostname that the client is connecting to. This is because of the
|
||||||
|
optional Subject Alternate Name field in the SSL certificate that allows an
|
||||||
|
arbitrary number of alternate domains to be specified. If the expected domain
|
||||||
|
matches any of these, the client wil proceed, even though the domain doesn't
|
||||||
|
match the certificate Common Name. The answer here is simple: when extract the
|
||||||
|
CN from the upstream cert, we also extract the SANs, and add them to the
|
||||||
|
generated dummy certificate.
|
||||||
|
|
||||||
|
|
||||||
|
## Complication 3: Server Name Indication
|
||||||
|
|
||||||
|
One of the big limitations of conventional SSL is that each certificate
|
||||||
|
requires its own IP address. This means that you couldn't do virtual hosting
|
||||||
|
where multiple domains with independent certificates share the same IP address.
|
||||||
|
In a world with a rapidly shrinking IPv4 address pool this is a problem, and we
|
||||||
|
have a solution in the form of the Server Name Indication extension to the SSL
|
||||||
|
and TLS protocols. This lets the client specify the remote server name at the
|
||||||
|
start of the SSL handshake, which then lets the server select the right
|
||||||
|
certificate to complete the process.
|
||||||
|
|
||||||
|
SNI breaks our upstream certificate sniffing process, because when we connect
|
||||||
|
without using SNI, we get served a default certificate that may have nothing to
|
||||||
|
do with the certificate expected by the client. The solution is another tricky
|
||||||
|
complication to the client connection process. After the client connects, we
|
||||||
|
allow the SSL handshake to continue until just _after_ the SNI value has been
|
||||||
|
passed to us. Now we can pause the conversation, and initiate an upstream
|
||||||
|
connection using the correct SNI value, which then serves us the correct
|
||||||
|
upstream certificate, from which we can extract the expected CN and SANs.
|
||||||
|
|
||||||
|
|
||||||
|
## Putting it all together
|
||||||
|
|
||||||
|
Lets put all of this together into the complete explicitly proxied HTTPS flow.
|
||||||
|
|
||||||
|
<img src="explicit_https.png"/>
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><b>1</b></td>
|
||||||
|
<td>The client makes a connection to mitmproxy, and issues an HTTP
|
||||||
|
CONNECT request.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>2</b></td>
|
||||||
|
|
||||||
|
<td>Mitmproxy responds with a 200 Connection Established, as if it
|
||||||
|
has set up the CONNECT pipe.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>3</b></td>
|
||||||
|
|
||||||
|
<td>The client believes it's talking to the remote server, and
|
||||||
|
initiates the SSL connection. It uses SNI to indicate the hostname
|
||||||
|
it is connecting to.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><b>4</b></td>
|
||||||
|
|
||||||
|
<td>Mitmproxy connects to the server, and establishes an SSL
|
||||||
|
connection using the SNI hostname indicated by the client.</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>5</b></td>
|
||||||
|
|
||||||
|
<td>The server responds with the matching SSL certificate, which
|
||||||
|
contains the CN and SAN values needed to generate the interception
|
||||||
|
certificate.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>6</b></td>
|
||||||
|
|
||||||
|
<td>Mitmproxy generates the interception cert, and continues the
|
||||||
|
client SSL handshake paused in step 3.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>7</b></td>
|
||||||
|
|
||||||
|
<td>The client sends the request over the established SSL
|
||||||
|
connection.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>7</b></td>
|
||||||
|
|
||||||
|
<td>Mitmproxy passes the request on to the server over the SSL
|
||||||
|
connection initiated in step 4.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page-header">
|
||||||
|
<h1>Transparent HTTP</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
When a transparent proxy is used, the HTTP/S connection is redirected into a
|
||||||
|
proxy at the network layer, without any client configuration being required.
|
||||||
|
This makes transparent proxying ideal for those situations where you can't
|
||||||
|
change client behaviour - proxy-oblivious Android applications being a common
|
||||||
|
example.
|
||||||
|
|
||||||
|
To achieve this, we need to introduce two extra components. The first new
|
||||||
|
component is a router that transparently redirects the TCP connection to the
|
||||||
|
proxy. Once the client has initiated the connection, it makes a vanilla HTTP
|
||||||
|
request, which might look something like this:
|
||||||
|
|
||||||
|
<pre>GET /index.html HTTP/1.1</pre>
|
||||||
|
|
||||||
|
Note that this request differs from the explicit proxy variation, in that it
|
||||||
|
omits the scheme and hostname. How, then, do we know which upstream host to
|
||||||
|
forward the request to? The routing mechanism that has performed the
|
||||||
|
redirection keeps track of the original destination. Each different routing
|
||||||
|
mechanism has its own ideosyncratic way of exposing this data, so this
|
||||||
|
introduces the second component required for working transparent proxying: a
|
||||||
|
host module that knows how to retrieve the original destination address from
|
||||||
|
the router. Once we have this information, the process is fairly
|
||||||
|
straight-forward.
|
||||||
|
|
||||||
|
<img src="transparent.png"/>
|
||||||
|
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><b>1</b></td>
|
||||||
|
<td>The client makes a connection to the server.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>2</b></td>
|
||||||
|
|
||||||
|
<td>The router redirects the connection to mitmproxy, which is
|
||||||
|
typically listening on a local port of the same host. Mitmproxy
|
||||||
|
then consults the routing mechanism to establish what the original
|
||||||
|
destination was.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>3</b></td>
|
||||||
|
|
||||||
|
<td>Now, we simply read the client's request...</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><b>4</b></td>
|
||||||
|
|
||||||
|
<td>... and forward it upstream.</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="page-header">
|
||||||
|
<h1>Transparent HTTPS</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
The process for transparently proxying an HTTPS request is a merger of the
|
||||||
|
methods we've outlined for transparently proxying HTTP, and explicitly proxying
|
||||||
|
HTTPS. We use the routing mechanism to establish the upstream server address,
|
||||||
|
and then proceed as for explit HTTPS connections to establish the CN and SANs,
|
||||||
|
and cope with SNI.
|
||||||
|
|
||||||
|
<img src="transparent_https.png"/>
|
||||||
|
|
||||||
|
|
||||||
|
<table class="table">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><b>1</b></td>
|
||||||
|
<td>The client makes a connection to the server.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>2</b></td>
|
||||||
|
|
||||||
|
<td>The router redirects the connection to mitmproxy, which is
|
||||||
|
typically listening on a local port of the same host. Mitmproxy
|
||||||
|
then consults the routing mechanism to establish what the original
|
||||||
|
destination was.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>3</b></td>
|
||||||
|
|
||||||
|
<td>The client believes it's talking to the remote server, and
|
||||||
|
initiates the SSL connection. It uses SNI to indicate the hostname
|
||||||
|
it is connecting to.</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><b>4</b></td>
|
||||||
|
|
||||||
|
<td>Mitmproxy connects to the server, and establishes an SSL
|
||||||
|
connection using the SNI hostname indicated by the client.</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>5</b></td>
|
||||||
|
|
||||||
|
<td>The server responds with the matching SSL certificate, which
|
||||||
|
contains the CN and SAN values needed to generate the interception
|
||||||
|
certificate.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>6</b></td>
|
||||||
|
|
||||||
|
<td>Mitmproxy generates the interception cert, and continues the
|
||||||
|
client SSL handshake paused in step 3.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>7</b></td>
|
||||||
|
|
||||||
|
<td>The client sends the request over the established SSL
|
||||||
|
connection.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><b>7</b></td>
|
||||||
|
|
||||||
|
<td>Mitmproxy passes the request on to the server over the SSL
|
||||||
|
connection initiated in step 4.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -65,12 +65,13 @@ 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("howmitmproxy.html", "How mitmproxy works"),
|
||||||
|
|
||||||
Page("ssl.html", "Overview"),
|
Page("ssl.html", "Overview"),
|
||||||
Page("transparent.html", "Overview"),
|
|
||||||
Directory("certinstall"),
|
Directory("certinstall"),
|
||||||
Directory("scripting"),
|
Directory("scripting"),
|
||||||
Directory("tutorials"),
|
Directory("tutorials"),
|
||||||
|
Page("transparent.html", "Overview"),
|
||||||
Directory("transparent"),
|
Directory("transparent"),
|
||||||
Page("faq.html", "FAQ"),
|
Page("faq.html", "FAQ"),
|
||||||
]
|
]
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
Foo
|
|
BIN
doc-src/transparent.png
Normal file
BIN
doc-src/transparent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
BIN
doc-src/transparent_https.png
Normal file
BIN
doc-src/transparent_https.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 78 KiB |
@ -5,5 +5,3 @@ import socket, tempfile, ssl, subprocess
|
|||||||
|
|
||||||
addr = socket.gethostbyname(sys.argv[1])
|
addr = socket.gethostbyname(sys.argv[1])
|
||||||
print ssl.get_server_certificate((addr, 443))
|
print ssl.get_server_certificate((addr, 443))
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
import sys
|
|
||||||
sys.path.insert(0, "../../")
|
|
||||||
from libmproxy import certutils
|
|
||||||
|
|
||||||
if len(sys.argv) > 2:
|
|
||||||
port = int(sys.argv[2])
|
|
||||||
else:
|
|
||||||
pport = 443
|
|
||||||
|
|
||||||
cn, san = certutils.get_remote_cn(sys.argv[1], port)
|
|
||||||
print cn
|
|
||||||
if san:
|
|
||||||
for i in san:
|
|
||||||
print "\t", i
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user