Compare commits

...

1766 Commits

Author SHA1 Message Date
Aldo Cortesi
9beae933ba Bump version, update CONTRIBUTORS, CHANGELOG 2015-11-06 13:52:08 +13:00
Aldo Cortesi
f16f2b9ce3 Adjust pyinstaller spec paths 2015-11-06 11:44:37 +13:00
Aldo Cortesi
6135e16482 Catch and ignore thread errors on exit
Keyboard interrupts bugger up Queues in some way, which causes a traceback on
exit in many of our tools. The issue seems easiest to reproduce with binary
builds on OSX.
2015-11-06 11:35:54 +13:00
Maximilian Hils
de5df2e4d4 Merge pull request #819 from tekii/hotfix-broken-copy
fix copy to clipboard command when copying content
2015-11-05 04:17:08 +01:00
Marcelo Glezer
6b6b0a9416 fix copy to clipboard command when copying content 2015-11-05 00:09:22 -03:00
Maximilian Hils
fb463f50ed Merge pull request #809 from zbuc/pfctl_errhandling
Better error handling/reporting for pfctl failures on OS X
2015-11-04 21:32:12 +01:00
Chris Czub
9398d5896b PR 809 make code more pythonic 2015-11-04 15:04:18 -05:00
Maximilian Hils
c62abd67d2 docs: fix broken graphic 2015-11-02 13:04:35 +01:00
Maximilian Hils
96db5edc5c docs: improve mode flowchart 2015-11-02 11:50:08 +01:00
Maximilian Hils
51a3378290 improve reverse proxy docs 2015-11-02 10:47:14 +01:00
Maximilian Hils
07b60acb7f try to fix appveyor race conditions in tests 2015-11-01 18:44:50 +01:00
Maximilian Hils
1bf34e6f45 Merge branch 'master' of https://github.com/mitmproxy/mitmproxy 2015-11-01 18:39:55 +01:00
Maximilian Hils
978eb17d66 fix #811 2015-11-01 18:37:20 +01:00
Maximilian Hils
5e90459569 Merge pull request #810 from gecko655/ctrl_fb
Use ctrl+f and ctrl+b to scroll a page
2015-10-31 18:00:14 +01:00
gecko655
6aa7454f92 Use ctrl+f and ctrl+b to scroll a page 2015-10-30 12:48:38 +09:00
Chris Czub
88451ef245 Declare & define insufficient_priv 2015-10-29 16:01:24 -04:00
Chris Czub
70c28f5d34 Better error handling/reporting for pfctl failures on OS X 2015-10-29 15:56:43 -04:00
Maximilian Hils
65c08ec899 Merge pull request #791 from tunz/master
Prevent flowview from creating duplicated windows
2015-10-28 13:10:38 +01:00
Maximilian Hils
8e9cd77b55 Merge pull request #805 from Badg/patch-1
Update ubuntu installation to includ libjpeg
2015-10-23 03:25:23 +02:00
Nick Badger
4537d561c6 Ubuntu install missing libjpeg8-dev, zlib1g-dev
As per https://pillow.readthedocs.org/en/3.0.0/installation.html#linux-installation, to avoid missing install dependencies.
2015-10-22 18:11:06 -07:00
Nick Badger
a6fee43384 Update ubuntu installation to includ libjpeg
Otherwise install fails with error "--enable-jpeg requested but jpeg not found"
2015-10-22 17:38:55 -07:00
Maximilian Hils
ed56eadd28 Merge branch 'master' of https://github.com/mitmproxy/mitmproxy 2015-10-22 02:38:14 +02:00
Maximilian Hils
726b70ccdc fix #800 2015-10-22 02:38:00 +02:00
Maximilian Hils
4d772d7ce0 Merge pull request #801 from ben-lerner/doc_fix
doc typo fix
2015-10-14 09:37:24 +02:00
Ben Lerner
22191d63ab doc typo fix 2015-10-13 21:09:56 -04:00
Maximilian Hils
7d8191ee37 update web builds, use watchify 2015-10-08 12:43:55 +02:00
Maximilian Hils
442f079e0b Merge pull request #797 from colinbendell/colinbendell-patch-1
server_conn.address might not yet be established
2015-10-08 12:37:43 +02:00
Choongwoo Han
9c0efdf2ec Refresh flowview instead of reopen the same flowview 2015-10-08 11:31:33 +09:00
Colin Bendell
a85e4bc75c default should not be None
Fixed default value when self.address has not been set
2015-10-07 21:46:08 -04:00
Colin Bendell
77aeac11a9 Check if server connection hasn't yet been initiated
This fixes #761 when NoneType error is thrown when non-TLS requests initiate a client request but the server connection hasn't yet been initiated.
2015-10-07 20:30:31 -04:00
Maximilian Hils
09e36fae4e Merge pull request #792 from tunz/patch-1
Correct a wrong link in CONTRIBUTING.md
2015-10-04 10:36:52 +02:00
Choongwoo Han
3ffc3404b0 Update CONTRIBUTING.md
Wrong link
2015-10-04 14:49:41 +09:00
Choongwoo Han
45494d1c79 Prevent flowview from creating duplicated windows 2015-10-04 14:21:51 +09:00
Maximilian Hils
ce38a05a20 Merge remote-tracking branch 'origin/master' 2015-10-03 23:59:13 +02:00
Maximilian Hils
26631621ee fix #786 2015-10-03 14:48:51 +02:00
Maximilian Hils
d67f4fa3cc Merge pull request #788 from sethp-jive/patch-1
Allow reading scripts from an anonymous pipe
2015-10-01 00:59:25 +02:00
sethp-jive
fd8c921a2f Allow reading scripts from an anonymous pipe
Bash (and many other shells) provide a nifty feature in "anonymous pipe" or "anonymous fifo" whereby the output of a subshell may be treated as a simple file by the parent shell: http://unix.stackexchange.com/a/156088

Unfortunately, libmproxy complains because that "file" is not a regular file, as os.path.isfile checks, e.g. giving the error "Not a file: /dev/fd/11". This patch is intended to provide for the following use-case:

```
mitmdump -s <(echo "def response(context, flow):\n  flow.response.headers['newheader'] = [`hostname`]")
```

where `hostname` may be replaced with a more complicated lookup.
2015-09-30 15:55:43 -07:00
Maximilian Hils
c6811bd0e8 fix #773 2015-09-28 14:55:13 +02:00
Maximilian Hils
86ef19b450 fix tests 2015-09-28 14:04:41 +02:00
Maximilian Hils
c11ab3676d Merge branch 'http-models' 2015-09-28 13:54:53 +02:00
Maximilian Hils
6661770d4e handle Expect: 100-continue header, fix #770 2015-09-28 10:59:10 +02:00
Maximilian Hils
6075957a97 move tests to netlib 2015-09-27 00:50:14 +02:00
Maximilian Hils
1b6ea5caf3 adjust to netlib response changes + docs 2015-09-26 17:41:14 +02:00
Maximilian Hils
b13acd7956 adjust to netlib request changes + docs 2015-09-26 01:23:59 +02:00
Maximilian Hils
a978c6b9ce fix tests 2015-09-21 23:39:22 +02:00
Maximilian Hils
2536e1d3e7 appveyor: use py.test 2015-09-21 23:05:12 +02:00
Maximilian Hils
bba5ec7144 experimental: run tests using py.tests 2015-09-21 18:31:30 +02:00
Maximilian Hils
88375ad64a fix minor bugs, add py.test compatibility 2015-09-21 02:26:47 +02:00
Maximilian Hils
6d27901b6f fix replay functionality 2015-09-19 11:59:05 +02:00
Maximilian Hils
42bbd3c928 don't cache changed messages, fix #777 2015-09-19 11:50:02 +02:00
Maximilian Hils
fde2420e37 fix #778 2015-09-19 11:18:57 +02:00
Maximilian Hils
2d4a5fb116 experimental: don't interfere with headers, fix #93 2015-09-18 18:07:38 +02:00
Maximilian Hils
66d21fa4ba trigger inline script hooks for artifical responses, fix #775 2015-09-18 13:51:05 +02:00
Maximilian Hils
5df5ee15f2 remove old server replay workaround, fix #774 2015-09-18 13:27:05 +02:00
Maximilian Hils
906360f63f code -> status_code, httpversion -> http_version 2015-09-17 15:16:33 +02:00
Maximilian Hils
12984f149c move body assembly to netlib 2015-09-17 02:40:08 +02:00
Maximilian Hils
14a5f405fd use new netlib exceptions 2015-09-17 02:13:28 +02:00
Maximilian Hils
8fbed971ae Merge pull request #768 from mitmproxy/netlib-http1-refactor
Adjust to netlib changes
2015-09-16 20:24:48 +02:00
Maximilian Hils
0af0608978 adjust to netlib changes 2015-09-16 18:45:22 +02:00
Maximilian Hils
ee6969c1fa s/below/above/ 2015-09-16 13:40:50 +02:00
Maximilian Hils
f5900d1a7b simplify test script 2015-09-16 04:09:05 +02:00
Maximilian Hils
1f3844da89 make pypi happy 2015-09-16 04:08:29 +02:00
Maximilian Hils
774d5b42a2 improve readme 2015-09-16 03:59:22 +02:00
Maximilian Hils
457025df9a Merge pull request #751 from mitmproxy/readthedocs
Move Docs to readthedocs
2015-09-16 02:53:01 +02:00
Maximilian Hils
436a9ea839 minor fixes 2015-09-14 23:58:06 +02:00
Maximilian Hils
32b487109f Merge pull request #765 from mitmproxy/such-colors-very-wow
Improve Content Views
2015-09-12 17:57:21 +02:00
Maximilian Hils
4106e19612 relax test suite time tests 2015-09-12 17:50:24 +02:00
Maximilian Hils
5fe12a467f fix tests 2015-09-12 17:40:30 +02:00
Maximilian Hils
eb2264e91a improve display of non-ascii contents
fixes #283
2015-09-12 17:10:38 +02:00
Maximilian Hils
049d253a83 simplify contentview api 2015-09-12 13:49:16 +02:00
Maximilian Hils
9c31669211 mitmdump: colorize output, add content views 2015-09-11 19:03:50 +02:00
Maximilian Hils
b7b46bac46 content view: fix fallback 2015-09-11 16:40:58 +02:00
Maximilian Hils
02d80631dc Merge pull request #764 from mitmproxy/contentviews
Extract Content Views from Console
2015-09-11 15:31:25 +02:00
Maximilian Hils
47602dc1a5 clean up tests 2015-09-11 13:41:16 +02:00
Maximilian Hils
960f62f363 fix bugs 2015-09-11 13:37:52 +02:00
Maximilian Hils
625a719eb1 completely remove console from contentviews 2015-09-11 12:26:52 +02:00
Maximilian Hils
7c186a4edb Merge branch 'master' into contentviews 2015-09-11 12:13:39 +02:00
Maximilian Hils
dd414e4852 better error messages, remove error cause 2015-09-11 02:17:04 +02:00
Maximilian Hils
40ce06e780 tls layer: fix early peek 2015-09-11 01:47:13 +02:00
Maximilian Hils
ffdf143be4 better exception handling 2015-09-11 01:39:33 +02:00
Maximilian Hils
c159c8ca13 fix chunked encoding 2015-09-11 01:18:17 +02:00
Maximilian Hils
30f0ee40c5 nicer error messages 2015-09-11 00:49:37 +02:00
Maximilian Hils
d1bc966e5b polish for release: introduce http2 and rawtcp as command line switches 2015-09-11 00:00:00 +02:00
Maximilian Hils
33c0d36530 fix exception re-raise 2015-09-10 18:36:50 +02:00
Maximilian Hils
35a99d2faf start reraising exceptions properly 2015-09-10 16:24:22 +02:00
Maximilian Hils
ebba79b655 raw tcp mode: use ssl_read_select 2015-09-10 11:33:03 +02:00
Maximilian Hils
3b6140dfff fix send_response if content is missing 2015-09-10 10:32:08 +02:00
Maximilian Hils
c573d8c292 inline scripts: provide __file__ 2015-09-10 10:31:01 +02:00
Maximilian Hils
cf2b2e0cc7 simplify streaming http layer 2015-09-10 10:20:11 +02:00
Maximilian Hils
61f4319491 http protocol: use new tls attribute 2015-09-09 18:49:32 +02:00
Maximilian Hils
e63ef3a520 add inline script for conditional tls passthrough
fix #646
2015-09-08 21:35:15 +02:00
Maximilian Hils
c3f73552b8 docs: add travis integration 2015-09-08 16:07:27 +02:00
Maximilian Hils
4b8e162a8b Merge branch 'master' into readthedocs 2015-09-08 15:36:37 +02:00
Maximilian Hils
c3ba98b681 docs: update documentedlist, add filter table headers 2015-09-08 15:36:24 +02:00
Maximilian Hils
8dfa15c2d4 whitelist next_layer for @concurrent 2015-09-07 16:05:16 +02:00
Maximilian Hils
d002371d30 expose next_layer to inline scripts 2015-09-07 13:52:58 +02:00
Maximilian Hils
c4286b15dc docs: minor fixes 2015-09-07 10:52:18 +02:00
Maximilian Hils
31ee4607c8 remove old docs 2015-09-07 10:30:40 +02:00
Maximilian Hils
b4013659a8 docs 🎉 2015-09-06 03:20:58 +02:00
Maximilian Hils
eb2334c6cb Merge branch 'master' into readthedocs 2015-09-06 01:37:19 +02:00
Maximilian Hils
853cd81075 docs++ 2015-09-06 01:37:15 +02:00
Maximilian Hils
23e8260a99 finish tools section 2015-09-05 23:50:37 +02:00
Maximilian Hils
a8d931089c fix tests 2015-09-05 20:53:44 +02:00
Maximilian Hils
5125c669cc adjust to new netlib Headers class 2015-09-05 20:45:58 +02:00
Maximilian Hils
1165e35e1b docs++ 2015-09-05 20:15:35 +02:00
Maximilian Hils
1fb28594ed doc: headers class 2015-09-05 13:27:11 +02:00
Maximilian Hils
b62498e125 remove urwid from contentviews 2015-09-04 17:33:21 +02:00
Maximilian Hils
018c693dee remove urwid from contentviews (wip) 2015-09-04 17:07:14 +02:00
Maximilian Hils
74b3b842fe rewrite basic docs for readthedocs 2015-09-04 16:17:55 +02:00
Maximilian Hils
00561d280c speed up filters 2015-09-04 02:11:09 +02:00
Maximilian Hils
e88c7e4c58 Merge branch 'master' into readthedocs 2015-09-04 00:47:04 +02:00
Maximilian Hils
ee8e5947df Merge branch 'master' of https://github.com/mitmproxy/mitmproxy 2015-09-04 00:46:51 +02:00
Maximilian Hils
a18db90ea3 update example inline scripts 2015-09-04 00:46:42 +02:00
Maximilian Hils
2d1c382f38 docs, docs, docs! 2015-09-04 00:45:47 +02:00
Thomas Kriechbaumer
47ab7f04ea http2: Ping frames are handled in netlib 2015-09-03 21:23:19 +02:00
Maximilian Hils
29698aa83c add dev docs 2015-09-03 19:46:58 +02:00
Maximilian Hils
14457f29b3 docs++ 2015-09-03 18:55:38 +02:00
Maximilian Hils
99126f62ed remove depth attribute from set_server 2015-09-03 18:25:36 +02:00
Maximilian Hils
8da683a638 Merge branch 'master' of https://github.com/mitmproxy/mitmproxy 2015-09-03 17:01:37 +02:00
Maximilian Hils
f4272de5ec remove ServerConnectionMixin.reconnect 2015-09-03 17:01:25 +02:00
Thomas Kriechbaumer
3a229f60e3 http2: fix ping response 2015-09-03 14:26:36 +02:00
Thomas Kriechbaumer
1f6d05f89f http2: server can send WindowUpdate frames as well 2015-09-03 14:09:59 +02:00
Thomas Kriechbaumer
bc93600a66 http2: add GoAway support for client 2015-09-03 13:55:13 +02:00
Thomas Kriechbaumer
b4d6f2e12b http2: fix PingFrame again 2015-09-03 13:55:13 +02:00
Thomas Kriechbaumer
29ae2bbf91 http2: fix multiple stream per connection
fixes #746
2015-09-03 13:54:58 +02:00
Thomas Kriechbaumer
bde4bdd1d2 http2: fix unhandled frames 2015-09-03 13:40:35 +02:00
Maximilian Hils
a0f3803233 Merge pull request #748 from Kriechi/tls-ciphers
pass-through ciphers from client to server
2015-09-03 12:57:56 +02:00
Maximilian Hils
7a1e2789a8 Merge pull request #749 from Kriechi/ignore-priority-frames
ignore http2 priority frames
2015-09-03 12:54:54 +02:00
Thomas Kriechbaumer
37e6b3c401 http2: improve unexpected frame handling and shutdown 2015-09-03 11:09:59 +02:00
Maximilian Hils
cc2a6a3919 fix circular imports 2015-09-02 20:56:19 +02:00
Thomas Kriechbaumer
c79af62763 ignore http2 priority frames 2015-09-02 20:50:50 +02:00
Thomas Kriechbaumer
0047ac4cdc pass-through ciphers from client to server 2015-09-02 20:46:14 +02:00
Chris Czub
b4e0be9052 PR #700
Start moving the contentview up a level
Started shifting the contentview class up to libmproxy
2015-09-02 20:30:58 +02:00
Maximilian Hils
c14fbc7794 Merge pull request #741 from mitmproxy/proxy-refactor-cb
Proxy Refactor
2015-09-02 01:16:48 +02:00
Maximilian Hils
f1c8b47b1e better tls error messages, fix #672 2015-09-01 19:24:36 +02:00
Maximilian Hils
2f0d650729 Merge branch 'master' into proxy-refactor-cb 2015-09-01 02:39:59 +02:00
Maximilian Hils
6719aa5986 Merge branch 'proxy-refactor-cb' of https://github.com/mitmproxy/mitmproxy into proxy-refactor-cb 2015-09-01 02:39:57 +02:00
Maximilian Hils
e8de7595c2 .env: fix windows compatibility 2015-09-01 02:37:03 +02:00
Maximilian Hils
b5f1c38e78 minor docs improvements 2015-09-01 02:35:05 +02:00
Maximilian Hils
de10b3f7ec Merge pull request #744 from Kriechi/proxy-refactor-cb
do not log WindowUpdateFrame frames
2015-08-31 23:20:30 +02:00
Thomas Kriechbaumer
c4d6b35726 do not log WindowUpdateFrame frames 2015-08-31 22:22:10 +02:00
Maximilian Hils
481cc6ea84 we don't support socks auth, refs #738 2015-08-31 17:29:14 +02:00
Maximilian Hils
b04e6e56ab update inline script hooks 2015-08-31 17:05:52 +02:00
Maximilian Hils
41e6e538df fix layer initialization 2015-08-31 13:49:47 +02:00
Maximilian Hils
7450bef615 fix dns_spoofing example, avoid connecting to itself 2015-08-31 13:43:30 +02:00
Maximilian Hils
1e9aef5b1e fix upstream proxy server change, update example 2015-08-31 00:14:42 +02:00
Maximilian Hils
63ad4a4f51 coverage++ 2015-08-30 15:59:50 +02:00
Maximilian Hils
a86ec56012 move files around 2015-08-30 15:27:29 +02:00
Maximilian Hils
421b241ff0 remove http2http references 2015-08-30 13:40:23 +02:00
Maximilian Hils
3873e08339 remove old code 2015-08-30 03:42:11 +02:00
Maximilian Hils
08655cb956 Merge remote-tracking branch 'origin/master' into proxy-refactor-cb 2015-08-30 03:24:05 +02:00
Maximilian Hils
21e7f420d2 minor fixes 2015-08-30 03:23:57 +02:00
Maximilian Hils
1dd09a5509 always insert tls layer for inline script upgrades 2015-08-30 02:27:38 +02:00
Maximilian Hils
dd7f50d64b restructure code, remove cruft 2015-08-30 01:21:58 +02:00
Maximilian Hils
100ea27c30 simplify raw tcp protocol 2015-08-29 23:08:16 +02:00
Maximilian Hils
a7058e2a3c fix bugs, fix tests 2015-08-29 20:53:25 +02:00
Maximilian Hils
63844df343 fix streaming 2015-08-29 14:28:11 +02:00
Maximilian Hils
2dfba2105b move sslversion mapping to netlib 2015-08-29 12:34:01 +02:00
Maximilian Hils
1cc48345e1 clean up config/cmdline, fix bugs, remove cruft 2015-08-28 01:51:13 +02:00
Maximilian Hils
a86491eeed Revert "unify SSL version/method handling"
This reverts commit 14e49f4fc7.
2015-08-27 18:37:16 +02:00
Maximilian Hils
5b17496c7e start fixing proxy config 2015-08-27 18:31:15 +02:00
Maximilian Hils
83decd6771 fix inline script redirects 2015-08-27 17:35:53 +02:00
Maximilian Hils
515c024448 handle tls server errors more gracefully 2015-08-27 15:59:56 +02:00
Maximilian Hils
ecfde4247f re-add http1 replay 2015-08-27 15:48:41 +02:00
Maximilian Hils
0f97899fbd re-add --ignore and --tcp 2015-08-27 15:26:21 +02:00
Maximilian Hils
9389c186ba improve travis 2015-08-27 02:57:09 +02:00
Maximilian Hils
23e2d2136c Merge pull request #735 from ender672/disable-mouse-option
console: add command line flag to disable mouse interaction
2015-08-27 01:25:42 +02:00
Maximilian Hils
f6dadc2b0d no more sni double-connects! 2015-08-27 00:07:44 +02:00
Maximilian Hils
9c6b3eb58a clean up clienthello parsing 2015-08-26 22:00:50 +02:00
Maximilian Hils
2cfc1b1b40 fix non-alpn clients 2015-08-26 20:48:59 +02:00
Maximilian Hils
778644d4b8 http2: fix bugs, chrome works 🎉 2015-08-26 15:12:04 +02:00
Maximilian Hils
605af2d3d4 Merge branch 'proxy-refactor-cb' of https://github.com/mitmproxy/mitmproxy into proxy-refactor-cb 2015-08-26 14:03:58 +02:00
Maximilian Hils
aebe342025 improve alpn handling 2015-08-26 14:03:51 +02:00
Maximilian Hils
85b3899126 Merge pull request #739 from Kriechi/proxy-refactor-cb
fix return value and empty requests
2015-08-26 13:49:42 +02:00
Thomas Kriechbaumer
158906444f fix return value and empty requests 2015-08-26 13:48:39 +02:00
Maximilian Hils
1093d185ec manually read tls clienthello 2015-08-26 06:38:03 +02:00
Maximilian Hils
3fa65c48dd manually read tls clienthello [wip] 2015-08-26 05:39:00 +02:00
Maximilian Hils
b19eb2126b update slackin url 2015-08-25 23:40:09 +02:00
Maximilian Hils
8ce0de8bed minor fixes 2015-08-25 18:24:17 +02:00
Maximilian Hils
56a4bc381e request -> request_method 2015-08-24 18:17:04 +02:00
Maximilian Hils
f1f34e7713 fix bugs, fix tests 2015-08-24 16:52:03 +02:00
Thomas Kriechbaumer
05d26545e4 adapt netlib changes 2015-08-21 10:26:28 +02:00
Thomas Kriechbaumer
55cfd259dc http2: simplify protocol-related code 2015-08-20 20:31:01 +02:00
Thomas Kriechbaumer
5746472426 fix typo 2015-08-20 19:53:17 +02:00
Timothy Elliott
fb4af4eb78 console: add command line flag to disable mouse interaction
Adds the --no-mouse command line option to disable the mouse.

Fixes #685
2015-08-19 13:07:39 -07:00
Thomas Kriechbaumer
4339b8e7fa http2: use callback for handle unexpected frames 2015-08-19 21:09:48 +02:00
Maximilian Hils
721bd1c136 Merge pull request #734 from Kriechi/proxy-refactor-cb
move read methods to lower HTTP layer
2015-08-19 18:15:49 +02:00
Thomas Kriechbaumer
f2ace5493b move read methods to lower HTTP layer 2015-08-19 18:09:45 +02:00
Maximilian Hils
eda88428da Merge pull request #733 from Kriechi/proxy-refactor-cb
Proxy refactor cb
2015-08-19 16:44:28 +02:00
Thomas Kriechbaumer
97bfd1d856 move send method to lower layers 2015-08-19 16:36:37 +02:00
Thomas Kriechbaumer
c9fa8491cc improve next_layer detection 2015-08-19 16:32:02 +02:00
Maximilian Hils
b8db81969d make dev installation instructions copy-pasteable 2015-08-19 15:11:32 +02:00
Maximilian Hils
7730d2e0c0 fix virtualenv activation 2015-08-19 15:10:15 +02:00
Maximilian Hils
98583ce870 fix docs typo
refs mitmproxy/mitmproxy.org#7
2015-08-19 14:08:32 +02:00
Thomas Kriechbaumer
26052767a2 Merge pull request #732 from FreeArtMan/master
Fixing issue #710. Prety printing in read_dumpfile
2015-08-19 11:45:27 +02:00
FreeArtMan
4d9bf45e82 Fixing issue #710. Prety printing in read_dumpfile 2015-08-19 09:59:13 +01:00
Thomas Kriechbaumer
9bae97eb17 http2: fix connection preface and wrappers 2015-08-19 09:43:43 +02:00
Thomas Kriechbaumer
cd419300a9 temporarily disable pypy with new openssl on travis 2015-08-18 21:24:40 +02:00
Thomas Kriechbaumer
af6fefb5b4 temporarily disable pypy on travis 2015-08-18 21:14:37 +02:00
Maximilian Hils
ab1549e0ef yield -> callbacks 2015-08-18 15:59:44 +02:00
Maximilian Hils
96de7ad562 various fixes 2015-08-18 14:15:08 +02:00
Maximilian Hils
99129ab5a1 Merge remote-tracking branch 'Kriechi/proxy-refactor' into proxy-refactor
Conflicts:
	libmproxy/protocol2/http.py
2015-08-17 19:20:28 +02:00
Aldo Cortesi
9286f5b5b4 Small tweaks to read_dumpfile example. 2015-08-17 11:29:24 +12:00
Maximilian Hils
a2b8504889 improve protocol handling 2015-08-16 23:25:02 +02:00
Thomas Kriechbaumer
38c456bb62 implement Http1 and Http2 protocols as layers 2015-08-16 15:19:11 +02:00
Maximilian Hils
c04fa1b233 minor fixes 2015-08-16 12:52:34 +02:00
Maximilian Hils
61afac8637 Merge remote-tracking branch 'Kriechi/proxy-refactor' into proxy-refactor
Conflicts:
	libmproxy/protocol2/http_proxy.py
	libmproxy/protocol2/tls.py
	libmproxy/proxy/connection.py
2015-08-16 12:47:13 +02:00
Maximilian Hils
4c31ffd90f minor fixes 2015-08-16 12:43:15 +02:00
Aldo Cortesi
19a17933cc Disable mitmweb OSX binary generation for now 2015-08-16 21:40:41 +12:00
Thomas Kriechbaumer
1e40d34e94 add ALPN to proxy connections 2015-08-16 11:36:31 +02:00
Aldo Cortesi
be498bc1a3 Adapt mitmdump and mitmweb for certifi and release process 2015-08-16 19:55:55 +12:00
Aldo Cortesi
2973a79c59 Adapt mitmproxy.spec for new cryptography, certifi and new release structure 2015-08-16 17:24:40 +12:00
Aldo Cortesi
7e4020213c Remove release tools 2015-08-16 12:31:51 +12:00
Maximilian Hils
a175572447 Merge remote-tracking branch 'Kriechi/proxy-refactor' into proxy-refactor 2015-08-15 20:22:45 +02:00
Maximilian Hils
2a15479cdb fix bugs, make https work 2015-08-15 20:20:46 +02:00
Thomas Kriechbaumer
a9dd82c986 add ALPN to proxy connections 2015-08-15 17:49:40 +02:00
Maximilian Hils
0dd243c5e4 various fixes 2015-08-15 16:26:12 +02:00
Maximilian Hils
747699b126 more work on http protocol 2015-08-14 16:49:52 +02:00
Maximilian Hils
808218f4bc more work on http layer 2015-08-14 10:41:11 +02:00
Maximilian Hils
aef3b626a7 wip commit 2015-08-11 20:32:14 +02:00
Maximilian Hils
026330a3b0 cleaner Exceptions, ssl -> tls, upstream proxy mode 2015-08-11 20:32:13 +02:00
Maximilian Hils
314e0f5839 add reverseproxy mode, fix bugs 2015-08-11 20:32:12 +02:00
Maximilian Hils
aac0ab23eb simplify layer code, add yield_from_callback decorator 2015-08-11 20:32:12 +02:00
Maximilian Hils
c46e3f90bb apply fixes from proxy-refactor-cb branch 2015-08-11 20:32:11 +02:00
Maximilian Hils
531ca4a356 minor fixes 2015-08-11 20:32:10 +02:00
Maximilian Hils
e815915b22 add auto layer, multiple other fixes 2015-08-11 20:32:10 +02:00
Maximilian Hils
c1d016823c move files around 2015-08-11 20:32:09 +02:00
Maximilian Hils
be995ddbd6 add ssl layer 2015-08-11 20:32:09 +02:00
Maximilian Hils
863113f989 first initial proof-of-concept 2015-08-11 20:32:08 +02:00
Maximilian Hils
a9fcef868b Merge pull request #720 from Kriechi/cleanup
move code to netlib
2015-08-11 11:59:37 +02:00
Thomas Kriechbaumer
891fa50e55 move code to netlib 2015-08-10 21:04:17 +02:00
Maximilian Hils
a10c31c698 dev script: fix Linux+vagrant+virtualenv 2015-08-07 14:51:27 +02:00
Maximilian Hils
85f977aacd dev script: fix Windows+vagrant+virtualenv 2015-08-07 14:45:48 +02:00
Maximilian Hils
69ce4c3f14 remove evil unicode_literals 2015-08-06 10:49:41 +02:00
Maximilian Hils
adf2877020 fix #705 2015-08-03 18:07:30 +02:00
Thomas Kriechbaumer
6cce2f14d7 fix tests 2015-08-02 11:26:33 +02:00
Thomas Kriechbaumer
ff1e7e6409 fix imports for encoding 2015-08-01 14:53:34 +02:00
Thomas Kriechbaumer
fa568c2d3b move encoding tests from mitmproxy to netlib 2015-08-01 14:53:20 +02:00
Thomas Kriechbaumer
b732a1cb3d reimplement streaming for HTTP/1 2015-08-01 14:37:33 +02:00
Thomas Kriechbaumer
54866c0faa revert hard-coded HTTP/2 protocol changes 2015-08-01 14:37:33 +02:00
Thomas Kriechbaumer
db02553e2a move code from mitmproxy to netlib 2015-08-01 14:37:32 +02:00
Thomas Kriechbaumer
8a05151170 revert ALPN-related changes to fix master
In the future this should be added again to support HTTP/2.
2015-08-01 14:37:32 +02:00
Aldo Cortesi
c31b6c3c36 Merge pull request #698 from Kriechi/http2-wip
[WIP] Protocol Refactoring for HTTP/2
2015-08-01 11:38:33 +12:00
Thomas Kriechbaumer
4f38c6b90e attach application protocol to connection 2015-07-30 19:53:29 +02:00
Thomas Kriechbaumer
a5d9e1f44d move code to netlib and implement protocols 2015-07-30 13:53:17 +02:00
Thomas Kriechbaumer
89f22f7359 refactor connection & protocol handling 2015-07-30 13:53:17 +02:00
Maximilian Hils
cdc84f52d2 Merge pull request #699 from onlywade/bugfix/docs_update_shortcut_keys
Update docs to reflect current shortcut keys for features which have …
2015-07-30 10:47:12 +02:00
Wade Catron
3346daa65a Update docs to reflect current shortcut keys for features which have been moved into the options menu. 2015-07-29 16:18:49 -07:00
Maximilian Hils
d2ae6b630e Merge pull request #548 from macmantrl/no_serverconn
Prevent unnecessary upstream server connects
2015-07-26 11:58:21 +02:00
Aldo Cortesi
ee163ed5b0 Bump version for dev 2015-07-26 17:46:49 +12:00
Aldo Cortesi
675e70c7eb Changelog for v0.13 2015-07-26 14:21:18 +12:00
Thomas Kriechbaumer
e9bbcfadc1 fix module imports 2015-07-25 20:00:34 +02:00
Thomas Kriechbaumer
07c9d46fab remove debug output in tests 2015-07-24 18:01:55 +02:00
Maximilian Hils
0892649d31 Merge pull request #675 from Kriechi/protocol-refactor
HTTP protocol refactoring
2015-07-24 17:52:44 +02:00
Maximilian Hils
e0d1e8caf6 fix tests 2015-07-24 03:09:08 +02:00
Maximilian Hils
7bf8088d80 improve inline scripts, fix #683, fix #684 2015-07-24 02:57:56 +02:00
Maximilian Hils
9b3fe80697 minor style improvements 2015-07-22 16:00:32 +02:00
Thomas Kriechbaumer
cedc0407de refactor to use netlib.http protocols 2015-07-22 15:30:12 +02:00
Thomas Kriechbaumer
bb265d0c40 use new netlib module names 2015-07-22 15:30:11 +02:00
Thomas Kriechbaumer
df1b0df39f use netlib.http_semantics for generic data 2015-07-22 15:30:11 +02:00
Maximilian Hils
c3c3d28bb1 update build script 2015-07-22 13:49:18 +02:00
Maximilian Hils
fe03a656a9 make build script amazing 2015-07-22 02:43:45 +02:00
Maximilian Hils
d2d2edc140 make build script executable on *nix 2015-07-22 00:44:24 +02:00
Maximilian Hils
170568ded0 fix text selection hint 2015-07-22 00:41:02 +02:00
Maximilian Hils
cacf767b5c bump version 2015-07-22 00:16:38 +02:00
Maximilian Hils
ec02eda0b4 preliminary release script 2015-07-21 19:03:25 +02:00
Maximilian Hils
7fcbbb86cc streamline build process 2015-07-21 17:51:59 +02:00
Maximilian Hils
a08172f6cc fix slack badge 2015-07-17 20:49:58 +02:00
Maximilian Hils
1abd2647b4 Add Slack to README. 2015-07-15 04:20:04 +02:00
Maximilian Hils
822bd10465 Merge pull request #677 from isra17/json_error
Use `ensure_ascii` in wep.app#broadcast
2015-07-14 00:53:32 +02:00
Maximilian Hils
3dcc05ca97 Merge pull request #676 from isra17/master
Add source address filter
2015-07-14 00:42:48 +02:00
isra17
c33df9dd1c Use ensure_ascii in wep.app#broadcast
Otherwise, a non-unicode character in a flow cause mitmweb to crash.
2015-07-13 18:19:33 -04:00
isra17
471e196e08 Add ~src ~dst REGEX filters
This filter allow to match on the request source and destination address
in the form of `<IP>:<Port>`.

Also fixed the parsing grammar to add a `WordEnd` after each filter
name. That way, `~src` doesn't match `~s` instead and keep the behavior
consistent with `~hq` != `~h`.
2015-07-13 18:11:14 -04:00
Maximilian Hils
2af2e60f1f Merge pull request #673 from jlhonora/master
Match g/G shortcuts to less
2015-07-08 18:36:49 +02:00
jlhonora
1ebdda7902 Match g/G shortcuts to less, fix #631 2015-07-08 12:10:03 -03:00
Maximilian Hils
f8243086f6 improve dependency management in setup.py 2015-07-04 19:38:41 +02:00
Maximilian Hils
5a2b121f50 fix #648 2015-07-04 19:11:02 +02:00
Maximilian Hils
08476e988f clarify docs 2015-07-04 17:44:52 +02:00
Maximilian Hils
9960565359 fix #653 2015-07-04 15:46:45 +02:00
Terry Long
4c50c36345 Prevent unecessary upstream server connects
Selectively connect to upstream server based on no_upstream_cert
option. When no_upstream_cert is used during server replay, prevent
connecting to the upstream server unless absolutely necessary.
2015-07-03 07:55:37 -07:00
Maximilian Hils
4c831992aa fix #593, fix #656, coverage++ 2015-07-03 02:47:12 +02:00
Maximilian Hils
9bffd9cf03 fix windows compatibility 2015-07-03 02:46:06 +02:00
Aldo Cortesi
5ad6773e78 Merge pull request #661 from kyle-m/master
Enabling upstream server verification.
2015-06-30 10:51:46 +12:00
Kyle Morton
f0ad1f334c Enabling upstream server verification. Added flags --verify_upstream_cert,
--upstream-trusted-cadir, and --upstream-trusted-ca.
2015-06-29 11:00:20 -07:00
Maximilian Hils
aebad44d55 synchronize metadata files across projects 2015-06-26 23:43:19 +02:00
Maximilian Hils
c8f6bf66fb Merge branch 'appveyor2' 2015-06-26 23:24:31 +02:00
Aldo Cortesi
5f277408cf Merge pull request #654 from mitmproxy/remove_certforward
Remove Certforward Feature
2015-06-27 09:22:41 +12:00
Maximilian Hils
7990503eaf docs: fix certinstall image max-width 2015-06-26 23:04:15 +02:00
Maximilian Hils
643accd5f8 add appveyor 2015-06-26 18:33:31 +02:00
Maximilian Hils
b369962cbe remove certforward feature
The certforward feature was implemented to support #gotofail,
which only works on unpatched iOS devices. Given that many apps don't
support iOS 7 anymore, jailbreak+ssl killswitch is usually the better option.
By removing certforward, we can make netlib a pure python module again,
which significantly simplifies distribution.
2015-06-26 13:27:40 +02:00
Aldo Cortesi
876252eba8 Remove stray print & massage whitespace a bit 2015-06-25 10:27:22 +12:00
Aldo Cortesi
becc790d83 Merge pull request #645 from elitest/hardfailvenv
Add a check to see if virtualenv is installed.
2015-06-24 15:10:41 +12:00
Jim Shaver
080e453425 Merge branch 'master' into hardfailvenv
Conflicts:
	dev
2015-06-23 21:48:05 -05:00
Jim Shaver
db5c0b210b merged with upstream changes in dev 2015-06-23 20:50:51 -05:00
Jim Shaver
854dc004ee revert change, already done on master. 2015-06-23 20:47:36 -05:00
Jim Shaver
951fe2f7ed Add a check to see if virtualenv is installed. 2015-06-23 20:17:57 -05:00
Aldo Cortesi
074d8d7c74 Merge pull request #640 from Kriechi/ssl-version-handling
unify SSL version/method handling
2015-06-23 22:20:10 +12:00
Thomas Kriechbaumer
14e49f4fc7 unify SSL version/method handling 2015-06-23 12:05:34 +02:00
Aldo Cortesi
2c928181e8 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-06-23 14:01:50 +12:00
Aldo Cortesi
237e05c823 Travis to Slack 2015-06-23 14:01:31 +12:00
Aldo Cortesi
e2069d52a8 Merge pull request #638 from iroiro123/http-transparent
HTTP Transparent Proxy
2015-06-23 09:40:25 +12:00
iroiro123
fbb23b5c9f changed error handling (ssl spoof mode) 2015-06-23 01:49:22 +09:00
iroiro123
5c7fa7a594 add unit tests for spoof mode 2015-06-23 00:57:33 +09:00
iroiro123
fd90367329 SSL Spoof mode 2015-06-21 00:51:56 +09:00
iroiro123
378aa78324 Spoof mode 2015-06-20 21:43:50 +09:00
Maximilian Hils
159543dd2b Update README.mkd 2015-06-18 18:10:06 +02:00
iroiro123
59ec291b6c HTTP Transparent Proxy 2015-06-18 23:53:27 +09:00
Thomas Kriechbaumer
e9fecbf830 add landscape/prospector config 2015-06-18 10:31:27 +02:00
Maximilian Hils
36d7e3fcd6 Update README.mkd 2015-06-16 03:05:21 +02:00
Thomas Kriechbaumer
5fea5d7813 fix pep8 config 2015-06-15 12:01:42 +02:00
Aldo Cortesi
7890450b0c Handle invalid IDNA encoding in hostnames
Fixes #622
2015-06-12 16:00:16 +12:00
Aldo Cortesi
fcc1558180 Fix typo in docs - thanks to Jim_Showalter@intuit.com 2015-06-12 14:15:26 +12:00
Aldo Cortesi
85e1ae7543 Merge pull request #624 from drahosj/master
Added flow marking functionality in the console
2015-06-12 13:53:07 +12:00
Jake Drahos
946030367f Added unmark all functionality
- 'U' to unmark all marked flows
2015-06-11 20:31:54 -05:00
Jake Drahos
2a6698bf5a Moved marking from flow to console
No longer taints the flow primitive
2015-06-11 20:27:33 -05:00
Jake Drahos
f2d7a6aa57 Merge remote-tracking branch 'origin/master'
Conflicts:
	libmproxy/console/flowlist.py
2015-06-11 16:34:53 -05:00
Jake Drahos
dd1e401e01 Changed mark symbol
Smaller symbol now, still just as easy to see while scrolling
2015-06-11 16:33:46 -05:00
Jake Drahos
486177edc7 Added functionality to write marked flows to file
w (write) -> m (marked)
2015-06-11 16:25:28 -05:00
Jake Drahos
d45d0ce22a Added functionality to write marked flows to file
w (write) -> m (marked)
2015-06-11 16:15:24 -05:00
Jake Drahos
122ee88021 Unmark duplicated flows
If a marked flow is duplicated, the duplicate will now be unmarked
2015-06-11 12:52:15 -05:00
Jake Drahos
13e71eba10 Changed symbols and colors
Added a better symbol for the mark, and changed the color to red. This helps it
stand out more easily.
2015-06-11 12:02:15 -05:00
Jake Drahos
a34eeb9a28 Fixed console rendering bug
Clearing all flows now works properly
2015-06-11 11:49:23 -05:00
Jake Drahos
e53a2426c1 Marked flows not deleted on clear all
Marked flows survive a clear all unless all current flows are marked.

Bug: They don't show up until another flow is added
2015-06-11 11:40:03 -05:00
Jake Drahos
8b998cfbea Implemented basic marking of flows
- Press m to toggle flow mark
- Flow mark is set in libmproxy/console/common.py. Currently set to "==="
2015-06-11 10:27:48 -05:00
Maximilian Hils
d389b9c59d fix #615 2015-06-08 19:01:32 +02:00
Maximilian Hils
083b404bba fix #618 2015-06-08 18:26:02 +02:00
Thomas Kriechbaumer
c59f045bd9 import travis config from netlib
this enables ALPN support with OpenSSL 1.0.2
2015-06-08 13:39:46 +02:00
David Weinstein
9b70d4bd2a Merge pull request #613 from dweinstein/patch/docker-tweaks
match name of automated build base img
2015-06-07 21:43:26 -04:00
David Weinstein
84b4ca6a65 match name of automated build base img 2015-06-07 11:06:47 -04:00
Aldo Cortesi
60ee1dd3aa Merge pull request #611 from dweinstein/feature/dockerfiles
initial add of docker mitmproxy
2015-06-07 10:12:49 +12:00
David Weinstein
3bd36b58e5 initial add of docker mitmproxy 2015-06-06 00:14:53 -04:00
Aldo Cortesi
bf7b76a997 Merge pull request #610 from tekii/fix-607
Fix 607
2015-06-06 11:10:33 +12:00
Marcelo Glezer
1befa9477c fix #607 fix message 2015-06-05 15:33:36 -03:00
Marcelo Glezer
17b34de28d fix #607 decode data before sending it to pyperclip 2015-06-05 15:19:57 -03:00
Aldo Cortesi
783e904b92 Merge pull request #603 from Kriechi/remove-contrib
replace contrib libraries with pypi dependencies
2015-06-04 13:30:18 +12:00
Aldo Cortesi
249bb4a2ac Bump version 2015-06-04 11:15:29 +12:00
Aldo Cortesi
946fd375fa Changelog for v0.12.1 2015-06-03 09:33:09 +12:00
Thomas Kriechbaumer
fbb2633dd3 replace contrib libraries with pypi dependencies 2015-06-02 10:00:34 +02:00
Aldo Cortesi
0b8cddddf5 console: click-enable tabs 2015-06-02 15:25:58 +12:00
Aldo Cortesi
57a61ae8fd console: convert add_event to a signal. 2015-06-02 13:45:19 +12:00
Aldo Cortesi
776f0a9669 Minor typo in script error. 2015-06-02 11:58:16 +12:00
Aldo Cortesi
1076c25e5b console: click in flow list to view flow 2015-06-02 11:27:26 +12:00
Aldo Cortesi
b5bb4106fd console: mouse scrollwheel throughout. 2015-06-02 11:13:12 +12:00
Aldo Cortesi
62330e4b0f Enable mouse interaction, add a hint for selecting text.
Fixes #597
2015-06-02 11:05:45 +12:00
Maximilian Hils
5e5e73001f Merge pull request #605 from tekii/fix-604
fixes #604 catch method not found for handling pyperclip not found
2015-06-01 18:43:50 +02:00
Marcelo Glezer
14bce0dd12 fixes #604 catch method not found for handling pyperclip not found 2015-06-01 12:06:46 -03:00
Aldo Cortesi
7439e244a6 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-06-01 12:32:03 +12:00
Maximilian Hils
c28cc6fe96 Merge pull request #600 from elitest/print-bracket-fix
Print consistency
2015-05-31 15:20:06 +02:00
Jim Shaver
07cc7f6f50 reverting change in libmproxy/contrib/pyparsing.py 2015-05-31 08:09:03 -04:00
Jim Shaver
bd019a7124 revert changes in ncontrib 2015-05-31 07:59:00 -04:00
Jim Shaver
b51363b3ca Merge remote-tracking branch 'upstream/master' into print-bracket-fix
Conflicts:
	examples/har_extractor.py
	examples/nonblocking.py
	examples/read_dumpfile
	libmproxy/web/app.py
2015-05-31 01:21:44 -04:00
Aldo Cortesi
50df036db5 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-05-31 13:49:21 +12:00
Aldo Cortesi
6c3233ce0c Appease the code style gods. 2015-05-31 13:16:03 +12:00
Maximilian Hils
06fba18106 fix #599 2015-05-31 03:14:14 +02:00
Aldo Cortesi
13ee54da86 Remove dependency on PyOpenSSL, move version check into netlib.
There are a few more functions in the code that accesses PyOpenSSL
directly that should probably also be moved to netlib. Later.
2015-05-31 13:13:12 +12:00
Maximilian Hils
ec92fca8c0 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-05-31 01:51:31 +02:00
Maximilian Hils
0f8e8ee1ad add bench tool for windows 2015-05-31 01:51:13 +02:00
Jim Shaver
4fe2c069cc Fixed print function to be inline with python 3 2015-05-29 23:17:48 -04:00
Aldo Cortesi
a05a70d816 Add coding style check, reformat. 2015-05-30 12:03:28 +12:00
Aldo Cortesi
1a106f4080 Ensure that flow/view state is consistent.
Fixes #595 and #592
2015-05-29 11:36:56 +12:00
Aldo Cortesi
99c691def5 Post-release version bump, and checklist addition. 2015-05-26 10:44:52 +12:00
Aldo Cortesi
6d70b790df release: include resources PyInstaller doesn't record in spec files. 2015-05-25 13:08:32 +12:00
Aldo Cortesi
c098ce8876 docs: widen sidebar 2015-05-25 10:13:01 +12:00
Aldo Cortesi
7fe9f04cce docs: don't show un-necessary collapse target on mobile 2015-05-24 14:29:53 +12:00
Aldo Cortesi
2135bcec61 docs: styles now live in www.mitproxy.org repo, make images responsive 2015-05-24 14:09:51 +12:00
Aldo Cortesi
0a81265661 docs: adjust for countershape changes 2015-05-24 13:16:49 +12:00
Aldo Cortesi
b91999507e Move websitelayout to website. 2015-05-23 12:36:52 +12:00
Aldo Cortesi
3161a5be22 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-05-23 09:44:28 +12:00
Aldo Cortesi
ba070bf947 docs: bootstrap theme + logo 2015-05-22 17:13:58 +12:00
Aldo Cortesi
f816246f4e doc: fix nav in website mode 2015-05-22 11:21:00 +12:00
Maximilian Hils
98bc983dab Merge pull request #591 from Kriechi/autoenv-improvements
improve autoenv script
2015-05-21 13:28:31 +02:00
Thomas Kriechbaumer
b2f87b9424 improve autoenv script
* properly quote DIR variable
  (it might contain spaces)
* use builtin string magic instead of `dirname`
2015-05-21 13:15:55 +02:00
Aldo Cortesi
634f2e2c24 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-05-20 13:13:54 +12:00
Aldo Cortesi
6685c27697 docs: first-pass conversion to bootstrap3
Crappy default styling for now.
2015-05-20 13:12:41 +12:00
Maximilian Hils
26923dd0e4 Update CHANGELOG 2015-05-18 11:17:49 +02:00
Aldo Cortesi
a9f6d53562 certificate docs: reorg, wording, tweaks 2015-05-18 12:05:29 +12:00
Aldo Cortesi
b098556e60 Merge branch 'ssldocs' of https://github.com/elitest/mitmproxy into elitest-ssldocs 2015-05-18 11:23:45 +12:00
Aldo Cortesi
14341ffa19 Merge pull request #584 from dlethin/feature/http_1_0
Make sure proxy returns the httpversion specified in the request
2015-05-18 11:03:05 +12:00
Aldo Cortesi
48e4fb1af9 Merge pull request #585 from TearsDontFalls/master
docs: Single Qoute for ignore pattern with "!"
2015-05-18 11:02:25 +12:00
Aldo Cortesi
33169d610c Release pep: bump version, changelog, contributors 2015-05-18 10:44:09 +12:00
TearsDontFalls
d88c3a0e95 docs: Single Qoute for ignore pattern with "!"
because wouldnt work with default bash settings as its part of history expansion in bash
2015-05-16 11:53:49 +02:00
Doug Lethin
cdff79fd4c Make sure proxy returns the httpversion specified in the request rather
than hardcoding to 1.1.
2015-05-15 22:20:09 -04:00
Maximilian Hils
a8cb8a01a3 docs: add parantheses for ignore parameters. 2015-05-10 20:29:34 +02:00
Maximilian Hils
541a506b5f Merge pull request #576 from nickraptis/req-ts-start
Accurately timestamp start of request
2015-05-08 10:59:03 +02:00
Nick Raptis
202ede3c54 Accurately timestamp start of request
When building a request from a stream, try to get an accurate
start timestamp from the Reader. This was already in the code
and also used when building response objects, but was ommited
in commit ddf458b330

Without his logic and when the client is reusing a connection
to send requests, the timestamp_start of subsequent requests
is early and equal to when the connection started read blocking
2015-05-08 10:58:05 +03:00
Aldo Cortesi
86526eed8d Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-05-03 10:18:48 +12:00
Aldo Cortesi
fcbfe4b605 Adapt to new literal escaping style in pathod 2015-05-03 10:18:18 +12:00
Maximilian Hils
a7d90ccec7 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-05-02 16:24:47 +02:00
Maximilian Hils
62ff239e41 check in last attempt at contenteditable before retreating to inputs 2015-05-02 16:23:57 +02:00
Aldo Cortesi
e1d3ebb446 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-05-02 17:20:09 +12:00
Aldo Cortesi
50b7bfaadc Adapt to new Pathoc API - silence output to stdout. 2015-05-02 16:46:15 +12:00
Maximilian Hils
bb965b8e34 web: try harder to fix editor 2015-05-01 20:45:31 +02:00
Maximilian Hils
c780fc7bdf Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-05-01 17:25:00 +02:00
Maximilian Hils
3f5ca10c39 mitmweb: add editor 2015-05-01 17:24:44 +02:00
Aldo Cortesi
1c26516b18 pretty_size now lives in netlib.utils 2015-04-30 12:18:01 +12:00
Maximilian Hils
90dff4a8a1 Merge pull request #569 from mike-pt/master
Match all freebsd versions and not just freebsd10
2015-04-27 04:41:51 +02:00
Mike C
b942f98f37 + Use sys.platform.startswith("freebsd") instead of matching just freebsd10.
+ This means support for any freebsd version (note that I only tested 11-CURRENT and 9)
2015-04-27 02:31:58 +01:00
Maximilian Hils
ca9dfff4b5 improve docs for win install
Adding Python to PATH during installation is useful,
but doesn't help users who have already installed Python.
The Powershell command takes care of the Scripts directory
as well.
2015-04-26 20:09:20 +02:00
Maximilian Hils
b40133a4f3 Merge pull request #555 from elitest/userinstalldocs
User Installation Documentation update
2015-04-26 19:39:21 +02:00
Maximilian Hils
1742017752 make code more pythonic 2015-04-26 19:25:59 +02:00
Maximilian Hils
417190daa7 Merge remote-tracking branch 'tunz/crash1' 2015-04-26 18:44:40 +02:00
Maximilian Hils
b5690b8103 remove superfluous set_focus 2015-04-26 18:43:27 +02:00
Maximilian Hils
f96e4957b1 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-04-26 18:41:40 +02:00
Maximilian Hils
79e587fe04 fix #568 2015-04-26 18:41:27 +02:00
Jim Shaver
ea8e58f037 Re-org and added platform specific install from source docs, refs: mitmproxy/mitmproxy#398 2015-04-25 00:19:23 -04:00
Maximilian Hils
1c5277b21f Merge pull request #561 from tunz/overwrite
Check overwrite, when save to file instaed of clipboard
2015-04-23 11:35:02 +02:00
Choongwoo Han
ad33d0925f Fix crash when save to clipboard before loading 2015-04-23 15:40:57 +09:00
Choongwoo Han
f4f57e62e5 Check overwrite, when save to file instaed of clipboard 2015-04-23 15:02:57 +09:00
Jim Shaver
bfe57ae113 Moved installing from Source to the bottom. 2015-04-21 10:39:57 -04:00
Aldo Cortesi
10750c9f30 python2 -> python in ./dev
Python 2 is not at python2 in most environments. If we really care, we should
just include an explicit version check at the head of the script.
2015-04-21 13:40:45 +12:00
Aldo Cortesi
37d731aacd Missed some un-needed variable declarations 2015-04-21 11:42:27 +12:00
Aldo Cortesi
ddf458b330 HTTP request reading moves to netlib 2015-04-21 11:05:37 +12:00
Aldo Cortesi
e9ae0b92ba Fudge a rare race condition in the test suite 2015-04-19 18:03:50 +12:00
Aldo Cortesi
ff654730e8 console: make g/G shortcuts work in more contexts 2015-04-17 13:30:49 +12:00
Aldo Cortesi
d20069fcd2 console: more consistent view stack management 2015-04-17 13:06:45 +12:00
Aldo Cortesi
e963a9da48 console: suport unary attributes
Attributes with no value are treated as unary, e.g. "Secure" rather than
"Secure=". If you really want to have an empty attribute value you can
edit the header directly.

Behind the scenes, restructure GridEditor to know about data conversion
in and out of the editor.
2015-04-17 12:54:29 +12:00
Aldo Cortesi
7abaf3c362 console: refactor grideditor, fix a crash on tab for subeditors 2015-04-16 22:01:54 +12:00
Aldo Cortesi
cb880cc65a Adjust header key color in solarized palettes 2015-04-16 12:16:07 +12:00
Aldo Cortesi
52716e3439 console: first pass of a Set-cookie editor for responses 2015-04-16 10:57:12 +12:00
Aldo Cortesi
850a50262b console: add a -l flag to set the limit on startup 2015-04-15 12:56:43 +12:00
Aldo Cortesi
5ff4303124 Adjust for ODict interface change 2015-04-15 10:29:57 +12:00
Aldo Cortesi
f33b483110 Editor for request cookies 2015-04-15 09:43:15 +12:00
Aldo Cortesi
0f269f7423 Whitespace, formatting 2015-04-15 09:14:20 +12:00
Aldo Cortesi
c335c2b533 Add set_cookies method to HTTPResponse 2015-04-14 16:23:51 +12:00
Aldo Cortesi
ab7e2857cc New get_cookies for HttpResponse 2015-04-14 15:14:36 +12:00
Aldo Cortesi
e17eacd8d7 New get_cookie and set_cookie implementations for HTTPRequest 2015-04-14 13:45:38 +12:00
Aldo Cortesi
4652887786 Update docs to reflect non-aliased odict module 2015-04-14 12:04:42 +12:00
Aldo Cortesi
937a358aa9 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-04-14 12:01:37 +12:00
Aldo Cortesi
bea0bd236a Housekeeping and cleanups
- No output to stdout on load in examples - they muck up the test suite.
- Use the odict module directly, rather than aliasing it. The small convenience
this gives to scripters is not worth it.
- Move the cookie tests from the flow test module to the protocol_http test
module.
2015-04-14 11:58:10 +12:00
Maximilian Hils
cbf6cad852 make dev script more robust, fix #556 2015-04-13 17:17:18 +02:00
Jim Shaver
a63634254d Removed logging out added setting variables manually. 2015-04-11 23:17:07 -04:00
Jim Shaver
4a6bdb2564 added the most important part of "sudo apt-get install ..." to the docs 2015-04-11 22:17:26 -04:00
Maximilian Hils
ba149d90ad spaces, not tabs 2015-04-12 03:50:14 +02:00
Maximilian Hils
c0a318566a add flowwriter example 2015-04-12 03:47:58 +02:00
Jim Shaver
d4766d8bd0 Added on page documentation 2015-04-11 20:04:27 -04:00
Jim Shaver
3117dd7733 Removed mitmweb referrences and added On This Page section 2015-04-11 19:41:16 -04:00
Jim Shaver
5b6fb64e60 cleaned up Installing from source section. 2015-04-11 19:02:37 -04:00
Jim Shaver
4731c1bb79 Fixed image name and moved it into the screenshots folder 2015-04-11 17:25:31 -04:00
Jim Shaver
1a5f0e944e Fixed english and made each OS consistent 2015-04-11 17:21:43 -04:00
Jim Shaver
fb0e2bf1f9 Cleaned up Ubuntu docs and added Windows installation information 2015-04-11 16:45:48 -04:00
Maximilian Hils
923503260e add tests 2015-04-10 19:42:32 +02:00
Maximilian Hils
ab2b98b988 fix pretty_host if no host is present 2015-04-10 19:35:42 +02:00
Maximilian Hils
6852eb9d0a fix #553 2015-04-10 14:59:38 +02:00
Jim Shaver
5ca85bc5f4 Minor reorg and add link for Chrome on Linux 2015-04-10 02:20:43 -04:00
Maximilian Hils
f37efecd0a add yappi benchmark tool 2015-04-08 20:43:59 +02:00
Aldo Cortesi
b1d2da19f9 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-04-08 12:00:17 +12:00
Aldo Cortesi
fb0a5d8f63 Add an autoenv file to auto-activate the virtualenv
See https://github.com/kennethreitz/autoenv
2015-04-08 11:59:00 +12:00
Maximilian Hils
0aa2fca25a Merge pull request #544 from ryoqun/websocket-connection-header-case-sensitivity
Make the Websocket's connection header value case-insensitive
2015-04-08 01:23:54 +02:00
Maximilian Hils
1a666bb5db Merge pull request #547 from macmantrl/blank_values
Keep blank query values for flow hashing
2015-04-08 01:22:23 +02:00
Maximilian Hils
f2ad047966 fix tests 2015-04-08 00:33:31 +02:00
Maximilian Hils
74aff39b28 add example which uses filt 2015-04-08 00:21:49 +02:00
Maximilian Hils
e7b154c823 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-04-08 00:20:37 +02:00
Maximilian Hils
2242c671fd allow passing custom argv to libmproxy.main 2015-04-08 00:20:32 +02:00
Maximilian Hils
b961f9e599 Merge pull request #543 from legendtang/master
web: fix delete flows
2015-04-08 00:05:04 +02:00
Jim Shaver
6c6639a78a Cleaned up wrapping and added links to external CA instructions. 2015-04-07 01:33:45 -04:00
Aldo Cortesi
8e2e83a3c6 console: add g/G shortcuts throughout
g: go to end
G: go to beginning
2015-04-07 16:13:42 +12:00
Aldo Cortesi
e76467e977 Refactor flow list state management
- Use signal mechanism for state synchronisation
- Move "Copy to clipboard" shortcut to "P"
2015-04-07 15:59:38 +12:00
Aldo Cortesi
c7b1234e13 consone: don't enter Options if it's already open 2015-04-07 12:26:56 +12:00
Aldo Cortesi
6bab6f2ef1 console: tune palettes a bit 2015-04-07 11:36:42 +12:00
Aldo Cortesi
94cd704f73 console: toggle palette transparency from options, indicate selected palette 2015-04-07 10:11:25 +12:00
Aldo Cortesi
f6a3bd15b3 console: All palettes now explicitly set a background colour
There's a new option --palette-transparent to turn this off if you want
to use your own terminal background.
2015-04-07 10:01:18 +12:00
Aldo Cortesi
1cb1ee411b console: palette picker for the options screen 2015-04-07 08:42:40 +12:00
Aldo Cortesi
538f215458 console: factor out selection widget 2015-04-06 18:28:51 +12:00
Aldo Cortesi
0d6de19b07 console: sticky cookies and auth to options screen 2015-04-06 17:30:12 +12:00
Aldo Cortesi
c4e0f9d8d7 console: TCP proxy patterns to new options screen 2015-04-06 17:19:52 +12:00
Aldo Cortesi
ec7572697a console: default display mode to new options screen 2015-04-06 17:14:32 +12:00
Aldo Cortesi
acb6b5667c console: scripts to new options screen 2015-04-06 17:11:02 +12:00
Aldo Cortesi
488adcb79e console: replacement patterns to new option screen 2015-04-06 17:05:52 +12:00
Aldo Cortesi
15246c3403 console: ignore patterns to new options screen. 2015-04-06 17:02:51 +12:00
Aldo Cortesi
9e39999706 Add headings to options, start migrating more options into options screen
SetHeaders first...
2015-04-06 16:47:58 +12:00
Legend Tang
20d3d7e1b8 Merge https://github.com/mitmproxy/mitmproxy 2015-04-06 11:28:20 +08:00
Aldo Cortesi
3704411466 Minimal help context for options 2015-04-03 20:04:19 +13:00
Aldo Cortesi
aadaa66d0b console: tune and re-enable palettes 2015-04-03 19:44:09 +13:00
Aldo Cortesi
ddc353955d Don't list all options shortcuts in help 2015-04-03 19:10:12 +13:00
Terry Long
6a24a4e3c5 Keep blank query values for flow hashing 2015-04-02 22:10:01 -07:00
Aldo Cortesi
41a1a0bef3 console: C to clear all options, correct footer in options screen 2015-04-03 14:47:55 +13:00
Aldo Cortesi
57bdb89342 console: keyboard shortcuts for options 2015-04-03 14:38:04 +13:00
Aldo Cortesi
65971f02ad console: basic options page 2015-04-03 14:10:57 +13:00
Aldo Cortesi
fe6957eddb console: fix a crash that sometimes occurs when setting a limit 2015-04-01 10:47:28 +13:00
Aldo Cortesi
c794d362f9 Next/previous tab keybindings 2015-04-01 10:34:58 +13:00
Aldo Cortesi
32ba6021b3 console: improve handling of help contexts, fix key bindings in flow views 2015-04-01 09:25:50 +13:00
Ryo Onodera
9674a0869c Make the Websocket's connection header value case-insensitive 2015-03-31 16:07:04 +09:00
Aldo Cortesi
44fb42185f console: fix body scrolling 2015-03-31 15:59:54 +13:00
Aldo Cortesi
82997cb311 Fix timestamps in detail view
- Fix a crash when connection timestamps don't exist yet
- Fix display of response timestamps
- Get rid of those colossal ternaries. I want a device that pokes people in the
eye every time they try to use a ternary operator.
2015-03-31 09:49:07 +13:00
Legend Tang
269571efe5 web: fix delete flows 2015-03-30 20:18:56 +08:00
Maximilian Hils
5977e844e7 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-03-30 03:49:59 +02:00
Maximilian Hils
6d29f93e9e web: add prompt for keyboard navigation 2015-03-30 03:49:50 +02:00
Aldo Cortesi
ad08b80c43 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-03-30 11:54:14 +13:00
Aldo Cortesi
e964983e81 Disable keystrokes requiring a request/response on details page 2015-03-30 11:53:10 +13:00
Maximilian Hils
737002921e s/filter/search/
no matter what we agree on in #542,
this needs to be done anyway.
2015-03-30 00:46:33 +02:00
Aldo Cortesi
a32698fc04 Update statusbar when flow list is cleared. 2015-03-30 10:34:02 +13:00
Aldo Cortesi
8f5cf833d0 Add flow detail view as a tab in the flow view 2015-03-29 19:24:37 +13:00
Aldo Cortesi
cacd09fafc console: add a tabs widget, and use it for flowview. 2015-03-29 17:40:43 +13:00
Aldo Cortesi
cfeee347d9 Simplify content generation in flow view 2015-03-29 15:54:29 +13:00
Aldo Cortesi
8f0e4a9bdd console: simplify view modes. 2015-03-29 15:27:17 +13:00
Aldo Cortesi
bdc2fda7ef Seems more natural to re-prompt for search every time 2015-03-29 15:16:20 +13:00
Aldo Cortesi
80c4de5ca4 Keep record of last search term 2015-03-29 15:14:56 +13:00
Aldo Cortesi
bf012e0a89 Zap old search tests 2015-03-29 14:49:57 +13:00
Aldo Cortesi
92ce91efac Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-03-29 14:46:10 +13:00
Aldo Cortesi
e4738bdd39 Fix search wrap-around offsets. 2015-03-29 14:39:47 +13:00
Aldo Cortesi
8a0404ddf8 Beginning of a simpler and more flexible search implementation 2015-03-29 14:32:36 +13:00
Maximilian Hils
93d1d0416d web: add more keyboard shortcuts 2015-03-29 03:24:03 +02:00
Maximilian Hils
fd911b75e6 web: global key handling 2015-03-29 01:45:37 +01:00
Maximilian Hils
1913975fa6 web: use contexts to pass down stores.
Using contexts frees us from the contracts we have
using props - namely, we can assume them to be constant
for the lifetime of the object.
2015-03-27 21:58:04 +01:00
Maximilian Hils
f39e6c5c18 web: minor ux improvements 2015-03-27 18:51:25 +01:00
Maximilian Hils
dcb42b3016 web: fix react-router 2015-03-27 16:54:21 +01:00
Maximilian Hils
11b082c998 Merge remote-tracking branch 'vzvu/react-router-0.13.2'
Conflicts:
	libmproxy/web/static/vendor.js
2015-03-27 16:17:35 +01:00
Maximilian Hils
42cd942b64 web: initial attempt at header editor 2015-03-27 15:30:19 +01:00
vzvu3k6k
d65a4b6100 web: upgrade to react-router 0.13.2 2015-03-27 04:32:38 +09:00
Maximilian Hils
04f2467e84 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-03-26 18:17:36 +01:00
Maximilian Hils
9854379046 web: backup flows on edit 2015-03-26 18:17:30 +01:00
Maximilian Hils
423530fc25 Merge pull request #515 from krzysiekbielicki/master
[#514] Add support for ignoring payload params in multipart/form-data
2015-03-26 18:16:31 +01:00
Maximilian Hils
9a328c12a4 Merge pull request #538 from peralta/patch-1
mitmweb: start onboarding app if instructed to
2015-03-26 17:26:50 +01:00
peralta
901bf018c0 mitmweb: start onboarding app if instructed to 2015-03-26 17:20:32 +01:00
Maximilian Hils
d08fc33f35 Merge pull request #537 from tekii/fix530
fix #530 set client_playback to None when client_playback is done
2015-03-26 14:06:56 +01:00
Maximilian Hils
13860cf6b4 Merge pull request #536 from tekii/master
fixed exception in mitmproxy -c fix #535
2015-03-26 14:06:46 +01:00
Marcelo Glezer
ab7281ec04 fix #530 set client_playback to None when client_playback is done 2015-03-25 17:40:25 -03:00
Marcelo Glezer
fb17eea5e0 fix #535 server replay was failing from ui but working from command line (fixed now too) 2015-03-25 17:12:38 -03:00
Marcelo Glezer
c5f153f8d0 fix #535 now works with both cases: using -c from command line and pressing c in the ui 2015-03-25 17:07:31 -03:00
Marcelo Glezer
e6a8863c51 fixed exception in mitmproxy -c fix #535 2015-03-25 16:57:28 -03:00
Maximilian Hils
b0f60cf1f2 Merge pull request #532 from tekii/master
handles UnicodeDecodeError (#531)
2015-03-25 12:47:13 +01:00
Marcelo Glezer
f45ac12d20 handles UnicodeDecodeError 2015-03-23 23:57:18 -03:00
Maximilian Hils
968c7021df web: add basic edit capability for first line 2015-03-23 00:24:56 +01:00
Maximilian Hils
2acd77dea0 web: add content download 2015-03-22 15:29:55 +01:00
Maximilian Hils
39a8ac7e2a web: improve views 2015-03-22 15:19:35 +01:00
Maximilian Hils
cf9f91b0b4 web: upgrade to react 0.13 2015-03-22 14:33:42 +01:00
Aldo Cortesi
6fb661dab5 Unwind twisty maze of cache layers. Holy confusing, Batman. 2015-03-22 21:08:18 +13:00
Aldo Cortesi
842e23d3e3 Replace far-too-clever decorator LRU cache with something simpler 2015-03-22 21:00:41 +13:00
Aldo Cortesi
a2da38cc83 Whitespace, indentation, formatting 2015-03-22 17:33:25 +13:00
Aldo Cortesi
15f65d63f6 Trigger flow change when flow elements are edited 2015-03-22 17:28:13 +13:00
Aldo Cortesi
a1c21d9774 Fix unit tests 2015-03-22 17:23:27 +13:00
Aldo Cortesi
08bb076533 console: signal-based view stack, unifying mechanisms for help, flow views, etc. 2015-03-22 17:18:53 +13:00
Aldo Cortesi
120c8db8a4 console: refactor the way we keep global view state 2015-03-22 16:59:11 +13:00
Aldo Cortesi
aa9a38522f Remove refresh_flow mechanism in favor of a signal-based implementation 2015-03-22 15:58:32 +13:00
Aldo Cortesi
7a119ac7d7 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-03-22 15:40:48 +13:00
Aldo Cortesi
c9a0975446 console: observe state objects for changes, fire event to update status bar. 2015-03-22 15:11:54 +13:00
Maximilian Hils
9415846232 web: raw content view 2015-03-22 02:25:47 +01:00
Aldo Cortesi
200498e7aa Simplify the way in which path prompts keep state
In the past, we kept the last path the user specified for a number of different
path types to pre-seed the path prompt. Now, we no longer distinguish between
types, and pre-seed with the last used directory regardless.
2015-03-22 14:14:44 +13:00
Aldo Cortesi
572000aa03 Rationalise prompt calling conventions 2015-03-22 13:59:34 +13:00
Aldo Cortesi
3bf4feb213 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-03-22 13:33:11 +13:00
Aldo Cortesi
89383e9c13 Refactor status bar prompting to use signal system 2015-03-22 13:32:24 +13:00
Maximilian Hils
89d66360d6 tweak css 2015-03-22 00:28:08 +01:00
Maximilian Hils
1143552e16 web: add content views 2015-03-22 00:21:38 +01:00
Maximilian Hils
02a61ea45d structure components 2015-03-21 22:49:51 +01:00
Maximilian Hils
ac5d74d42c web: fix bugs 2015-03-21 21:55:02 +01:00
Aldo Cortesi
381a563067 Status bar message expiry based on signals and Urwid main loop 2015-03-21 12:37:00 +13:00
Aldo Cortesi
8725d50d03 Add blinker dependency, start using it to refactor console app
Blinker lets us set up a central pub/sub mechanism to disentangle our object
structure.
2015-03-21 11:19:20 +13:00
Aldo Cortesi
b475c8d6ea Add window.py import missed in refactoring 2015-03-20 15:22:05 +13:00
Aldo Cortesi
c182133d64 console: pull primary window frame management out into window.py 2015-03-20 13:26:08 +13:00
Aldo Cortesi
2f8ebfdce2 Pull console StatusBar into its own file. 2015-03-20 11:08:04 +13:00
Aldo Cortesi
241530eb0a Remove cruft to work around an old Urwid bug 2015-03-20 11:03:46 +13:00
Aldo Cortesi
558e0a41c2 Fix general prompt input. 2015-03-20 11:00:24 +13:00
Aldo Cortesi
560e44c637 Pull PathEdit out into its own file. 2015-03-20 10:54:57 +13:00
Aldo Cortesi
a3f4296bf1 Explicitly handle keyboard interrupt in mitmproxy
Fixes #522
2015-03-20 10:02:34 +13:00
Aldo Cortesi
d7e53e6573 Fix crashes on mouse click when input is being handled 2015-03-20 09:30:29 +13:00
Jim Shaver
998c9c49c4 Merge branch 'master' of github.com:mitmproxy/mitmproxy into ssldocs 2015-03-19 15:58:53 -04:00
Maximilian Hils
97c6d7ed25 onboarding app: serve certs inline to unbreak firefox 2015-03-19 16:29:05 +01:00
Maximilian Hils
51856b7ccd Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-03-19 16:18:41 +01:00
Maximilian Hils
a2cbfb117b fix webapp on Windows
- the p12 file needs a ".p12" extension. simply naming the file "p12"
  isn't sufficient
2015-03-19 16:17:44 +01:00
Aldo Cortesi
b47019293e Nicer Solarized palettes, using the correct terminal values 2015-03-19 20:49:43 +13:00
Aldo Cortesi
7e9a5e66fe Reinstate solarized_dark and solarized_light palettes. 2015-03-19 18:42:03 +13:00
Aldo Cortesi
32a674948f Less painful light heading bar palette
lowlight remains painful due to background color restrictions.
2015-03-19 18:29:06 +13:00
Aldo Cortesi
05d1b99043 No output to stdout in the test suite, please. 2015-03-19 18:10:21 +13:00
Aldo Cortesi
1d5fcc6e0e Revamp palette specification
- Split low-color and high-color specifications in palettes.
- Split off light, dark, lowlight and lowdark palettes. Lowlight and lowdark
will be the low-color base for most subsequent palettes.
- Add a small script that makes test pattern requests to pathod.
2015-03-19 18:05:30 +13:00
Aldo Cortesi
b77e511fca Merge pull request #526 from tekii/fix-522
fix for #522
2015-03-19 11:40:53 +13:00
Marcelo Glezer
7c75f4d0db test/test_console_help.py fixed 2015-03-18 13:49:33 -03:00
Marcelo Glezer
8feebcbf8e fix for #522 2015-03-18 12:56:12 -03:00
Jim Shaver
36bec7b77e now actually tracking ssl.html 2015-03-18 00:29:54 -04:00
Jim Shaver
972f612090 Merge remote-tracking branch 'upstream/master' 2015-03-18 00:25:22 -04:00
Jim Shaver
e0e36f5dae consolidated down all SSL documentation into one document 2015-03-18 00:22:18 -04:00
Maximilian Hils
5721e5bd27 require urwid 1.3 2015-03-18 00:05:57 +01:00
Maximilian Hils
29e529a69e Merge pull request #523 from tekii/fix-client-replay-key
fixes crash pressing 'c':client-replay in mitmproxy
2015-03-17 21:43:21 +01:00
Marcelo Glezer
75d4563af0 fixes crash pressing 'c':client-replay in mitmproxy 2015-03-17 16:39:52 -03:00
Jim Shaver
f3dab52a62 Better english 2015-03-17 00:30:18 -04:00
Jim Shaver
968d94d471 Removes all of the platform specific certificate installation instructions. 2015-03-17 00:26:42 -04:00
Maximilian Hils
40c242c3f6 add table sort 2015-03-17 03:05:59 +01:00
Krzysztof Bielicki
953f9aa641 Added tests 2015-03-16 10:23:50 +01:00
Maximilian Hils
4a92c42517 web: smaller changes 2015-03-15 22:05:50 +01:00
Maximilian Hils
3650d73662 Merge remote-tracking branch 'onlywade/master'
Conflicts:
	libmproxy/console/__init__.py
	libmproxy/console/flowlist.py
2015-03-15 14:36:06 +01:00
Maximilian Hils
47091c8db5 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-03-15 03:09:00 +01:00
Maximilian Hils
7b58fe5142 mitmdump: improve request printing 2015-03-15 03:08:45 +01:00
Maximilian Hils
5b4d54c829 mitmdump: decode flow before printing 2015-03-15 02:53:05 +01:00
Maximilian Hils
7242654d7d Merge pull request #519 from legendtang/master
update package.json during transition period, see #518
2015-03-15 00:03:03 +01:00
Legend Tang
d7ae3bb638 update package.json during transition period, see #518 2015-03-15 02:27:43 +08:00
Maximilian Hils
274e6217de Merge pull request #517 from mitmproxy/virtualenv-win
simplify virtualenv
2015-03-14 03:10:14 +01:00
Maximilian Hils
e9a5a26bf0 ./dev: echo what we have done 2015-03-14 03:08:34 +01:00
Maximilian Hils
f309eb3526 Update README.mkd 2015-03-14 02:42:50 +01:00
Maximilian Hils
f815525f18 simplify virtualenv
- add dev.bat for Windows users
- remove ~/.pipcache creation.
  If that causes issues with PyInstaller, we should use
  pip --no-cache-dir there or rm -r pip.locations.USER_CACHE_DIR.
- remove superfluous pip install calls.
2015-03-14 02:33:21 +01:00
Maximilian Hils
9522610866 travis: fix coveralls 2015-03-14 02:20:45 +01:00
Aldo Cortesi
a4f500c82e Indentation, style, whitespace 2015-03-13 23:14:37 +11:00
Aldo Cortesi
60dce08d54 Remove compatibility shim used to interop with older versions of Urwid 2015-03-13 23:04:07 +11:00
Aldo Cortesi
87a3c71041 Formatting and whitespace 2015-03-13 22:29:21 +11:00
Aldo Cortesi
468cc81c8a Style & whitespace 2015-03-13 22:07:35 +11:00
Aldo Cortesi
488bcaca6f Integrate Urwid's MainLoop in console mitmproxy
Urwid's method for accumulating multi-character escape codes is now tied
up with its main loop, which means we can't avoid it. This commit fixes
a range of issues (like escape not working to exit editable fields), and
also improves responsiveness.
2015-03-13 21:58:22 +11:00
Aldo Cortesi
0d59c2da97 Better error when invalid palette is specified 2015-03-12 22:56:47 +11:00
Aldo Cortesi
04e9260b74 Re-enable OSX binary builds for mitmproxy and mitmweb 2015-03-12 22:52:46 +11:00
Aldo Cortesi
40366fa94e Virtualenv is the one and only recommended dev environment
- Create a "dev" script to create a virtualenv-based dev environment
- Update the docs to remove non-virtualenv install recommendations
- Update osx-binaries generation to use virtualenv

TODO:
- The dev script or an equivalent should be made to work on Windows
- We still can't remove the annoying top-level command scripts, because
pyinstaller doesn't support entry points. Once it does, they can go.
2015-03-12 22:12:15 +11:00
Aldo Cortesi
de3f84934d Test suite should pass even if example dependencies are not present 2015-03-12 16:57:10 +11:00
Aldo Cortesi
dfc1b39164 Update for latest master of PyInstaller 2015-03-12 13:26:21 +11:00
Maximilian Hils
a8c074054a Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-03-11 13:11:55 +01:00
Maximilian Hils
937eb839ed fix sourcemaps 2015-03-11 13:11:41 +01:00
Maximilian Hils
2f40a6fd78 improve source map generation 2015-03-11 11:13:20 +01:00
Krzysztof Bielicki
244ef243d7 [#514] Add support for ignoring payload params in multipart/form-data 2015-03-10 10:44:06 +01:00
Maximilian Hils
ec4a6ec4e5 Merge pull request #509 from suyash/mitmweb-add-sourcemap-generation
add sourcemap generation for scripts-app-dev task
2015-03-08 21:09:06 +01:00
Wade Catron
803d631f04 Adding a server replay option to ignore host when searching for matching requests 2015-03-08 10:21:57 -07:00
Maximilian Hils
a78eb12e1a Merge remote-tracking branch 'suyash/mitmweb-add-sourcemap-generation' 2015-03-07 01:42:06 +01:00
Maximilian Hils
15a8a93a4e adjust to changed netlib api 2015-03-07 01:39:01 +01:00
Suyash
e47f9738ec add sourcemap generation for scripts-app-dev task 2015-03-07 01:47:50 +05:30
Maximilian Hils
353a6ace47 Merge remote-tracking branch 'legend/master'
Conflicts:
	libmproxy/web/static/app.js
2015-03-06 10:05:12 +01:00
Maximilian Hils
60dc5e0fe3 add mitmweb executable 2015-03-06 10:03:11 +01:00
Maximilian Hils
8c1978b7bf Merge pull request #507 from legendtang/fix_flowactions
fix #506
2015-03-06 10:00:50 +01:00
Legend Tang
de306e6aeb fix #506 2015-03-06 16:54:18 +08:00
Legend Tang
0b57f851bd another clean up for #503 #504 2015-03-06 04:03:52 +08:00
Legend Tang
98c0047b4e clean up for #503 #504 2015-03-06 03:57:38 +08:00
Legend Tang
36db55f662 Replace addListener method with multiple bindings, fix for #503 504 2015-03-06 03:45:58 +08:00
Legend Tang
b903dd4e4a Revert "revert to custom EventEmitter, workaround for #504"
This reverts commit fa8fc64ce0.
2015-03-06 03:29:15 +08:00
Legend Tang
fa8fc64ce0 revert to custom EventEmitter, workaround for #504
It's an EventEmitter issue.
2015-03-06 02:51:57 +08:00
Maximilian Hils
300868edff clean up web builds 2015-03-05 01:52:47 +01:00
Maximilian Hils
4c95c68041 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-03-04 23:07:04 +01:00
Maximilian Hils
f45f3dd4f1 update docs 2015-03-04 23:06:58 +01:00
Maximilian Hils
8f7ba4ab45 Merge pull request #500 from sunu/master
improvement to PR #496
2015-03-04 18:16:19 +01:00
Tarashish Mishra
48023db59e Minor refactor to PR #496 2015-03-04 22:32:01 +05:30
Marcelo Glezer
b49d573c8b sorted timing information by timestamp 2015-03-03 18:38:16 -03:00
Marcelo Glezer
485003511b removed unused parameter 2015-03-03 17:49:47 -03:00
sentient07
ff6bfba4a6 Documentation for the client side certificate is added 2015-03-03 21:32:54 +05:30
Marcelo Glezer
8a672b7955 minor refactor 2015-03-03 00:55:23 -03:00
Marcelo Glezer
f514eacd7a added timing information to FlowDetailView 2015-03-03 00:44:31 -03:00
Marcelo Glezer
58dba3f490 fixed formatting and added a 'test' (sort of) 2015-03-02 23:22:44 -03:00
Marcelo Glezer
91e5a4a4b5 #487 added microsecond support to format_timestamp and used in FlowDetailView. Still WIP. 2015-03-02 18:30:46 -03:00
Marcelo Glezer
8008a4336d Merge pull request #2 from mitmproxy/master
update to mitmproxy/master
2015-03-02 14:37:30 -03:00
Maximilian Hils
e65a8659f0 Merge pull request #489 from tekii/feature-487
added time elapsed between request sent and response received
2015-03-02 14:40:22 +01:00
Maximilian Hils
75ba0a92e4 do some housekeeping 2015-03-02 14:35:50 +01:00
Maximilian Hils
7cf1ec7435 Merge pull request #493 from elitest/master
Adding support for server facing SSL cipher suite specification
2015-03-02 14:25:14 +01:00
elitest
5e07fe08ea Update Server.py to fix SNI handling
Forgot to change ciphers->client_ciphers.
2015-03-02 00:19:06 -06:00
elitest
c6f54605a7 Update Config.py to clarify help messages 2015-03-01 20:49:03 -06:00
elitest
13e74facb6 Update config.py 2015-03-01 20:21:35 -06:00
Jim Shaver
ac92df0fda Un-executable'd setup.py 2015-03-01 20:13:47 -06:00
Jim Shaver
b063d6020f specified cipher_list in a few more locations, added a missing comma 2015-03-01 20:12:27 -06:00
Marcelo Glezer
09828ff2d9 changes requested by @mhils 2015-03-01 22:19:32 -03:00
Maximilian Hils
dff70150f5 Merge pull request #492 from mitmproxy/entrypoints
use entry_points for Windows support
2015-03-02 00:31:42 +01:00
elitest
6a1e294149 Update Server.py to improve cipher selection
Differentiated client ciphers and added server ciphers.
2015-02-28 11:07:18 -06:00
elitest
0b7b0ac33d Update Config.py to improve cipher selection
added support for specifying cipher suites on both sides of the proxy instead of just the one.
2015-02-28 10:16:31 -06:00
Maximilian Hils
eec4c539f2 SSLKEYLOGFILE docs 2015-02-28 03:35:28 +01:00
Maximilian Hils
e1b6cf9401 fix #319 2015-02-27 15:24:27 +01:00
Maximilian Hils
8d975e80ff Merge remote-tracking branch 'sakurai/feature/issue319' 2015-02-27 14:47:50 +01:00
Maximilian Hils
355f9fc407 use entry_points for Windows support 2015-02-27 14:43:23 +01:00
Maximilian Hils
595bde2202 add example inline script for dns spoofing, refs #486 2015-02-27 12:55:16 +01:00
Maximilian Hils
3323b29f10 always include SNI as SAN entry
To be as robust as possible, we include the SNI value always as a Subject
Alternative Name. Second, we make sure that the server address is in the
list as well.
2015-02-27 12:51:06 +01:00
Maximilian Hils
c51a1dbb11 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-02-27 09:17:59 +01:00
Maximilian Hils
81a274eb51 fix #479 2015-02-27 09:17:41 +01:00
Youhei Sakurai
5916767e03 Correct typo; https://github.com/mitmproxy/mitmproxy/issues/319 2015-02-27 10:22:27 +09:00
Youhei Sakurai
10f81e596b Change from checking __call__ to using callable;
https://github.com/mitmproxy/mitmproxy/issues/319
2015-02-27 10:15:07 +09:00
Marcelo Glezer
3a78c95d0a added to flowlist / flowdetail time elapsed between request sent and response received 2015-02-26 18:14:20 -03:00
Youhei Sakurai
1d42c1b3c4 Modify example to notify incompatibility with --stream SIZE command line
option; https://github.com/mitmproxy/mitmproxy/issues/319
2015-02-27 03:17:40 +09:00
Youhei Sakurai
77bb0b74ed Maybe it should work; https://github.com/mitmproxy/mitmproxy/issues/319 2015-02-27 02:44:47 +09:00
Maximilian Hils
bd6c3f64c1 Merge pull request #474 from tekii/feature-426
Feature 426
2015-02-13 23:48:45 +01:00
Marcelo Glezer
010b921a93 added sni and ssl_established=true in ServerConnection. removed check for None value of server_conn in http.py 2015-02-12 13:41:58 -03:00
Marcelo Glezer
71a58289e2 less is more 2015-02-12 01:52:13 -03:00
Marcelo Glezer
fbba6bfe06 added ClientConnection and ServerConnection to new request 2015-02-12 01:42:48 -03:00
Marcelo Glezer
58091b7041 removed useless try except 2015-02-12 01:33:35 -03:00
Marcelo Glezer
16653cc62b fixed typos 2015-02-12 00:31:05 -03:00
Marcelo Glezer
27a1947599 missing str in http.parse_url 2015-02-11 22:03:57 -03:00
Marcelo Glezer
493cecfaf2 renamed add_request to create_request and added a tiny docstring 2015-02-11 16:05:49 -03:00
Marcelo Glezer
1df78f75c5 set sni to None when no server_conn is None 2015-02-10 17:18:23 -03:00
Marcelo Glezer
80da33b2d3 request is absolute 2015-02-10 15:45:11 -03:00
Marcelo Glezer
ba42984b59 added support for creating new requests. still wip (not working for https) 2015-02-10 15:24:21 -03:00
Maximilian Hils
e0c5f86b20 Merge pull request #467 from mitmproxy/clipboard
Clipboard
2015-02-08 22:18:28 +01:00
Maximilian Hils
c9240812d9 fix #468 2015-02-08 13:24:32 +01:00
Maximilian Hils
5d56870818 disable replay from ui for live flows 2015-02-07 19:33:36 +01:00
Maximilian Hils
9a32193005 fix #110 2015-02-07 16:37:59 +01:00
Maximilian Hils
53fadd05f4 fix #451 2015-02-07 16:26:19 +01:00
Maximilian Hils
0d608c1fb3 upgrading packages should not be neccesary on travis 2015-02-07 01:36:45 +01:00
Maximilian Hils
2ed09beae4 fix tests, re-enable pypy, do housekeeping 2015-02-07 01:17:24 +01:00
Maximilian Hils
102183fd23 remove leftovers 2015-02-07 00:36:47 +01:00
Maximilian Hils
65c14724f5 make copy context-sensitive 2015-02-07 00:33:29 +01:00
Maximilian Hils
02e0bad684 improve clipboard UX 2015-02-06 23:32:22 +01:00
Maximilian Hils
17e44db9fd Update README.mkd 2015-02-06 23:13:40 +01:00
Maximilian Hils
c871a12ea4 Merge remote-tracking branch 'tekii/feature-334' 2015-02-06 20:27:50 +01:00
Marcelo Glezer
f49dcb0d91 removed str() cast and changed 'failed copy trying save instead' message 2015-02-06 00:59:05 -03:00
Marcelo Glezer
64c02a16c3 save_flow now uses with, and pyperclip requirement updated to 1.5.8 2015-02-06 00:44:43 -03:00
Maximilian Hils
d67372f9d6 fix tests 2015-02-06 02:25:07 +01:00
Maximilian Hils
70607f9d95 Merge remote-tracking branch 'origin/contributing' 2015-02-06 01:52:07 +01:00
Maximilian Hils
6472942756 fix tests 2015-02-05 17:52:59 +01:00
Maximilian Hils
bed237503a Create CONTRIBUTING.md 2015-02-05 17:52:08 +01:00
Maximilian Hils
f215c3712d fix #459 2015-02-05 17:12:48 +01:00
Maximilian Hils
52d696df3d fix ssl shutdown in tcp mode, refs #464 2015-02-05 16:46:55 +01:00
Marcelo Glezer
1455707eb1 Merge branch 'feature-334' of github.com:tekii/mitmproxy into feature-334 2015-02-05 11:32:01 -03:00
Marcelo Glezer
75cca63b26 added copy to clipboard support for url 2015-02-05 11:31:25 -03:00
Marcelo Glezer
ae83d39eba added support for 'b' key in flowlist 2015-02-05 11:31:25 -03:00
Marcelo Glezer
9fc68d320c added support for copying request (content|header) to clipboard 2015-02-05 11:31:24 -03:00
Marcelo Glezer
3bcf0cbba8 used save_body from common when b key is pressed 2015-02-05 11:31:24 -03:00
Marcelo Glezer
8f66fe1bfc added support for saving file if content is binary. still wip 2015-02-05 11:31:24 -03:00
Marcelo Glezer
c57efffe01 extracted server_copy_response to common 2015-02-05 11:31:24 -03:00
Marcelo Glezer
f21a44dd48 removed pyperclip hard dependencies 2015-02-05 11:31:24 -03:00
Marcelo Glezer
8e1f260150 trying to fix travis take 2 2015-02-05 11:31:24 -03:00
Marcelo Glezer
470d8e925a trying to fix travis 2015-02-05 11:31:24 -03:00
Marcelo Glezer
d9f562b5c0 used get_decoded_content and removed decode call from headers as max suggested 2015-02-05 11:31:24 -03:00
Marcelo Glezer
1a06f15ee0 added copy functionality to flowview too 2015-02-05 11:31:24 -03:00
Marcelo Glezer
fdd012bdd8 removed invalid comment and unneeded safe text 2015-02-05 11:31:24 -03:00
Marcelo Glezer
ee75a0b9cb now content and header are working and exception for binary files are handled correctly 2015-02-05 11:31:24 -03:00
Marcelo Glezer
f89a5235d3 wip - content copy is working, header representation is not 2015-02-05 11:31:24 -03:00
Marcelo Glezer
4a481814f6 added pyperclip dependency 2015-02-05 11:31:24 -03:00
Marcelo Glezer
5cbdd21a4b Merge remote-tracking branch 'base/master' 2015-02-05 11:29:53 -03:00
Marcelo Glezer
17ee88e07e Merge remote-tracking branch 'base/master' 2015-02-05 11:25:22 -03:00
Maximilian Hils
310fb18aac fix #464 2015-02-05 15:24:32 +01:00
Maximilian Hils
0ac3227b7b clean up flow reading 2015-02-05 14:44:45 +01:00
Marcelo Glezer
a86446e204 Merge remote-tracking branch 'base/master' into feature-334 2015-02-05 10:36:30 -03:00
Marcelo Glezer
5e2f440cdd Merge remote-tracking branch 'base/master' 2015-02-05 10:34:26 -03:00
Maximilian Hils
19555bb39a Merge remote-tracking branch 'tekii/master' 2015-02-05 14:20:22 +01:00
Maximilian Hils
965cfffa5e fix statusbar initialization 2015-02-05 14:15:26 +01:00
Maximilian Hils
b7ae4b0a4c Merge pull request #447 from tekii/server-replay-missing-args
missing parameter in start_server_playback call (again)
2015-02-05 14:11:19 +01:00
Marcelo Glezer
82d8c93261 added copy to clipboard support for url 2015-02-03 15:41:09 -03:00
Marcelo Glezer
e5922ae30a added support for 'b' key in flowlist 2015-01-16 13:08:25 -03:00
Marcelo Glezer
d80e2e2b2b added support for copying request (content|header) to clipboard 2015-01-16 12:13:55 -03:00
Marcelo Glezer
7ba7d64bac used save_body from common when b key is pressed 2015-01-15 12:57:00 -03:00
Marcelo Glezer
affb57ed08 added support for saving file if content is binary. still wip 2015-01-15 12:37:26 -03:00
Marcelo Glezer
b77cd1af60 extracted server_copy_response to common 2015-01-15 09:36:59 -03:00
Marcelo Glezer
0a2d2d9390 removed pyperclip hard dependencies 2015-01-15 08:46:56 -03:00
Marcelo Glezer
c97fe68230 trying to fix travis take 2 2015-01-14 16:48:49 -03:00
Marcelo Glezer
95f0b4b506 trying to fix travis 2015-01-14 16:44:59 -03:00
Marcelo Glezer
6b8fb147d0 used get_decoded_content and removed decode call from headers as max suggested 2015-01-14 14:45:19 -03:00
Marcelo Glezer
d49eafad8b added copy functionality to flowview too 2015-01-14 12:36:19 -03:00
Marcelo Glezer
36ec20bbb8 removed invalid comment and unneeded safe text 2015-01-14 12:09:14 -03:00
Marcelo Glezer
a4bfa677e9 now content and header are working and exception for binary files are handled correctly 2015-01-14 12:03:40 -03:00
Marcelo Glezer
34d355a62b wip - content copy is working, header representation is not 2015-01-14 10:52:52 -03:00
Marcelo Glezer
44a5070bf5 added pyperclip dependency 2015-01-13 23:18:28 -03:00
Marcelo Glezer
8e57597d22 missing parameter in start_server_playback call 2015-01-13 08:16:00 -03:00
Marcelo Glezer
4f578866fa open flow files using with as max suggested 2015-01-12 14:31:18 -03:00
Marcelo Glezer
c4aeca2764 Merge remote-tracking branch 'base/master' 2015-01-12 12:58:33 -03:00
Maximilian Hils
e089061996 Merge pull request #445 from tekii/hotfix-start-server-playback
hotfix to mitmproxy missing start_server_playback() parameter added.
2015-01-12 16:55:21 +01:00
Marcelo Glezer
9553ca0ed4 hotfix to mitmproxy missing start_server_playback() parameter added. backported from PR [#439] 2015-01-12 12:49:23 -03:00
Marcelo Glezer
27950f1972 Merge remote-tracking branch 'base/master' 2015-01-12 10:55:47 -03:00
Maximilian Hils
e18294437c document choice of timeout value, refs #443 2015-01-09 17:17:12 +01:00
Maximilian Hils
40c28b79d1 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2015-01-09 16:40:32 +01:00
Maximilian Hils
8af26bd0b7 fix #443 2015-01-09 16:40:26 +01:00
Maximilian Hils
dcc248797f Merge pull request #442 from nickhs/441
Error to stdout when loading bad replays from the command line
2015-01-09 00:39:36 +01:00
Nick HS
3dcba41d6d Error to stdout when loading bad replays from the command line 2015-01-08 13:56:19 -05:00
Maximilian Hils
72690f2864 Merge pull request #440 from michaeljau/patch-2
Updated inlinescripts.html - changed "libmproxy.certutils.SSLCert" to "netlib.certutils.SSLCert"
2015-01-07 22:08:54 +01:00
michaeljau
b39ea74bb6 Update inlinescripts.html
I updated the certutils.SSLCert reference from "libmproxy.certutils.SSLCert" to "netlib.certutils.SSLCert".
2015-01-07 22:20:05 +08:00
Marcelo Glezer
30213d6370 now mitmproxy supports multiple saved flows files too. also fixed server_play_back start with mitmproxy (missing parameter) 2015-01-06 15:49:49 -03:00
Marcelo Glezer
9695377b28 first steps in scenario support 2015-01-05 18:12:38 -03:00
Aldo Cortesi
812ea90dc5 Pin browserify to most recent version that works
Issue being tracked here:

https://github.com/substack/node-browserify/issues/1044
2015-01-04 11:42:41 +13:00
Aldo Cortesi
876e5ca683 Ditch old gulpfile 2015-01-03 11:53:24 +13:00
Aldo Cortesi
1959aebc08 Add PEG support to gulpfile
- Extract conf - all project specific conf outside gulpfile
- Generalize filt.js exports, add required imports
2015-01-03 11:46:51 +13:00
Aldo Cortesi
f1b040e808 Fix unit tests 2015-01-02 16:12:25 +13:00
Aldo Cortesi
80339aef93 Unit test framework for web client-side code
- Also make formatSize nicer and test it.

Now there's no excuse! ;)
2015-01-02 15:29:51 +13:00
Aldo Cortesi
b14b4ace25 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2015-01-02 13:42:56 +13:00
Aldo Cortesi
bb5fb2dbe0 Clean up har_extractor example
- Fix spacing, line length, unused imports, unusual import idioms
- Prevent it from barfing into our test output
2015-01-02 13:42:43 +13:00
Aldo Cortesi
1b5f5021dc Consolidate reading flows from file, use in mitmweb. 2015-01-02 13:26:22 +13:00
Maximilian Hils
c152e5da1a we do not support https2http in upstream proxy mode 2015-01-01 22:07:49 +01:00
Aldo Cortesi
4d01e22f26 components/utils.js -> common.js
Too many utils modules makes things confusing. These are more "common
components" or "common mixins" than utils anyway.
2015-01-01 20:49:32 +13:00
Aldo Cortesi
866a408120 Make header more compact
- Remove title bar
- File -> mitmproxy - ultimately our logo can go here
2015-01-01 20:44:45 +13:00
Aldo Cortesi
4506bafddc Use Facebook's dispatcher 2015-01-01 16:59:58 +13:00
Aldo Cortesi
b09dbbe209 Replace custom EventEmitter with one from browserify 2015-01-01 16:41:45 +13:00
Aldo Cortesi
fa77fba37c Remove unused files 2015-01-01 15:39:24 +13:00
Aldo Cortesi
c9ce5094c8 All files and only files in in js/components are jsx
So remove the redundant naming
2015-01-01 15:37:42 +13:00
Aldo Cortesi
67f6f67c48 More browesrification. 2014-12-31 18:14:17 +13:00
Aldo Cortesi
2152d4dd92 More conversions to browserify 2014-12-30 22:12:26 +13:00
Aldo Cortesi
b847faf37f Fix fonts, stylesheets, add much more flexible bootstrap over-rides. 2014-12-30 22:02:55 +13:00
Aldo Cortesi
bc8687deb5 Basic conversion: browserified web app now works. 2014-12-30 21:51:07 +13:00
Aldo Cortesi
d2c7411f06 Start moving to new gulpfile, browerify, etc. 2014-12-30 21:07:00 +13:00
Aldo Cortesi
e9d8586f6b Bump for next dev iteration 2014-12-30 11:26:45 +13:00
Aldo Cortesi
089c5fd948 Bump version 2014-12-30 10:02:45 +13:00
Maximilian Hils
333688b06e Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-12-29 14:56:47 +01:00
Maximilian Hils
51671b22a0 fix #435 2014-12-29 14:56:35 +01:00
Maximilian Hils
ad973de0b3 fix mitmproxy -w 2014-12-29 14:40:34 +01:00
Aldo Cortesi
55970bf0cc Minor tweaks to release checlist and binary builds 2014-12-29 12:45:38 +13:00
Aldo Cortesi
f78451dbbe Add netlib and libpathod as excludes in MANIFEST.in
These are commonly symlinked during dev
2014-12-28 23:28:35 +13:00
Aldo Cortesi
84f57a2832 Adjust how doc rendering uses mitmproxy source location
We now make sure our imports come from here too, and that we have mod cons like
tilde expansion in the env variable.
2014-12-28 23:16:50 +13:00
Aldo Cortesi
7f5965225d CHANGELOG 2014-12-28 23:16:44 +13:00
Aldo Cortesi
d33d125214 Documentation for config files 2014-12-28 22:35:14 +13:00
Aldo Cortesi
e4f510685e Generalize binary building, add static resources, add spec files for mitmproxy, mitmdump and mitmweb
We're now ready to use the same script (more or less) to build Windows
binaries.
2014-12-28 17:39:44 +13:00
Aldo Cortesi
0cc8c44c22 Minor improvements to osx binary build process
- Add --shortversion on tools to make packaging easier
- Automate tarfile generation
2014-12-28 15:07:44 +13:00
Aldo Cortesi
ab06c2436b Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2014-12-27 23:08:56 +13:00
Aldo Cortesi
8a8437470e Move onboarding app to Tornado
Two reasons for this. First, this removes flask and its dependencies, which are
quite sizeable. Second, pyinstaller now barfs on simplejson, which is a Flask
dependency. I just don't have time to fix this upstream, so doing what we
should be doing anyway is a no-brainer.
2014-12-27 23:06:51 +13:00
Maximilian Hils
3e63107e94 web: integrate filter docs 2014-12-26 03:10:24 +01:00
Maximilian Hils
1f454b577f web: CSP, revert functionality, serve content 2014-12-25 16:10:47 +01:00
Maximilian Hils
7d793ae162 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-12-25 13:38:34 +01:00
Maximilian Hils
4cfa91a903 web: show mitmproxy version 2014-12-25 02:08:58 +01:00
Maximilian Hils
7ed6f10e35 web: much ui work, such christmas 2014-12-25 02:03:55 +01:00
Maximilian Hils
d0ab553bd0 travis: oftc seems to require channel join 2014-12-24 15:50:23 +01:00
Maximilian Hils
b744dd5be0 travis: don't join irc channel 2014-12-24 15:34:58 +01:00
Maximilian Hils
bd1c04ac56 travis: cache pypy 2014-12-24 02:32:34 +01:00
Maximilian Hils
c3193b361e travis tests 2014-12-24 02:17:45 +01:00
Maximilian Hils
4b94c7cf15 bump version, update release checklist 2014-12-24 02:03:14 +01:00
Maximilian Hils
478051f980 enable travis caching 2014-12-24 01:56:46 +01:00
Maximilian Hils
f265cff3a9 fix tests, experimental travis speedup 2014-12-24 01:39:38 +01:00
Maximilian Hils
1c4f4c2494 web: duplicate, delete, replay flows 2014-12-24 01:07:57 +01:00
Maximilian Hils
b1311faa68 web: move eventlog state out of settings 2014-12-23 23:23:25 +01:00
Maximilian Hils
4767b83726 fix gzipped body edit 2014-12-23 23:14:55 +01:00
Maximilian Hils
2861d99de4 web: intercept feature 2014-12-23 20:33:42 +01:00
Maximilian Hils
459772a8ef web: squash bugs 2014-12-23 01:26:03 +01:00
Maximilian Hils
b55d584309 web: simpler filter ui 2014-12-23 01:13:34 +01:00
Maximilian Hils
d5e16d7cf1 simplify code 2014-12-23 00:30:35 +01:00
Maximilian Hils
72ab44ef54 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-12-23 00:15:08 +01:00
Maximilian Hils
ebae1ebe5d Merge pull request #432 from tekii/master
--replay_ignore_payload_params added, to filter params in form posts
2014-12-23 00:14:32 +01:00
Maximilian Hils
d2471592d2 highlight ui: complicated version 2014-12-22 23:40:24 +01:00
Marcelo Glezer
7e1b35bfc7 --replay_ignore_payload_params added, to filter params in form posts 2014-12-18 17:56:27 -03:00
Maximilian Hils
120ab5c4cd fix #427, tolerate servers that reject connections without SNI 2014-12-15 13:02:47 +01:00
Maximilian Hils
4e635d7a6f allow specification of SSL version, only allow TLS1.0+ by default 2014-12-15 12:46:13 +01:00
Maximilian Hils
955c5c87a2 web: filter/highlight ui, many fixes 2014-12-13 01:56:04 +01:00
Maximilian Hils
a09eb2bef4 add filter descriptions 2014-12-12 22:41:10 +01:00
Maximilian Hils
3b55889310 web: disable autoscroll at top 2014-12-12 19:43:55 +01:00
Maximilian Hils
588d6dbe22 web: filtering 2014-12-12 19:33:06 +01:00
Maximilian Hils
5ccae48b92 web: fight against react-router 2014-12-12 19:19:00 +01:00
Maximilian Hils
cb45296377 web: implement filters 2014-12-12 17:49:10 +01:00
Aldo Cortesi
01fa5d3f07 Merge pull request #414 from mitmproxy/flowviews2
Flowviews2
2014-12-12 22:08:15 +13:00
Maximilian Hils
93d4a0132a Merge pull request #425 from tekii/master
append option added to dump (flow file is open in append mode instead of overwrite)
2014-12-11 22:26:21 +01:00
Marcelo Glezer
14a3e0073f append file mode for saving flows merged to master 2014-12-11 15:21:33 -03:00
Marcelo Glezer
4952643a0d Merge remote-tracking branch 'base/master' 2014-12-11 14:54:14 -03:00
Maximilian Hils
dbb51640d9 web: add filter grammar 2014-12-11 16:35:50 +01:00
Maximilian Hils
93e928dec4 web: add file menu stub 2014-12-10 17:44:45 +01:00
Maximilian Hils
7e40b8ab09 web: implement settings store, modularize store 2014-12-10 15:25:40 +01:00
Maximilian Hils
d2feaf5d84 web: take viewport resize into account 2014-12-10 02:48:04 +01:00
Maximilian Hils
e12bf19e35 web: add event store, fix all those bugs 2014-12-10 00:47:05 +01:00
Maximilian Hils
05bc7e8cd8 generalize store 2014-12-09 18:55:16 +01:00
Maximilian Hils
14a8d2f5b8 always use the app dispatcher 2014-12-09 18:18:14 +01:00
Maximilian Hils
ffb95a1db7 fix #304 2014-12-09 00:01:01 +01:00
Maximilian Hils
b95f0c9971 fix #411 2014-12-08 17:17:37 +01:00
Maximilian Hils
31925dc9be fix #419 2014-12-08 17:01:47 +01:00
Maximilian Hils
591ed0b41f fix HTTPResponse creation 2014-12-04 00:29:15 +01:00
Maximilian Hils
a7a9ef826c fix tests 2014-12-01 03:36:04 +01:00
Maximilian Hils
40fbb95701 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-12-01 03:05:11 +01:00
Maximilian Hils
5b1fefee9b add inline script example for websocket passthrough, fix #340 2014-12-01 03:04:48 +01:00
Maximilian Hils
992536c2bc make header processing configurable by inline scripts, refs #340 2014-12-01 02:28:03 +01:00
Maximilian Hils
807d0b9a5d Merge pull request #416 from elimisteve/patch-1
README: Fixed double-quote and whitespace issues
2014-11-29 15:33:14 +01:00
Steve Phillips
3b03758ef8 README: Fixed double-quote and whitespace issues 2014-11-29 04:13:29 -08:00
Maximilian Hils
096a3af273 web: various improvements 2014-11-29 03:25:07 +01:00
Maximilian Hils
f6c0e000da event log: virtual scrolling 2014-11-28 20:54:52 +01:00
Maximilian Hils
dd1a45140c web: add virtualscroll mixin 2014-11-28 20:03:04 +01:00
Maximilian Hils
38621f2d49 Merge pull request #415 from gabe-k/flowbasic-fix
Changed argument name from confdir to cadir in flowbasic example
2014-11-28 19:48:26 +01:00
Maximilian Hils
c39b6e4277 web: various fixes, add clear button 2014-11-28 19:16:47 +01:00
Gabriel Kirkpatrick
cf7404cfe0 Changed argument name from confdir to cadir in flowbasic example 2014-11-28 12:36:31 -05:00
Maximilian Hils
56f1278d1a fix #413 2014-11-28 17:52:54 +01:00
Maximilian Hils
7ca1ac0f3b web: virtual scrolling 2014-11-28 16:03:56 +01:00
Maximilian Hils
9eecc8d6e2 web: fixes 2014-11-27 02:34:03 +01:00
Maximilian Hils
e41c0be293 format code 2014-11-27 01:40:26 +01:00
Maximilian Hils
38bf34ebd9 web++ 2014-11-27 01:38:30 +01:00
Maximilian Hils
021e209ce0 web: update dependencies 2014-11-27 01:37:36 +01:00
Maximilian Hils
3887e7ed29 fix error html 2014-11-26 04:56:17 +01:00
Maximilian Hils
ed8249023f introduce revised views, port over changes from multiple_views branch 2014-11-26 04:18:21 +01:00
Maximilian Hils
47a78e3c72 fix limit_txt, fix #412 2014-11-23 15:46:17 +01:00
Maximilian Hils
f7c5385679 retain raw filter str on filt objects 2014-11-22 15:27:43 +01:00
Maximilian Hils
ec23594191 add sni support to LiveConnection.change_server 2014-11-19 01:27:20 +01:00
Maximilian Hils
667fe0c20b fix tests 2014-11-15 23:10:25 +01:00
Maximilian Hils
a699bdc286 Merge pull request #410 from JustusW/master
Added HAR generation as inline script
2014-11-15 22:45:28 +01:00
Justus Wingert
ddce662fe6 Added try/except block for import errors with harparser and pytz. 2014-11-15 22:39:15 +01:00
Justus Wingert
c84ad384f6 Updated setup.py and moved requirements to examples section. Included examples section in requirements.txt. Updated har_extractor to use command line arguments. 2014-11-15 22:37:32 +01:00
Justus Wingert
a7ab06d80e Switched to pytz. Added comment for clarification on behaviour of HAREncodable. Added missing parameter in reset(). Fixed accessing headers. 2014-11-15 22:04:52 +01:00
Justus Wingert
4227feef37 It seems get_decoded_content can actually be shorter than content due to encoding issues. Since I'm not crazy after all it seems safe to push. 2014-11-15 21:14:50 +01:00
Justus Wingert
4342d79dc0 Removed the globals and replaced them with internal attributes of _HARLog. Minor bugfixes to make ssl timings work. 2014-11-15 20:11:25 +01:00
Justus Wingert
31249b9e24 Hopefully fixed dependency fuckup. 2014-11-15 19:28:10 +01:00
Justus Wingert
57d9807122 Added script dependencie to harparser. 2014-11-15 19:05:36 +01:00
Justus Wingert
18b803d03a Typo... 2014-11-15 18:45:28 +01:00
Justus Wingert
f3a78d4795 Improved helper method, marginally. 2014-11-15 18:41:51 +01:00
Justus Wingert
fd48a70128 Updated documentation and cleaned up the code. 2014-11-15 18:38:59 +01:00
Aldo Cortesi
aa77a52a06 One common --version flag 2014-11-15 17:58:38 +13:00
Aldo Cortesi
23a4f159fd Remove last vestiges of argparse 2014-11-15 17:51:21 +13:00
Aldo Cortesi
5af7c9ebf4 Exclude main.py from coverage analysis 2014-11-15 17:47:39 +13:00
Aldo Cortesi
7d76f3e992 Make sure all command-line arguments have a long form
... so they can be used in config files
2014-11-15 17:41:04 +13:00
Aldo Cortesi
09c503563a Enable config file parsing
We support 4 different config files:

~/.mitmproxy/common.conf:       Options that are common to all tools
~/.mitmproxy/mitmproxy.conf:    Options for mitmproxy
~/.mitmproxy/mitmdump.conf:     Options for mitmdump
~/.mitmproxy/mitmweb.conf:      Options for mitmweb

Options in the tool-specific config files over-ride options in common.conf. If
a non-common option is put in common.conf, an error will be raised if a
non-supporting tool is used.
2014-11-15 17:25:05 +13:00
Aldo Cortesi
6c1dc4522d Refactor command-line argument definition
- Argument definitions live in cmdline.py
- Parsing and initial processing lives in main.py
2014-11-15 16:29:38 +13:00
Aldo Cortesi
9c88622e25 Adjust tests 2014-11-15 16:17:05 +13:00
Aldo Cortesi
0906ee94ac Remove sortedcontainers from deps - we don't use it 2014-11-15 16:14:59 +13:00
Aldo Cortesi
24c4df07e3 First-order integration of configargparser to add config file support 2014-11-15 16:14:08 +13:00
Aldo Cortesi
645a4a0c04 Some additions to the release checklist 2014-11-15 15:47:00 +13:00
Justus Wingert
acce67e1fd Initial checkin with har_extractor script. 2014-11-15 03:34:39 +01:00
Maximilian Hils
c7a96b2fb1 always show error messages 2014-11-15 00:52:26 +01:00
Aldo Cortesi
4c2e87638a Changelog, plus fix date of previous release 2014-11-15 12:49:21 +13:00
Maximilian Hils
afc6ef99ea bump version 2014-11-14 16:18:05 +01:00
Maximilian Hils
be449b7129 fix #409 2014-11-14 16:13:45 +01:00
Maximilian Hils
0c52b4e3b9 handle script hooks in replay, fix tests, fix #402 2014-11-14 00:26:22 +01:00
Maximilian Hils
9b5a8af12d fix grideditor bug 2014-11-14 00:21:47 +01:00
Maximilian Hils
8cbb67ac70 docs++ 2014-11-13 23:03:06 +01:00
Maximilian Hils
a325ae638b fix tests 2014-11-11 13:09:05 +01:00
Maximilian Hils
2335d00c1c Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-11-11 12:30:56 +01:00
Maximilian Hils
f19ee74b99 be more explicit about requirements 2014-11-11 12:30:51 +01:00
Aldo Cortesi
5873516d99 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2014-11-11 14:00:56 +13:00
Aldo Cortesi
ec17e70d9e Remove entry points in favor of vanilla scripts, fix test-release 2014-11-11 14:00:28 +13:00
Maximilian Hils
6f3b4eee3c fix clear key 2014-11-10 17:35:28 +01:00
Maximilian Hils
807a8eb759 Merge pull request #403 from Lucas-C/master
Using uppercase C to 'clear' display mode, because lowercase 'c' is used for css
2014-11-10 17:32:06 +01:00
Maximilian Hils
cece3700df fix #402 2014-11-10 17:11:36 +01:00
Maximilian Hils
476d7da17c update change_upstream_proxy example 2014-11-10 15:51:26 +01:00
Lucas Cimon
6f5883a4d1 Using uppercase C to 'clear' display mode, because lowercase 'c' is used for css 2014-11-07 17:02:29 +01:00
Maximilian Hils
4d090e09c7 fix tests 2014-11-07 09:59:11 +01:00
Maximilian Hils
c3ec551546 fix #401 2014-11-07 09:52:46 +01:00
Aldo Cortesi
5025bf872c Minor doc adjustments 2014-11-07 16:32:46 +13:00
Maximilian Hils
dc142682cb fix #399 2014-11-06 11:25:03 +01:00
Aldo Cortesi
a2a87695d3 Reduce loop timeouts to improve mitmproxy responsiveness
Fixes #384
2014-11-06 10:51:30 +13:00
Aldo Cortesi
0fe83ce87b Fix bug in flow dumping, add unit test that should have caught this in the first place 2014-11-06 10:35:00 +13:00
Aldo Cortesi
e732771c1c We don't need requests for mitmproxy 2014-11-05 09:57:09 +13:00
Aldo Cortesi
34d419ead8 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2014-11-04 10:22:13 +13:00
Aldo Cortesi
d0de490ef1 Release prep: binaries build script, release checklist, fuzzing 2014-11-02 18:04:57 +13:00
Maximilian Hils
8522c6ebd6 Merge pull request #393 from onlywade/master
Fixing issue #392, adding tests.
2014-11-01 18:07:32 +01:00
Wade 524
c4c42fa040 Updating OPTIONS test with related issue number. 2014-10-31 12:45:31 -07:00
Wade 524
ce18cd8ba4 Fixing issue #392. 2014-10-31 11:50:03 -07:00
Wade 524
2c64b90a3d Adding some test coverage for handling HTTP OPTIONS requests. 2014-10-31 11:49:45 -07:00
Maximilian Hils
3b0964f365 fix #391 2014-10-30 17:38:23 +01:00
Aldo Cortesi
340d0570bf Legibility 2014-10-26 18:32:45 +13:00
Aldo Cortesi
16654ad6a4 Fix crash while streaming
Found using fuzzing. Reproduction with pathoc, given "mitmproxy -s" and
pathod running on 9999:

get:'http://localhost:9999/p/':s'200:b\'foo\':h\'Content-Length\'=\'3\'':i58,'\x1a':r

 return flow.FlowMaster.run(self)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 111, in run
     self.tick(self.masterq, 0.01)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 613, in tick
     return controller.Master.tick(self, q, timeout)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 101, in tick
     self.handle(*msg)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 118, in handle
     m(obj)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 738, in handle_responseheaders
     self.stream_large_bodies.run(f, False)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 155, in run
     r.headers, is_request, flow.request.method, code
   File "/Users/aldo/mitmproxy/mitmproxy/netlib/http.py", line 401, in expected_http_body_size
     raise HttpError(400 if is_request else 502, "Invalid content-length header: %s" % headers["content-length"])
 netlib.http.HttpError: Invalid content-length header: ['\x1a3']
2014-10-26 17:58:36 +13:00
Aldo Cortesi
7aee9a7c31 Spacing and legibility 2014-10-26 17:44:49 +13:00
Aldo Cortesi
efd6fdb0e2 Start a fuzzing architecture for mitmproxy 2014-10-26 17:13:25 +13:00
Maximilian Hils
35075a31a8 Merge pull request #387 from onlywade/master
Fixing issue #368.
2014-10-25 14:39:48 +02:00
Wade 524
1ef74cf294 Fixing issue #368. 2014-10-24 15:54:51 -07:00
Maximilian Hils
77c9f64526 Merge branch 'master' of github.com:mitmproxy/mitmproxy
Conflicts:
	doc-src/modes.html
2014-10-23 16:17:03 +02:00
Maximilian Hils
4bf07d8aa5 fix typo 2014-10-23 16:15:38 +02:00
Maximilian Hils
bbee391a47 update proxy modes diagrams 2014-10-23 16:14:04 +02:00
Aldo Cortesi
6bed076460 Document http2https and https2http 2014-10-23 16:13:03 +13:00
Aldo Cortesi
6aa05df944 Correct docs - we no longer support change of basic proxy mode in the console app 2014-10-23 15:50:43 +13:00
Aldo Cortesi
32127f80e2 More refactoring of installation docs
- Make it clear that README.md only has the hacking installation
instructions
- Beef up install.html
2014-10-23 15:43:06 +13:00
Aldo Cortesi
5aace7eed8 Keep sidebar ordering alphabetical, add SOCKS documentation 2014-10-23 15:05:01 +13:00
Aldo Cortesi
6fcd1d0ed9 CHANGELOG and CONTRIBUTORS 2014-10-23 14:38:12 +13:00
Aldo Cortesi
4da90724a0 First redraft of modes documentation 2014-10-23 12:56:31 +13:00
Aldo Cortesi
05590cf6c2 Documentation re-org
- No longer using README.md in the rendered documentation.
- Rendered doc instrutions are now for the released version of
mitmproxy, with dev install instructions in the README.md
2014-10-23 09:44:47 +13:00
Maximilian Hils
c79bdeb4e5 fix #346 2014-10-22 14:03:19 +02:00
Maximilian Hils
3848a27d31 fix #378 2014-10-22 13:59:47 +02:00
Maximilian Hils
6cef6fbfec tweak SSL detection heuristics 2014-10-21 15:08:39 +02:00
Maximilian Hils
37cc6ae0bb fix race conditions in tests 2014-10-19 01:26:08 +02:00
Maximilian Hils
e114858438 add generic tcp proxying, fix #374 2014-10-18 18:29:35 +02:00
Maximilian Hils
52b29d4926 remove default_ca 2014-10-18 15:26:10 +02:00
Maximilian Hils
d7341e7798 add test case for #375 2014-10-17 17:08:41 +02:00
Maximilian Hils
d0809a210b fix cert forwarding 2014-10-09 02:47:32 +02:00
Maximilian Hils
7c56a3bb01 Add SOCKS5 mode, fix #305 2014-10-09 01:59:02 +02:00
Maximilian Hils
ff366d152e Merge branch 'cert_chains' 2014-10-09 00:51:21 +02:00
Maximilian Hils
5b33f78961 add mini documentation 2014-10-09 00:49:11 +02:00
Maximilian Hils
f04693c047 fix typo 2014-10-08 21:41:03 +02:00
Maximilian Hils
d5c318b070 fix support for chained certificates 2014-10-08 20:44:52 +02:00
Maximilian Hils
76bd554cd1 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-10-07 17:28:13 +02:00
Marcelo Glezer
83b1d4e0e0 Merge pull request #1 from mitmproxy/master
Merge pull request #371 from tekii/master
2014-10-06 00:08:07 -03:00
Maximilian Hils
5acc507fdb Merge pull request #371 from tekii/master
--replay-ignore-content & --replay-ignore-param ported from branch 0.10
2014-10-04 14:12:18 +02:00
Marcelo Glezer
81f5636389 --replay-ignore-content & --replay-ignore-param ported from branch 0.10 2014-10-03 07:29:44 -03:00
Maximilian Hils
6ce6b1ad69 replay: carry over SNI value 2014-10-02 00:58:40 +02:00
Maximilian Hils
38218f4ccc Merge pull request #369 from mitmproxy/dist
improve distribution
2014-10-01 21:23:54 +02:00
Maximilian Hils
c2634476e5 update MANIFEST.in 2014-10-01 21:12:12 +02:00
Maximilian Hils
e2ee41e764 distutils -> setuptools 2014-10-01 20:41:58 +02:00
Maximilian Hils
4167713cc0 fix timestamp formatting: end_time may not be set 2014-09-22 17:01:06 +02:00
Maximilian Hils
45f39c2380 beef up event log 2014-09-22 03:06:19 +02:00
Maximilian Hils
84e2a028c2 web: perf improvements 2014-09-22 01:44:46 +02:00
Maximilian Hils
9cda2eb3a3 web: various improvements 2014-09-21 23:43:27 +02:00
Maximilian Hils
60cec1f9b6 clean up timestamp handling 2014-09-21 22:46:48 +02:00
Maximilian Hils
aa6856786b web: minor fixes 2014-09-20 00:25:40 +02:00
Maximilian Hils
818c5918b6 web: display flow connection info 2014-09-19 17:56:54 +02:00
Maximilian Hils
b5e727da88 web: flow icons 2014-09-19 01:57:50 +02:00
Maximilian Hils
b0374710e4 start to fill detailpane 2014-09-19 01:35:36 +02:00
Maximilian Hils
390a435ac4 basic splitter -> kick-ass splitter 2014-09-18 23:47:54 +02:00
Maximilian Hils
e66f240e81 add splitter 2014-09-18 23:22:02 +02:00
Maximilian Hils
d1ba150ea7 web: detailpane impl 2014-09-18 21:13:50 +02:00
Maximilian Hils
01da54f1c3 fix #361 2014-09-18 03:56:35 +02:00
Maximilian Hils
0d64cc9327 flowtable: add selection indicator, add keyboard navigation 2014-09-18 02:22:10 +02:00
Maximilian Hils
6a161be6b4 .jsx -> .jsx.js
Rename jsx files to be compatible with Chrome Dev Tools and
Workspace Mapping.
2014-09-18 00:01:45 +02:00
Maximilian Hils
b99de36b24 undo spriting 2014-09-17 23:59:39 +02:00
Maximilian Hils
4ca720b556 add features to the traffic table, introduce image spriting 2014-09-17 21:14:55 +02:00
Maximilian Hils
102bd07568 implement FlowStore basics 2014-09-17 17:30:19 +02:00
Maximilian Hils
8245dd19f4 connect eventlog events to ui 2014-09-17 15:22:42 +02:00
Aldo Cortesi
b4ecd96beb Introduce short form object state, and connect the ends to send data to web app 2014-09-17 13:58:56 +12:00
Maximilian Hils
51db9a5612 formatting 2014-09-17 02:13:37 +02:00
Aldo Cortesi
d998790c2f Clean up and clarify StateObject
- Flatten the class hierarchy
- get_state, load_state, from_state are public
- Simplify code
- Remove __eq__ and __neq__. This fundamentally changes the semantics of
inherited objects in a way that's not part of the core function of the
class
2014-09-17 11:41:42 +12:00
Aldo Cortesi
b9531ac89b Whitespace & formatting 2014-09-17 09:54:17 +12:00
Aldo Cortesi
f7da58ca9b Basic websocket connection, code cleanup. 2014-09-17 09:40:25 +12:00
Maximilian Hils
4f56b76b2c fix flow detail display 2014-09-16 15:36:26 +02:00
Aldo Cortesi
bfef9b4940 Slightly more verbose gulping, remove strict declarations for now. 2014-09-16 21:41:49 +12:00
Aldo Cortesi
e4ee3e0236 Convert to ES5 inheritance pattern 2014-09-16 21:06:30 +12:00
Aldo Cortesi
6efe1aa6a9 We're not ready for ES6
Lets re-evaluate in June next year when it's actually released
2014-09-16 16:27:09 +12:00
Maximilian Hils
6bac1540bd ignore compiled files in diff 2014-09-16 01:05:29 +02:00
Maximilian Hils
674bc4273e format javascript 2014-09-16 00:56:43 +02:00
Maximilian Hils
acdd182754 web: implement EventLogStore 2014-09-16 00:05:06 +02:00
Maximilian Hils
1d9b1f79a1 web: eventlog ui 2014-09-15 18:39:25 +02:00
Maximilian Hils
cbf18320cd client-side structure 2014-09-15 18:08:26 +02:00
Aldo Cortesi
9f8d2eea64 Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy 2014-09-15 12:38:49 +12:00
Aldo Cortesi
563078df24 Client-side cleanup
- Remove grunt
- Formatting and spacing. There shall be 4 spaces in a tab. Not 3. Not
5. And 2 is right out.
2014-09-15 12:37:52 +12:00
Maximilian Hils
5a59fef57f fix bugs 2014-09-15 00:59:21 +02:00
Maximilian Hils
2cefd05be9 fix missing timeout parameter 2014-09-14 21:08:28 +02:00
Maximilian Hils
80af3589e2 docs: make sure that inline script devs don't miss the examples 2014-09-14 15:22:24 +02:00
Aldo Cortesi
be0996da35 Web interface is live. 2014-09-14 12:47:32 +12:00
Maximilian Hils
89b8e1ce8c checkin assets 2014-09-14 02:44:13 +02:00
Maximilian Hils
e9966428bd include jshint-stylish dependency 2014-09-14 02:42:36 +02:00
Aldo Cortesi
ff09529ba3 Add tornado dependency, serve index file 2014-09-14 12:33:07 +12:00
Aldo Cortesi
6812d304a1 Basic web service and options 2014-09-14 12:22:28 +12:00
Aldo Cortesi
adfaa1ed5b Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2014-09-14 12:05:15 +12:00
Maximilian Hils
abc91d6658 web: add flow stub 2014-09-14 02:04:48 +02:00
Aldo Cortesi
17868f61a9 Remove external app option, make tick timeout explicit 2014-09-14 11:46:01 +12:00
Aldo Cortesi
81e3a6e8e6 Super-basic outline for web io loop 2014-09-14 11:30:00 +12:00
Maximilian Hils
48211a2069 gulpfile: add tests and notify 2014-09-14 01:21:13 +02:00
Maximilian Hils
7b74d207f3 update Gruntfile 2014-09-13 23:57:01 +02:00
Maximilian Hils
d2475e6a14 web: start gui 2014-09-13 23:05:12 +02:00
Maximilian Hils
9bacb6d426 gulpfile 2014-09-13 17:00:05 +02:00
Maximilian Hils
b59234e25d use bowser-installer 2014-09-13 16:28:45 +02:00
Maximilian Hils
2842f25b82 fix tests 2014-09-12 03:16:52 +02:00
Maximilian Hils
9ec7963f8e update iframe injector example to use BeautifulSoup 2014-09-12 02:42:45 +02:00
Aldo Cortesi
25284792a5 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2014-09-12 12:31:17 +12:00
Aldo Cortesi
efa3e3dde8 web -> onboarding 2014-09-12 12:30:03 +12:00
Maximilian Hils
fa9c3e9fa7 update gitignore 2014-09-11 10:26:06 +02:00
Aldo Cortesi
0510c9b111 Client-side framework for web application 2014-09-10 14:23:10 +12:00
Aldo Cortesi
76982937a6 Reorg to put web app in its own directory 2014-09-10 11:34:58 +12:00
Aldo Cortesi
e5412e9dd9 Docs stub for Unbuntu, restore executable flag on binaries. 2014-09-09 17:57:39 +12:00
Maximilian Hils
81c3b194b6 polish new distribution setup 2014-09-09 02:21:28 +02:00
Maximilian Hils
beee55421b Update README.mkd 2014-09-09 02:18:08 +02:00
Maximilian Hils
578e9f800c fix jsunpacker imports 2014-09-09 01:15:35 +02:00
Maximilian Hils
ef704fd11f update travis.yml 2014-09-09 00:15:06 +02:00
Maximilian Hils
5f5af9535a update distribution: pip install now works on Windows 2014-09-09 00:06:10 +02:00
Maximilian Hils
5fdec6b7cb re-add mitmproxy/mitmdump scripts for convenience 2014-09-08 23:45:45 +02:00
Maximilian Hils
fbc4bb38df mitmproxy -> libmproxy.main. do some leanup on the way 2014-09-08 23:34:43 +02:00
Maximilian Hils
7ea8d3ff35 add note about icmp redirects, fix #255 2014-09-08 18:35:52 +02:00
Maximilian Hils
ebd539b49f update examples, fix #353 2014-09-08 17:03:34 +02:00
Maximilian Hils
ece15b3c8a reverse proxy: adjust dst when reading flows, fix #346 2014-09-08 14:43:32 +02:00
Maximilian Hils
d06b4bfa4e remove proxy mode abstraction: always be clear which mode we are in 2014-09-08 14:32:42 +02:00
Maximilian Hils
6dbe431c5e document --ignore, fix #350 2014-09-08 13:41:25 +02:00
Maximilian Hils
5a2a5760d0 improve logging 2014-09-08 13:34:08 +02:00
Maximilian Hils
2b2d21aff0 add --ignore ui indication 2014-09-08 12:20:40 +02:00
Maximilian Hils
8eff2df89e add note that request.host should be used in the majority of cases 2014-09-07 18:05:43 +02:00
Maximilian Hils
ac27d1236f improve change_server api, add example how to change the upstream server 2014-09-07 18:01:37 +02:00
Maximilian Hils
58ea198698 fix #349 2014-09-07 15:58:27 +02:00
Maximilian Hils
b6986b8999 add mitm.it error site 2014-09-07 13:44:32 +02:00
Maximilian Hils
5226ac200f update code docs, make sure that url attribute never returns prettified/formatted values 2014-09-07 03:18:18 +02:00
Aldo Cortesi
bf5fef1e0b Merge pull request #347 from mitmproxy/issue_341
Remove BackReferenceMixin
2014-09-07 13:04:18 +12:00
Aldo Cortesi
3d62e90dbf Merge pull request #342 from mitmproxy/server_change_api
Server change api
2014-09-07 12:59:35 +12:00
Maximilian Hils
c1438050ed docs: mitmproxy now displays the reverse proxy server unless --host is specified, which comes with a pretty big warning itself 2014-09-07 00:59:40 +02:00
Maximilian Hils
78a44c5199 add docs on proxy modes 2014-09-07 00:42:25 +02:00
Maximilian Hils
df129736c3 test streaming 2014-09-06 13:30:00 +02:00
Maximilian Hils
3c65510ef5 coverage++ 2014-09-06 13:09:57 +02:00
Maximilian Hils
fdd7b2f108 Merge branch 'issue_341' into server_change_api 2014-09-06 12:43:32 +02:00
Maximilian Hils
0e0cff638c Merge branch 'master' into issue_341 2014-09-06 12:42:52 +02:00
Maximilian Hils
3a8f648807 fix race condition with the concurrent decorator 2014-09-06 12:42:23 +02:00
Maximilian Hils
ccb6182917 fix race condition with the concurrent decorator 2014-09-06 12:39:23 +02:00
Maximilian Hils
b6c8a22b67 coverage++ 2014-09-06 12:23:05 +02:00
Maximilian Hils
5d7cabcbfa add architecture illustration 2014-09-05 20:14:44 +02:00
Maximilian Hils
32e1ed212d streamline HTTPHandler.handle_flow() 2014-09-05 19:39:05 +02:00
Maximilian Hils
2a6337343a update docs, mostly revert 2f44b26b4c 2014-09-05 15:16:20 +02:00
Maximilian Hils
f2570c773a iframe injector example: use inline script 2014-09-05 15:05:44 +02:00
Maximilian Hils
a7a3b5703a change replay_request behaviour, refs #346; test upstream proxy mode 2014-09-05 00:18:17 +02:00
Maximilian Hils
b23a1aa4a4 much tests. so tcp. very wow. 2014-09-04 19:08:54 +02:00
Maximilian Hils
795e19f6b7 coverage++ 2014-09-04 16:37:50 +02:00
Maximilian Hils
f4d4332472 coverage++ 2014-09-04 14:46:25 +02:00
Maximilian Hils
1d45c54a04 Merge branch 'issue_341' into server_change_api 2014-09-04 14:18:21 +02:00
Maximilian Hils
1135666ee6 Merge branch 'master' into issue_341 2014-09-04 14:18:07 +02:00
Maximilian Hils
39fa579dd5 remove outdated IOError test case (f5fdfd8a9f) 2014-09-04 14:15:49 +02:00
Maximilian Hils
4781c565a9 fix #344 2014-09-04 12:29:44 +02:00
Maximilian Hils
6ebf488c5b Merge pull request #343 from deployable/master
Add urwid stop prior to exception output so stack trace is not cleared
2014-09-04 12:24:53 +02:00
deployable
4bdd1ed967 Add urwid stop prior to stack trace so exceptions are not cleared from screen 2014-09-04 10:47:27 +01:00
Maximilian Hils
ea55f2e012 Merge branch 'issue_341' into server_change_api
Conflicts:
	examples/redirect_requests.py
	libmproxy/console/common.py
2014-09-04 00:11:20 +02:00
Maximilian Hils
649e63ff3c fix some leftovers 2014-09-04 00:10:01 +02:00
Maximilian Hils
2f44b26b4c improve HTTPRequest syntax 2014-09-03 23:44:54 +02:00
Maximilian Hils
cd43c5ba9c simplify server changes for inline scripts 2014-09-03 20:12:30 +02:00
Maximilian Hils
0c3b6ee667 fix IOError handling 2014-09-03 17:33:08 +02:00
Maximilian Hils
b0cfeff06d fix #341 - work on flows instead of request/response internally. 2014-09-03 16:57:56 +02:00
Maximilian Hils
951a6fcc36 http: ignore disconnects that happen between requests 2014-09-03 12:31:39 +02:00
Maximilian Hils
712e5860aa ui: display * instead of 0.0.0.0 for the bound address 2014-09-03 12:24:14 +02:00
Maximilian Hils
1e4e332ef9 improve error handling 2014-09-02 18:13:18 +02:00
Maximilian Hils
1a41c15c03 minor fixes 2014-08-31 16:52:26 +02:00
Maximilian Hils
1f47f7b6b2 refactor protocol handling, fix #332 2014-08-30 20:15:19 +02:00
Maximilian Hils
82730c1c6f Windows transparent proxy: allow specification of custom WinDivert filter rules 2014-08-30 17:33:43 +02:00
Maximilian Hils
101209ef9f Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-08-30 16:40:44 +02:00
Maximilian Hils
84e2285ee5 Windows transparent proxy: proxy local traffic 2014-08-30 16:39:15 +02:00
Maximilian Hils
12ff4a7d2b Merge pull request #339 from nanonyme/patch-1
Drop usage of obsolete function "file"
2014-08-29 23:38:18 +02:00
Seppo Yli-Olli
66c2e8ff52 Drop usage of obsolete function "file"
Also use context manager
2014-08-29 19:18:52 +03:00
Maximilian Hils
b97b1f17cf fix #328 2014-08-24 14:22:11 +02:00
Maximilian Hils
e4d6089f9a fix #330 2014-08-23 13:53:43 +02:00
Maximilian Hils
105230c7c2 add trove classifier for Python 2 2014-08-19 13:48:14 +02:00
Maximilian Hils
3d861d7a67 make sure that flow.server_conn is set when script hook is called 2014-08-18 01:54:45 +02:00
Maximilian Hils
94fbf066f7 fix script tests 2014-08-18 01:47:39 +02:00
Maximilian Hils
5b7e19a77e fix #327 2014-08-18 00:55:30 +02:00
Maximilian Hils
623cbd4e51 fix: changes to request.host in the request inline script hook are now considered for the server connection 2014-08-17 23:59:44 +02:00
Maximilian Hils
0acda9a684 fix #324 2014-08-17 23:49:08 +02:00
Maximilian Hils
bb2ce689a9 adjust to netlib changes 2014-08-17 23:06:25 +02:00
Maximilian Hils
da3e7c0187 do not connect if inline script already connected to upstream server 2014-08-12 02:55:32 +02:00
Maximilian Hils
e546af2d33 remove pydivert from requirements.txt to fix tests 2014-08-10 17:11:46 +02:00
Maximilian Hils
a193c267f3 adjust tests 2014-08-10 16:20:04 +02:00
Maximilian Hils
858b0af0bb fix #270 2014-08-10 16:10:49 +02:00
Maximilian Hils
ecf8081ba6 implement passthrough mode, fixes #175 2014-08-09 03:03:21 +02:00
Maximilian Hils
f4a1459ebe fix #274 2014-08-09 01:02:58 +02:00
Maximilian Hils
c88613f596 fix replay form 2014-08-09 00:53:16 +02:00
Maximilian Hils
2e6a698287 fix #308 2014-08-08 19:04:58 +02:00
Maximilian Hils
4d2109ef92 fix display of urls in upstream mode, refs #308 2014-08-08 17:49:02 +02:00
Maximilian Hils
de05484d9d fix #318 2014-08-08 04:43:44 +02:00
Maximilian Hils
a3c3e4e504 remove platform.setup 2014-08-08 03:38:59 +02:00
Maximilian Hils
a9e6121a08 properly express state information on server connections, refs #315 2014-08-08 02:45:24 +02:00
Maximilian Hils
c01b294d8d fix script path escaping on windows, refs #293 2014-08-08 02:27:28 +02:00
Maximilian Hils
c6911a4158 docs: add docs for script args, fix #293 2014-08-07 01:30:47 +02:00
Maximilian Hils
74b801ba08 docs: suggest to use inline scripts rather than libmproxy 2014-08-07 00:55:42 +02:00
Maximilian Hils
13f030ccb5 suppress SPDY/HTTP2 announcement headers, fix #277 2014-08-03 16:25:38 +02:00
Maximilian Hils
8f9395060f improve example scripts 2014-08-03 02:39:41 +02:00
Maximilian Hils
3133136da7 fix #307 2014-08-03 02:34:29 +02:00
Maximilian Hils
10a6d4fbe5 fix #317 2014-08-03 02:01:40 +02:00
Maximilian Hils
e9401a2123 Merge branch 'stream'
Conflicts:
	libmproxy/protocol/http.py
2014-07-31 22:29:13 +02:00
Maximilian Hils
3e3dbee936 fix tests 2014-07-31 22:18:57 +02:00
Maximilian Hils
f5fb1138fd add proxy modes illustrations, refs #258 2014-07-31 02:01:13 +02:00
Maximilian Hils
c9be57b682 fix #313 2014-07-27 03:28:23 +02:00
Maximilian Hils
2b31a9c49e refactor tcp handling, fix #280 2014-07-27 02:39:17 +02:00
Maximilian Hils
83536e7e53 minor fixes 2014-07-27 02:10:39 +02:00
Maximilian Hils
e9c834a30d fix #259 2014-07-26 12:02:18 +02:00
Maximilian Hils
a73ad1d945 fix tests 2014-07-26 11:51:27 +02:00
Maximilian Hils
41f49ff0d4 add example how to replace response body contents 2014-07-26 00:44:03 +02:00
Maximilian Hils
7b2cfc831d docs++ 2014-07-25 19:31:12 +02:00
Maximilian Hils
5a808ca2a7 add status bar indicator for streaming 2014-07-25 18:55:01 +02:00
Maximilian Hils
4382829b7d workaround: always make sure that flow.response.reply exists 2014-07-25 18:47:48 +02:00
Brad Peabody
a1fa34e61c response streaming doc 2014-07-24 19:11:16 -07:00
Brad Peabody
5bb4e37dfd fix to make it so streaming with mitmproxy doesn't explode due to no reply on response 2014-07-24 18:46:39 -07:00
Maximilian Hils
d9ac029ec7 always initialize HTTPResponse.stream attribute 2014-07-23 00:21:33 +02:00
Maximilian Hils
4b4a18a2e4 add --stream options, various fixes 2014-07-21 21:06:55 +02:00
Maximilian Hils
562ac9e721 unify stream handling 2014-07-21 14:09:24 +02:00
Maximilian Hils
7398db80db simplify responseheader scripthook 2014-07-20 11:17:53 +02:00
Maximilian Hils
0ba5a2cf19 Merge branch 'stream' of https://github.com/bradleypeabody/mitmproxy into stream 2014-07-20 10:57:51 +02:00
Brad Peabody
560e23af09 fixed handling of Transfer-Encoding header during streaming; wrote tests for streaming support 2014-07-19 19:10:14 -07:00
Maximilian Hils
c7425f42db if no_upstream_cert is set, include SNI value als SubjectAltName, fix #291 2014-07-18 23:04:24 +02:00
Brad Peabody
c47ddaa3a0 basic attempt to implement streaming response, needs testing 2014-07-17 22:43:26 -07:00
Maximilian Hils
a48cccadb5 fix tests on windows 2014-07-18 03:13:52 +02:00
Maximilian Hils
05a8c52f8f add transparent proxy mode on windows (docs still missing) 2014-07-16 00:47:44 +02:00
Maximilian Hils
71ba7089e2 fix parameter naming 2014-07-14 17:26:22 +02:00
Brad Peabody
ca7d398b42 make include_content=False work by passing this on to netlib's http.read_response 2014-07-12 22:40:51 -07:00
Maximilian Hils
5fed5753b4 fix command line help 2014-07-06 02:15:54 +02:00
Maximilian Hils
b0c366aa45 Merge pull request #300 from zbrdge/freebsd-platform
Freebsd 10 platform
2014-07-03 02:24:00 +02:00
Maximilian Hils
df11595fad Merge pull request #286 from m0sth8/remove_global_should_exit
Remove global should_exit and fix tests
2014-07-03 02:20:38 +02:00
Zack B
64c265b710 added unit test update. coverage still at 97% 2014-07-01 16:33:48 -07:00
Zack B
e601ade924 only support FreeBSD 10+ 2014-07-01 15:08:42 -07:00
Zack B
2704963e61 add resolver for FreeBSD using pfctl 2014-07-01 14:37:52 -07:00
Maximilian Hils
c039e4a2e3 fix ProxyError inheritance 2014-06-25 23:25:49 +02:00
Maximilian Hils
84a016dccf expose sockname 2014-06-25 23:03:15 +02:00
Vyacheslav Bakhmutov
b7c1d05782 Remove global should_exit and fix tests 2014-06-13 14:14:55 +07:00
Maximilian Hils
decb6f998a add support for certificate chains, refs #174 2014-05-21 01:16:22 +02:00
Maximilian Hils
00fd243810 fix up error messages 2014-05-15 18:16:42 +02:00
Maximilian Hils
a17a53269d fix #253 2014-05-15 14:37:05 +02:00
Maximilian Hils
9cba4f8d39 fix #267 2014-05-15 14:16:05 +02:00
Maximilian Hils
221bbb7369 re-use cert creation from netlib in handle_sni, fix #272 2014-05-15 13:56:09 +02:00
Maximilian Hils
3f440aad59 Merge pull request #271 from davidpshaw/master
- working WBXML parser
2014-05-07 16:45:15 +02:00
davidpshaw
0ecd0ba3ab - changed license to MIT, as it is more easily integrated into the mitmproxy project 2014-05-06 21:12:36 -04:00
David Shaw
ec85531580 - working WBXML parser 2014-05-06 13:27:13 -04:00
Maximilian Hils
4f1fe11549 Merge pull request #269 from shvar/master
init ProxyConfig.certstore with custom certs
2014-04-29 16:54:58 +02:00
Eli Shvartsman
1f29b16fb7 fix default certs 2014-04-29 16:13:12 +03:00
Eli Shvartsman
e2501960d3 init ProxyConfig.certstore with custom certs 2014-04-29 15:54:11 +03:00
Maximilian Hils
e15b97372b Merge pull request #268 from shvar/patch-1
Fix upstream_cert call in case of https2http
2014-04-29 12:49:53 +02:00
Eli Shvartsman
ed91e19e0b Update server.py
We should ask for upstream cert only if there is:
1) no no_upstream_cert option specified
2) ssl connection to server is established
2014-04-29 12:41:59 +03:00
Aldo Cortesi
1dba379ae9 Fix proxy options 2014-04-12 17:57:19 +12:00
Maximilian Hils
24759daf46 update firefox cert install docs 2014-04-10 13:31:54 +02:00
Maximilian Hils
3b8d57ca86 fix issue #260 2014-04-07 14:40:01 +02:00
Maximilian Hils
cdc484d513 Merge pull request #252 from jeanregisser/master
Fixed palette forced to light in mitmproxywrapper.py
2014-03-26 14:36:56 +01:00
Jean Regisser
17e0f7d159 Fixed palette forced to light in mitmproxywrapper.py 2014-03-26 13:15:23 +01:00
Maximilian Hils
aab071380a beef up error messages 2014-03-26 00:51:18 +01:00
Maximilian Hils
3a89c84eaf add requests to requrements, improve error logging 2014-03-19 17:18:21 +01:00
Maximilian Hils
6924eb75bf fix minor version string 2014-03-19 16:05:19 +01:00
Maximilian Hils
28f82d052d fix display bugs (fixes #243) 2014-03-18 19:38:02 +01:00
Maximilian Hils
d5cfc1c080 Merge pull request #239 from mitmproxy/options_cleanup
Options cleanup
2014-03-18 17:19:57 +01:00
Maximilian Hils
ce38a17893 Merge pull request #238 from mitmproxy/log_levels
Log Levels
2014-03-18 17:19:44 +01:00
Maximilian Hils
c07cd857a7 fix #240 2014-03-18 00:44:41 +01:00
Maximilian Hils
a66913d4a3 forward proxy -> upstream proxy 2014-03-14 00:02:00 +01:00
Maximilian Hils
f14eeef653 remove debug switch 2014-03-13 23:47:02 +01:00
Maximilian Hils
4e17b00ce8 order command line options, add disting proxy option group 2014-03-13 23:43:26 +01:00
Maximilian Hils
843b2e28bc adjust command line docs, fix log typo 2014-03-13 23:25:13 +01:00
Maximilian Hils
d883d93566 fix linux tests... 2014-03-13 01:30:26 +01:00
Maximilian Hils
1bfc164692 adjust tests, fix option handling 2014-03-13 01:22:12 +01:00
Maximilian Hils
4d9799f103 add support for log levels 2014-03-13 01:04:45 +01:00
Maximilian Hils
7e86744226 add -d switch to mitmdump to compensate for old verbosity functionality 2014-03-12 22:39:23 +01:00
Maximilian Hils
aefb30ea60 restrict -e to mitmproxy only (not mitmdump) 2014-03-12 22:13:00 +01:00
Maximilian Hils
14db30080f Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-03-11 02:16:30 +01:00
Maximilian Hils
15c82f743f fix temporary server change, coverage++ 2014-03-11 02:16:22 +01:00
Aldo Cortesi
e89e035d4a Certificate forwarding. 2014-03-11 13:02:10 +13:00
Maximilian Hils
c1fff51b1b always use relative imports, fix status bar bug 2014-03-10 22:36:47 +01:00
Maximilian Hils
e6349b540f split up protocol\__init__.py 2014-03-10 21:57:50 +01:00
Maximilian Hils
b59013f6e3 Merge branch 'absolutely_relative_proxying' 2014-03-10 17:02:09 +01:00
Maximilian Hils
9cc10630c8 update docs, fix #215 2014-03-10 17:01:30 +01:00
Aldo Cortesi
982da23e9a Merge pull request #231 from benwa/patch-1
Update webapp.html
2014-03-10 17:25:38 +13:00
Aldo Cortesi
e131e41e45 Merge pull request #232 from benwa/patch-2
Update layout.html
2014-03-10 17:24:34 +13:00
Aldo Cortesi
554deee222 Merge pull request #233 from mitmproxy/untangle_circular_dependencies
Untangle circular dependencies
2014-03-10 17:24:05 +13:00
Maximilian Hils
fe58c1c6eb add advanced proxying options, add SSL-terminating capability to mitmproxy 2014-03-10 05:11:51 +01:00
Maximilian Hils
78750a8b4d lay the foundations for --(in|out)(abs|rel) command line switches, as proposed in https://groups.google.com/forum/#!topic/mitmproxy/nApno2TXS0c 2014-03-10 02:32:27 +01:00
Maximilian Hils
dd3aedca01 fix mentions of CONTENT_MISSING in libmproxy.console 2014-03-09 21:59:53 +01:00
Maximilian Hils
5598a8de82 finish proxy.py split up 2014-03-09 21:51:24 +01:00
Maximilian Hils
fc4fe83eaf split up proxy.py 2014-03-09 21:13:08 +01:00
Bennett Blodinger
edad97ea64 Update layout.html
Remove unnecessary menu button on mobile
2014-03-08 20:50:46 -05:00
Bennett Blodinger
8d57ef3c64 Update webapp.html
Add notice about data compression proxies
2014-03-08 20:43:39 -05:00
Maximilian Hils
2e50b10735 fix windows tests, include improvements from 0.10.1 2014-03-08 17:19:47 +01:00
Maximilian Hils
2b01c4eee7 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-03-08 15:47:27 +01:00
Maximilian Hils
3032672f10 combine asterisk-form and origin-form into relative form 2014-03-08 15:47:09 +01:00
Aldo Cortesi
221973aff6 Revert to old cert names, use a subdir for test conf dir. 2014-03-07 16:38:24 +13:00
Aldo Cortesi
9b17d272a3 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2014-03-07 15:22:04 +13:00
Aldo Cortesi
d0e6fa2705 Use the right conf dir... 2014-03-07 15:20:15 +13:00
Maximilian Hils
5ca88300a9 Merge pull request #230 from sergeychipiga/fix/remove-redundant-codeline
remove redundant codeline
2014-03-05 18:53:24 +01:00
Sergey Chipiga
edac95028a remove redundant codeline 2014-03-05 21:00:29 +04:00
Aldo Cortesi
d65f2215cb Much more sophisticated cert handling
- Specify per-domain certificates and keys
- Certs are no longer regenerated for SANs
- And more. :)
2014-03-05 17:28:04 +13:00
Aldo Cortesi
32af668814 Minor cleanups. 2014-03-02 22:15:53 +13:00
Aldo Cortesi
875f5f8cb6 Cipher specification. 2014-03-02 17:35:41 +13:00
Aldo Cortesi
f373ac5b6c Improve explicit certificate specification
- Support cert/key in the same PEM file
- Rationalize arguments, expand tests, clean up a bit
2014-03-02 17:27:24 +13:00
Aldo Cortesi
863b1e1455 Update for pathod.SSLOptions changes. 2014-03-02 15:58:53 +13:00
Aldo Cortesi
a34a483184 Adapt for new pathod and netlib APIs. 2014-03-02 15:14:22 +13:00
Aldo Cortesi
43a760c935 Merge pull request #223 from droope/improve-backwards-search
Improve search to also search backwards.
2014-02-26 10:18:26 +13:00
Pedro Worcel
cffae49e34 add helpful messages on wrap 2014-02-22 18:04:56 +13:00
Pedro Worcel
3e50034428 fix the wrapping on backward searches 2014-02-22 17:15:37 +13:00
Pedro Worcel
9fe6b8fd26 add docs 2014-02-22 16:36:35 +13:00
Pedro Worcel
4284fd3614 add multi-line support to backwards search 2014-02-22 16:32:22 +13:00
Pedro Worcel
3c02865e8b add multi-line support 2014-02-22 15:32:35 +13:00
Pedro Worcel
7a154e1ae1 add basic backwards search 2014-02-22 15:00:10 +13:00
Maximilian Hils
c2828de4a1 fix bug: ensure that server connection is present for tcp connections 2014-02-17 17:25:45 +01:00
Maximilian Hils
b5d02add28 Merge branch 'master' of github.com:mitmproxy/mitmproxy 2014-02-17 00:15:58 +01:00
Maximilian Hils
39f73776dc Bump version
Do it now already so that mitmproxy will warn the user if netlib is not from master.
2014-02-11 12:09:24 +01:00
Maximilian Hils
d9a6037299 fix comments 2014-02-09 02:54:07 +01:00
Aldo Cortesi
a85974eaa8 Fix flow initialization order error
Resolves #210
2014-02-08 17:17:35 +13:00
Aldo Cortesi
b642b4870b Better response when mitmproxy crashes. 2014-02-08 14:15:19 +13:00
Aldo Cortesi
569e5d348a Merge pull request #208 from kmike/pillow-setuppy
Remove upper bound for Pillow in setup.py
2014-02-08 12:45:06 +13:00
Aldo Cortesi
fe4bab2e6f Cleanup: fix unit tests, simpler app test, remove print statements 2014-02-08 12:33:59 +13:00
Maximilian Hils
33b10da57c fix tests 2014-02-07 18:26:42 +01:00
Maximilian Hils
735e4400c4 add tests for reconnect to upstream proxy, ensure that server_reconnect is always hooked 2014-02-07 18:14:15 +01:00
Maximilian Hils
545fc2506b Achievement Unlocked: Proxy Chain 2014-02-07 07:08:59 +01:00
Maximilian Hils
9526c5d565 fix race conditions in test suite 2014-02-07 04:15:24 +01:00
Maximilian Hils
d07029d575 coverage++ 2014-02-07 03:56:57 +01:00
Maximilian Hils
9f5f2b7071 test libmproxy.app, increase coverage 2014-02-07 02:36:39 +01:00
Maximilian Hils
66090f9aea finalize merge 2014-02-06 23:05:53 +01:00
Maximilian Hils
ff264eb309 add functionality to change the destination server 2014-02-06 22:16:26 +01:00
Maximilian Hils
134c7795f8 remove LEGACY switches, always update flow.server_conn 2014-02-06 01:19:51 +01:00
Maximilian Hils
cb397ec788 fix bugs, expose timestamp information to console ui 2014-02-06 00:53:39 +01:00
Maximilian Hils
80683e77bc mock urwid to run console tests on windows, push failing testcases down to 0. :-) 2014-02-05 23:17:26 +01:00
Maximilian Hils
f26d91cb81 add skeleton to change destinatin server during intercept, fix all testcases on windows 2014-02-05 20:26:47 +01:00
Mikhail Korobov
3e0e4b7dec remove upper bound for Pillow in setup.py 2014-02-05 19:43:08 +06:00
Maximilian Hils
9a55cd7332 Merge branch 'master' into tcp_proxy 2014-02-05 14:33:44 +01:00
Maximilian Hils
d864a326d2 fix all tests except those using set_url and get_url 2014-02-05 14:33:17 +01:00
Maximilian Hils
6d9b28f2ea add example to show how to read mitmproxy dump files, refs #207 2014-02-04 19:10:55 +01:00
Maximilian Hils
fd828bf959 shutdown properly if we dont keep serving 2014-02-04 18:40:12 +01:00
Steven Van Acker
66da73d8a9 fixing bug: AttributeError: DumpMaster instance has no attribute 'unload_script' 2014-02-04 14:49:51 +01:00
Maximilian Hils
6a53ae5fd3 push failing tests down to 43 2014-02-04 05:02:17 +01:00
Maximilian Hils
f6253a80ff add priorities for the destination server address 2014-02-04 02:56:59 +01:00
Maximilian Hils
2db5f9de26 bring failing tests back into the double-digit range 2014-01-31 04:45:39 +01:00
Maximilian Hils
7d96ff00ef remove _flow_map from state, improve logging 2014-01-31 03:01:51 +01:00
Maximilian Hils
30a44cbb41 fix server reconnect 2014-01-31 01:44:55 +01:00
Maximilian Hils
6ce1470631 move StateObject back into libmproxy 2014-01-31 01:06:35 +01:00
Maximilian Hils
5fce7be592 complete state handling 2014-01-30 20:11:01 +01:00
Maximilian Hils
8544a5ba4b add generic TCP handler with SSL support, move StateObject into netlib 2014-01-30 18:56:23 +01:00
Maximilian Hils
179c3ae8aa polish SimpleStateObject 2014-01-30 06:03:41 +01:00
Maximilian Hils
e00bbccfd6 remove old classes 2014-01-30 05:21:53 +01:00
Maximilian Hils
40bf42f14a merge flow classes. current status: basic mitmdump working 2014-01-30 05:00:13 +01:00
Maximilian Hils
607f777811 fix most testsuite errors, improve proxy error handling 2014-01-29 02:49:11 +01:00
Maximilian Hils
1e3e0dd127 merge master 2014-01-28 17:29:28 +01:00
Maximilian Hils
17f09aa0af unify ipv4/ipv6 address handling 2014-01-28 17:28:20 +01:00
Aldo Cortesi
3aa78f9ff3 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2014-01-28 15:20:10 +13:00
Aldo Cortesi
e5d2829364 docs: fix spacing of page headers 2014-01-28 15:19:53 +13:00
Maximilian Hils
36930a6e1d actually remove test dependencies from requirements.txt 2014-01-28 03:17:27 +01:00
Aldo Cortesi
fcb569b7d7 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2014-01-28 15:12:57 +13:00
Aldo Cortesi
0b7a7ffcb1 Changelog. 2014-01-28 15:12:44 +13:00
Maximilian Hils
125166020b move test requirements out of main requirements.txt 2014-01-28 03:09:21 +01:00
Aldo Cortesi
5ce9c2eb65 Update contributors. 2014-01-28 15:04:20 +13:00
Aldo Cortesi
647a11c900 travis: irc notifications 2014-01-28 14:52:41 +13:00
Aldo Cortesi
f3369529ab Adjust docs for web app certificate installation. 2014-01-28 13:24:11 +13:00
Aldo Cortesi
23ba4eccd8 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2014-01-28 12:55:03 +13:00
Aldo Cortesi
ae87affcbe Nicer layout for cert install options. 2014-01-28 09:44:33 +13:00
Aldo Cortesi
784f411273 Instructions for adding mitmproxy certificates to the Java trust store.
Fixes #146
2014-01-27 14:45:20 +13:00
Aldo Cortesi
2df321e71b Use the mitm.it domain for the app, turn it on by default. 2014-01-27 14:37:29 +13:00
Aldo Cortesi
332eb67dfe Android doc update. 2014-01-27 14:17:16 +13:00
Aldo Cortesi
f47d89ff4e Revert "Move the doc tree out into its own repo."
This reverts commit 8f88fcedd6.
2014-01-27 14:16:23 +13:00
Aldo Cortesi
47c7e37723 Serve correct certs from app. Enable Windows and Android icons. 2014-01-24 10:46:34 +13:00
Maximilian Hils
5811e79361 print warning if netlib and mitmproxy versions are different. 2014-01-22 16:21:17 +01:00
Maximilian Hils
94e530ec4f merge master 2014-01-22 16:01:31 +01:00
Aldo Cortesi
9044b8b8f5 travis: install netlib from git before installing requirements. 2014-01-22 13:43:59 +13:00
Aldo Cortesi
faf4338d13 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy
Conflicts:
	doc-src/certinstall/android.html
2014-01-22 13:34:46 +13:00
Aldo Cortesi
8f88fcedd6 Move the doc tree out into its own repo. 2014-01-22 13:33:02 +13:00
Maximilian Hils
cf094c2fbc Add note on emulated android devices. refs #204 2014-01-21 21:56:36 +01:00
Aldo Cortesi
7ddc941116 Silence pyflakes
And pick up one bug as a consequence.
2014-01-19 18:16:24 +13:00
Aldo Cortesi
cabd848b1e Release test script and checklist. 2014-01-19 18:08:59 +13:00
Aldo Cortesi
453075c77a Doc and readme tweaks. 2014-01-19 18:08:50 +13:00
Aldo Cortesi
dc59325329 Refactor docs to define nav sidebar in only one place. 2014-01-19 17:40:26 +13:00
Aldo Cortesi
f431eb5acc Tweak setup.py to allow installs outside source dir
Also fix mitmdump version output
2014-01-19 16:06:03 +13:00
Aldo Cortesi
64be9b1a8a Optionally take the mitmproxy path for doc rendering from a env variable. 2014-01-19 13:52:45 +13:00
Aldo Cortesi
bd684d4540 PyInstaller bug requiring a console import in mitmdump is gone 2014-01-19 13:33:15 +13:00
Aldo Cortesi
5782f9393e Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2014-01-19 13:28:18 +13:00
Aldo Cortesi
bf1399fa2b Handle views that don't support search gracefully
This includes all key/value formatted views, e.g. the image view. We
need to support these ultimately, but no time before the next release.
2014-01-19 13:23:38 +13:00
Aldo Cortesi
f5f46bf080 Re-enable caching on search. 2014-01-19 12:43:58 +13:00
Maximilian Hils
1786d77819 Add functionality to transparently proxify connections to other HTTPS proxies 2014-01-18 22:57:28 +01:00
Maximilian Hils
0b4ad05e02 merge master 2014-01-18 17:25:59 +01:00
Maximilian Hils
6c24b1d0d2 get server reconnect right, fix timestamps 2014-01-18 17:15:33 +01:00
Maximilian Hils
862b532fff small refactorings, bugs fixed 2014-01-18 15:35:37 +01:00
Maximilian Hils
5acbef236c fix sni bug: respond with the correct certificate 2014-01-16 02:33:14 +01:00
Maximilian Hils
779e303dfe fix syntax highlighting for countershape urls by using different quotes 2014-01-14 17:58:42 +01:00
Maximilian Hils
92966e7c48 add tutorial for transparent proxying, other minor docs improvements 2014-01-14 17:47:33 +01:00
Maximilian Hils
621807f697 add basic error handling 2014-01-13 02:25:58 +01:00
Aldo Cortesi
069aca1df4 Deprecate Flow.unload_script in favor of Flow.unload_scripts
In the presence of arguments, unloading a single script is clumsy and
less useful.
2014-01-13 14:20:34 +13:00
Aldo Cortesi
4f69eef8f3 Extract command parsing and use in script grid editor 2014-01-13 14:15:17 +13:00
Aldo Cortesi
42d4a2fae9 Script refactoring: move script command parsing into script module. 2014-01-12 23:02:29 +13:00
Aldo Cortesi
e5776b8be3 Clean up and clarify script API 2014-01-12 13:59:32 +13:00
Aldo Cortesi
58e1b3a47f Start refactoring scripts
- Move ScriptContext into script module
- Use mock module instead of hand-rolled mock objects in tests
2014-01-12 12:49:19 +13:00
Maximilian Hils
2f63da99c9 ignore console test utilities on windows 2014-01-10 01:39:16 +01:00
Maximilian Hils
24fc8ff292 fix header assembly, other improvements 2014-01-10 01:38:28 +01:00
Maximilian Hils
efdb25ef68 improve https handling 2014-01-09 17:56:42 +01:00
Maximilian Hils
3090267ca4 display build status from master branch 2014-01-09 17:38:08 +01:00
Maximilian Hils
607d79b63f groundwork completed 2014-01-09 05:34:29 +01:00
Maximilian Hils
4637d467c0 Delete ~$$proxy-flowchart.~vsdx 2014-01-07 02:30:04 +01:00
Maximilian Hils
ea2f17680b continue work on the proxyhandler 2014-01-07 02:29:10 +01:00
Maximilian Hils
b75cfd5bf8 Merge pull request #199 from dwilbraham/add_protobuffer_content_type
Decode content as protobuf if the content_type is "application/x-protobuffer"
2014-01-06 04:46:59 -08:00
Dan Wilbraham
1c2e638d53 Update ViewProtobuf in contentview.py to also decode as protobuf if the content_type is "application/x-protobuffer" 2014-01-05 23:40:02 +00:00
Aldo Cortesi
e31fc8ac40 Tweaking web stub app, icons for certificates, serve PEM correctly. 2014-01-05 16:59:27 +13:00
Aldo Cortesi
a49115a227 Remove / binding alias for limit
The search and limit functionality is too different.
2014-01-05 14:14:36 +13:00
Maximilian Hils
b34ad82b52 first steps on tcp proxying 2014-01-05 01:03:55 +01:00
Aldo Cortesi
d5f9b02615 Merge pull request #192 from mitmproxy/refactor_read_http_body
move CONTINUE checks into mitmproxy
2014-01-04 14:37:47 -08:00
Aldo Cortesi
7d37e0ce10 Merge pull request #193 from droope/search-functionality
Search functionality
2014-01-04 14:34:20 -08:00
Aldo Cortesi
8a599be060 Merge branch 'migrate_from_pil_to_pillow' of https://github.com/Kami/mitmproxy into Kami-migrate_from_pil_to_pillow
Conflicts:
	requirements.txt
2014-01-05 11:15:27 +13:00
Aldo Cortesi
ac31039ad3 Merge pull request #198 from Kami/add_css_view
Add CSS view which beautifies minified CSS files
2014-01-04 14:04:02 -08:00
Aldo Cortesi
a2261e3cf0 Introduce file descriptor decorators for Request objects
Which lets us enable the apps again, now running from flow.py
2014-01-05 10:58:53 +13:00
Tomaz Muraus
c5f4614ba5 Fix CSS view prompt, update display mode options. 2014-01-04 17:13:46 +01:00
Tomaz Muraus
ff2d7a7501 Provide more sensible serializer options. 2014-01-04 15:50:40 +01:00
Tomaz Muraus
e9f6302ec7 Add CSS view which beautifies CSS files if cssutils library is available,
otherwise it acts as a no-op.
2014-01-04 04:49:50 +01:00
Tomaz Muraus
1fa6bcbd5a Update another reference to PIL. 2014-01-04 03:15:08 +01:00
Aldo Cortesi
45eab17e0c Decouple message type from message class name. 2014-01-04 14:42:32 +13:00
Aldo Cortesi
1e07d9e6e7 Move app mechanism to flow.py
Disable apps while message passing is improved.
2014-01-04 14:35:11 +13:00
Aldo Cortesi
f25c532960 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2014-01-04 13:15:13 +13:00
Maximilian Hils
8472ed97ed fix #195
(untested)
2014-01-03 23:35:25 +01:00
Tomaz Muraus
e9c2c0ac3a Migrate from Pil to the latest version of Pillow. 2014-01-03 21:13:14 +01:00
Aldo Cortesi
3aa4b6603c Fix app in mitmproxy console, update to bootstrap 3. 2014-01-03 15:29:32 +13:00
Maximilian Hils
b9d4eb103e list mock as requirement (via @droope) 2013-12-29 10:51:47 +01:00
Pedro Worcel
799c877676 now really fix it + test 2013-12-26 22:18:34 +13:00
Pedro Worcel
a4b059c2a7 fix bug that happens after searching for a non-existant string, and
later for an existant one.
2013-12-26 21:53:04 +13:00
Pedro Worcel
34a09780ee add docs 2013-12-26 17:26:51 +13:00
Pedro Worcel
70f6bb301b added 'n' functionality, tidy up & testing 2013-12-26 17:16:26 +13:00
Pedro Worcel
21efe2f2c8 add looping around 2013-12-26 17:04:18 +13:00
Pedro Worcel
9cf8a1a89d fix failing test 2013-12-25 21:08:20 +13:00
root
bcf5620239 fix crash 2013-12-25 16:57:54 +13:00
root
95406bd119 Add focusing, and fixes non-clearance of prev searches. Add
documentation.
2013-12-25 16:50:29 +13:00
root
932464d0a0 test passing, UI still not working 2013-12-24 14:28:20 +13:00
root
359573a764 add search with / for compatibility with what I'll do. 2013-12-23 16:41:46 +13:00
Maximilian Hils
d6aa7dc22e ignore web gui specific paths that won't get cleaned up when changing branches 2013-12-17 21:28:21 +01:00
Maximilian Hils
e643759ef6 merge smurfix/fix2, add serverconnect hook docs, adjust tests 2013-12-16 22:10:06 +01:00
Maximilian Hils
f4b58ba495 move CONTINUE checks into mitmproxy 2013-12-15 06:33:18 +01:00
Maximilian Hils
6ec2e6f24f fix script path error in tests 2013-12-15 02:51:35 +01:00
Maximilian Hils
605950bfdf add @concurrent decorator for inline scripts, fixes #176 2013-12-15 02:43:16 +01:00
Aldo Cortesi
224cd41dc2 Merge pull request #189 from mitmproxy/refactor_proxyhandler
Refactor ProxyHandler
2013-12-13 15:05:22 -08:00
Matthias Urlichs
afff1f1734 Reconnect if the server-connect hook needs the request to decide what to do 2013-12-12 10:00:23 +01:00
Matthias Urlichs
517e5e6688 handle a hook changing connection parameters 2013-12-12 09:22:55 +01:00
Matthias Urlichs
7b6057fa64 serverconnect hook: Set sc.request
The serverconnect hook script might need to examine the incoming request
in order to set up the server connection.

Example use: bind to a distinct source IPv6 address for each client.
2013-12-12 07:56:40 +01:00
Maximilian Hils
39ffe10334 add content-length 0 if we remove header for chunked encoding, fixes #186 2013-12-12 04:42:29 +01:00
Maximilian Hils
4a32a65e0e change certificate path for android, fix #171 2013-12-12 03:40:23 +01:00
Maximilian Hils
7db1430ee7 ignore missing CN in certificates. fixes #169 2013-12-12 03:24:17 +01:00
Maximilian Hils
28a234e28b store resolved ip addresses, fixes #187 2013-12-12 02:11:22 +01:00
Maximilian Hils
5f6eca8856 Merge pull request #190 from BillinghamJ/patch-1
Added small note of file format
2013-12-11 05:13:25 -08:00
James Billingham
3481c54d02 Added small note of file format 2013-12-11 13:11:19 +00:00
Maximilian Hils
fb985b8b87 Merge remote-tracking branch 'origin/master' 2013-12-11 14:05:18 +01:00
Maximilian Hils
e99eaa3a19 add documentation on how to use custom certificates 2013-12-11 14:04:45 +01:00
Aldo Cortesi
a600441e37 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2013-12-10 22:24:23 +13:00
Aldo Cortesi
1bbeace350 Bump version 2013-12-10 22:23:38 +13:00
Maximilian Hils
f0e96be142 ensure binary read on windows 2013-12-10 03:13:37 +01:00
Maximilian Hils
21de99cb09 add comments 2013-12-10 02:30:07 +01:00
Maximilian Hils
a78b185278 refactor ProxyHandler, remove duplicate code 2013-12-10 01:47:19 +01:00
Maximilian Hils
2be19a5620 Merge remote-tracking branch 'origin/master' 2013-12-09 19:10:40 +01:00
Maximilian Hils
4984bbb83b remove code duplication in ProxyHandler by unifying read_transparent and read_reverse 2013-12-09 19:10:15 +01:00
Aldo Cortesi
1d536f64d5 Small workaround to make mitmproxy work again.
Further work is required to make scripts work again, though.
2013-12-09 22:34:47 +13:00
Maximilian Hils
3bd238de37 backport changes to fix tests 2013-12-08 15:46:11 +01:00
Maximilian Hils
a509a9037b Merge branch 'master' into 0.10 2013-12-08 14:14:57 +01:00
Maximilian Hils
4dcb2435fc Merge remote-tracking branch 'origin/0.10' into 0.10 2013-12-08 14:14:51 +01:00
Maximilian Hils
e3c69fd105 Merge remote-tracking branch 'origin/master' 2013-12-08 14:14:31 +01:00
Aldo Cortesi
3a1d85ab18 Merge pull request #134 from mhils/scripts_improvements
Support multiple scripts and script arguments. refs #76
2013-12-08 01:14:12 -08:00
Aldo Cortesi
7aeaf9d448 Merge pull request #161 from mitmproxy/external_webapp
External webapp
2013-12-08 01:09:46 -08:00
Aldo Cortesi
73791f986a Merge pull request #166 from ghjc/forward-proxy
Added -F http[s]://server:port option that allows MITM to forward traffi...
2013-12-08 01:05:33 -08:00
Aldo Cortesi
4816cae98c Merge pull request #170 from jsoriano/master
Reverse proxy works with SSL
2013-12-08 01:02:17 -08:00
Aldo Cortesi
cb3a4a0f3c Remove obsolete test. 2013-12-08 21:58:55 +13:00
Aldo Cortesi
dfcec4ffba Merge pull request #180 from mitmproxy/add_serverconnection_scripthook
Add serverconnection scripthook
2013-12-08 00:55:55 -08:00
Aldo Cortesi
83f061c1a0 Merge pull request #184 from richie5um/RichS-RateDivideByZeroIssue
Fix divide by zero issue when timestamp start and end are the same
2013-12-08 00:54:11 -08:00
Aldo Cortesi
925eaa9343 Add a note to the docs about pf redirection of traffic from the host itself. 2013-12-08 21:38:53 +13:00
Aldo Cortesi
1e733f3149 Merge branch 'fix_invalid_tcp_close' 2013-12-08 14:32:40 +13:00
Maximilian Hils
594e61c647 Merge branch 'master' into 0.10 2013-12-08 01:44:09 +01:00
Maximilian Hils
948d4c0445 Merge remote-tracking branch 'origin/master' 2013-12-08 01:42:55 +01:00
Rich Somerfield
9a986e0c1b Fix divide by zero issue when timestamp start and end are the same 2013-11-26 14:14:51 -08:00
Maximilian Hils
d4c3b1c213 attempt to fix https://github.com/mitmproxy/netlib/issues/24 2013-11-19 04:08:16 +01:00
Maximilian Hils
675518f873 add serverconnect script hook 2013-11-18 17:25:52 +01:00
Maximilian Hils
f63380a04e Merge pull request #173 from joebowbeer/patch-1
Update android.html
2013-10-22 05:23:25 -07:00
joebowbeer
00a000091e Update android.html
Make the sdcard path in the text consistent with the screen shot (android-shellwgetmitmproxyca.png).

/sdcard/Download (singular) is the correct path.
2013-10-18 22:58:06 -07:00
Jaime Soriano Pastor
7140323bdb New method establish_ssl to avoid duplicated code 2013-09-26 12:38:13 +02:00
Jaime Soriano Pastor
f33d128a7f Reverse proxy works with SSL 2013-09-26 12:23:48 +02:00
Maximilian Hils
2956c144d3 Merge branch 'master' into 0.10 2013-09-14 23:47:04 +02:00
JC
65d1ed1b3c Added -F http[s]://server:port option that allows MITM to forward traffic to another http server upstream. 2013-08-30 17:19:58 -07:00
Maximilian Hils
38a1135ab8 add status images to README, include TestHTTPS again 2013-08-25 04:31:35 +02:00
Maximilian Hils
404445cbdf exclude TestHTTPS for testing travis/coverage 2013-08-25 04:19:43 +02:00
Maximilian Hils
62fa2e6c07 fix travis, loose requirements.txt 2013-08-25 04:03:53 +02:00
Maximilian Hils
08a26337a0 re-add requirements.txt 2013-08-25 03:53:19 +02:00
Maximilian Hils
63ece45de5 add coveralls.io 2013-08-25 03:45:32 +02:00
Aldo Cortesi
8d954d9965 Version bump. 2013-08-25 10:37:35 +12:00
Aldo Cortesi
789700ade2 Prep for release: CHANGELOG and CONTRIBUTORS 2013-08-25 10:28:15 +12:00
Aldo Cortesi
6a31d32712 Merge pull request #162 from mhils/add_travis_ci
Add travis CI
2013-08-22 15:32:39 -07:00
Aldo Cortesi
aaba940dea Fix pretty_size unit tests. 2013-08-23 10:28:16 +12:00
Aldo Cortesi
a2643b52f9 Tweak timing display
- Remove elapsed time. Space is at a premium here, and this is somewhat
redundant with the rate figure. We should display complete timing information
somewhere in the detailed flow view.
- Tone down the colour. Reserve highlights for stuff that should really pop out
to the user.
- Make rate calculation more acurate. Include header sizes. Use response start
and end time, rather than request end and response end. This means that we show
actual transfer rates, not including DNS requests and so forth.
2013-08-23 10:25:44 +12:00
Aldo Cortesi
09f651247a Merge pull request #159 from kmanna/elapsed_time
Transfer Rate and Elapsed Time Statistics
2013-08-22 14:34:55 -07:00
Maximilian Hils
fa3dce9e11 add jsbeautifier to requirements.txt 2013-08-20 13:47:34 +02:00
Maximilian Hils
02120eb5c8 travis ci: fix pip install order 2013-08-20 13:42:25 +02:00
Maximilian Hils
4bbcf795e3 travis ci: make sure that netlib is installed from head 2013-08-20 13:32:18 +02:00
Maximilian Hils
4790399041 add travis ci 2013-08-20 13:25:47 +02:00
Maximilian Hils
bb4748fb8f add option to expose webapp externally, remove distinct ip setting 2013-08-18 20:03:53 +02:00
Maximilian Hils
729677cd85 Merge branch 'master' into 0.10 2013-08-17 13:30:36 +02:00
Maximilian Hils
a558c016d4 Merge remote-tracking branch 'origin/master' 2013-08-17 13:28:24 +02:00
Maximilian Hils
aeb8958236 update gitignore to not include PyCharms 2013-08-17 13:27:53 +02:00
Kyle Manna
41041159f6 console: Add support for displaying transfer rate
* Display the rate in the the response row.
* Very handy for passive performance analysis.
2013-08-13 16:33:53 -07:00
Kyle Manna
ea28496bea console: Add support for displaying elapsed time
* Display the elapsed time in the the response row.
* Very handy for passive performance analysis.
2013-08-13 16:33:53 -07:00
Kyle Manna
4ede2f126a utils: Add missing "B" for pretty_size()
* Add missing unit for megabytes, should print "MB".
2013-08-13 16:33:39 -07:00
Aldo Cortesi
f850bdd848 Revamp dummy cert store
We no longer keep these on disk. This is for a number of reasons, including
some race conditions and the fact that some valid IDNA-encoded domain names are
not valid file names on Windows.
2013-08-12 16:04:02 +12:00
Aldo Cortesi
2c4e5e0a73 Better handling of cert errors on connection. 2013-08-10 23:07:22 +12:00
Aldo Cortesi
edb10e33aa Remove GPL notices left in source files after our change to the MIT license.
Thanks to Roy Shamir for reporting this.
2013-08-01 11:08:00 +12:00
Aldo Cortesi
439d9a294c Make use of a change to netlib.tcp that clarifies error conditions for flush and close.
Should fix #144.
2013-07-30 09:42:29 +12:00
Aldo Cortesi
5f0b5532bc Show an error when attempting to decode invalid data. 2013-07-29 18:14:11 +12:00
Aldo Cortesi
d54398cc79 Repair minor user interface issue that caused brief flashes of duplicate flows in the flow list. 2013-07-29 12:38:41 +12:00
Maximilian Hils
29bcbd57d5 fix #144
netlib wraps IOError in NetLibDisconnect, so we need to cover this as well.
2013-07-28 21:05:17 +02:00
Aldo Cortesi
a21c989ccd Fix startup with no state.
Bug introduced in previous patch.
2013-07-28 22:40:51 +12:00
Aldo Cortesi
df3d2d70ed Terminate can be called on an unconnected server connection. 2013-07-28 18:05:04 +12:00
Aldo Cortesi
10a9e3365f Some refactoring of the console inteface.
Reduce some state duplication, by removing currentflow variable.

Fixes #141
2013-07-28 18:00:49 +12:00
Aldo Cortesi
10b744ee08 Properly terminate SSL server connections.
Before, we had dangling SSL server connections causing resource exhaustion.

I believe this fixe #144 and #153
2013-07-28 10:50:25 +12:00
Aldo Cortesi
5c1157ddaf Move app instantiation out of proxy.py. 2013-07-24 10:32:56 +12:00
Aldo Cortesi
64ce3b358f Make a start on mitmproxy web app. 2013-07-23 10:28:35 +12:00
Aldo Cortesi
55f7e8d5b9 Don't take minor version into account when checking serialized data compatiblity. 2013-07-13 14:44:09 +12:00
Aldo Cortesi
9febc0813f Merge pull request #143 from liyanage/upstream-pull-request-2013-07-07
Some improvements for the OS X mitmproxywrapper.py script
2013-07-11 15:07:01 -07:00
Marc Liyanage
e5c0891e84 Pass extra command line arguments to mitmproxy 2013-07-08 20:56:05 -07:00
Aldo Cortesi
c4d03d8b85 Merge pull request #137 from caujka/master
Handling for EOF reading error in gzipped content
2013-07-01 17:37:15 -07:00
Aldo Cortesi
1f029306d6 Merge pull request #139 from smurfix/fixes
Close connection when flush fails
2013-07-01 17:36:33 -07:00
Matthias Urlichs
d9cc6f1dd6 proxy.py: Catch channel.ask() returning None when terminating 2013-06-28 07:53:56 +02:00
Matthias Urlichs
be1377850e Close connection when flush fails 2013-06-26 15:02:55 +02:00
Maximilian Hils
6fe175913e fix request_timestamps test case 2013-06-18 00:54:07 +02:00
Maximilian Hils
ca9740df20 skip tests on windows that don't make sense 2013-06-18 00:53:38 +02:00
Oleksandr Sheremet
0afd3fc42f Added handling for EOF reading error in gzipped content. 2013-06-17 21:46:54 +03:00
Maximilian Hils
d462b444b7 update tests to reflect changes to options.scripts 2013-06-17 16:48:06 +02:00
Maximilian Hils
84248d431b fix send_error behavior if there are no headers 2013-06-17 10:52:19 +02:00
Aldo Cortesi
826a1fdaa2 Minor adjustment for website docs pages. 2013-06-16 16:59:28 +12:00
Aldo Cortesi
54df58b7a8 Update changelog. Move to lsof for transparent OSX is not working on Mountain Lion. 2013-06-16 16:23:59 +12:00
Aldo Cortesi
886970040b Revert "Use lsof instead of pfctl to find target host on OSX in transparent mode."
This reverts commit ffeede9b39.
2013-06-16 16:23:36 +12:00
Aldo Cortesi
c1a60a1f6b CHANGELOG and CONTRIBUTORS 2013-06-16 16:08:41 +12:00
Aldo Cortesi
c89378047b Formalize OSX binary script a bit more. 2013-06-16 15:50:08 +12:00
Aldo Cortesi
a386dff058 Remove pyinstaller specs. Add a quick-and-dirty script for building OSX binaries. 2013-06-16 15:13:28 +12:00
Aldo Cortesi
db43f1ffcc Version bump, doc extension, URLs to github.com/mitmproxy/* 2013-06-16 13:59:01 +12:00
Aldo Cortesi
bef5662365 Merge pull request #119 from jasonanovak/ViewDocumentation
Documentation for adding a new content viewer / View class
2013-06-15 15:53:49 -07:00
Maximilian Hils
fd36142018 Merge remote-tracking branch 'origin/scripts_improvements' into 0.10 2013-06-16 00:41:43 +02:00
Aldo Cortesi
34f286df51 Merge pull request #136 from mhils/fix_binary_rw
always read files in binary mode
2013-06-15 15:31:36 -07:00
Maximilian Hils
ba47690a03 always read files in binary mode 2013-06-16 00:23:44 +02:00
Maximilian Hils
b4f6f09c83 update test script 2013-06-16 00:10:53 +02:00
Maximilian Hils
2b4af8d475 add support for multiple scripts and script arguments. refs #76 2013-06-13 16:09:38 +02:00
Aldo Cortesi
d3beaa7382 Merge pull request #132 from ipopov/master
A humble pull request
2013-06-08 16:28:47 -07:00
Aldo Cortesi
1a5c27aa7d Massage content-type before sending it to mime detection
Fixes #67
2013-06-09 11:26:44 +12:00
Aldo Cortesi
9f6657727b Make UTF environment detection more robust.
Fixes #125
2013-06-09 11:20:02 +12:00
Aldo Cortesi
7ef68b5a13 Fix creation of new response when none existed before.
Fixes #133
2013-06-09 11:14:34 +12:00
Aldo Cortesi
19279033b3 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2013-06-09 10:47:39 +12:00
Aldo Cortesi
0b5423f6a1 Merge pull request #129 from LordMike/master
Quick fix for issue #128
2013-06-08 15:46:24 -07:00
Marc Liyanage
09c95ece52 Re-run mitmproxywrapper.py with sudo if necessary. 2013-06-02 12:43:49 -07:00
Aldo Cortesi
ebf0aaa3db Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2013-05-30 09:22:16 +12:00
Aldo Cortesi
df7c7796b2 Update license trove classifier. 2013-05-30 09:22:00 +12:00
Ivaylo Popov
ffeede9b39 Use lsof instead of pfctl to find target host on OSX in transparent mode. 2013-05-27 23:09:42 -04:00
Aldo Cortesi
82cb1dae41 Merge pull request #131 from squidsoup/master
Easy dep install with pip
2013-05-27 03:11:05 -07:00
Kit Randel
aaba1bd7d1 Added requirements.txt to ease installation of deps for hacking on mitmproxy. 2013-05-24 15:23:47 +12:00
Michael Bisbjerg
125b3e5e5b - Quick-fix for issue #128
New bug: It correct-cases Content-Length for any webserver sending other casings, like CONTENT-LENGTH.
2013-05-21 15:57:14 +02:00
Aldo Cortesi
8608cdf177 Update PyOpenSSL version requirement. 2013-05-20 12:44:07 +12:00
Marc Liyanage
ceafd411f3 Change the proxy settings for all connected interfaces, not just the primary one. 2013-05-15 22:40:08 -07:00
Aldo Cortesi
3460d56fcc Merge pull request #124 from liyanage/master
Add mitmproxywrapper.py script for OS X users
2013-05-15 16:11:40 -07:00
Marc Liyanage
50ac988363 Add mitmproxywrapper.py 2013-05-15 15:24:34 -07:00
Aldo Cortesi
9e94fdc6db Make ready for pyinstaller. 2013-05-15 11:25:25 +12:00
Aldo Cortesi
52b56e23b2 Contributor sync. 2013-05-15 09:56:14 +12:00
Aldo Cortesi
2dfff2a75f Styling. 2013-05-15 09:23:25 +12:00
Aldo Cortesi
36b07264f0 Mods to "How mitmproxy works" 2013-05-14 22:44:11 +12:00
Aldo Cortesi
b5cf3b4f74 README, Linux transparent mode docs, requirements additions. 2013-05-14 09:12:26 +12:00
Aldo Cortesi
d86b7c7f77 Prin an error when mitmproxy runs in a non-UTF environment. 2013-05-13 21:41:16 +12:00
Aldo Cortesi
11cc48ca25 Adapt for new request_client_cert option in netlib. 2013-05-13 09:08:24 +12:00
Aldo Cortesi
bc88930fb7 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2013-05-05 13:19:14 +12:00
Aldo Cortesi
9fa09cc1f9 Fix crash in client playback. 2013-05-05 13:18:52 +12:00
Aldo Cortesi
69a40c8179 Merge pull request #118 from jasonanovak/protobufs
Add error checking to ViewProtobuf
2013-05-04 17:37:32 -07:00
Aldo Cortesi
5cd7563d12 Minor coverage. 2013-04-30 09:13:33 +12:00
Aldo Cortesi
98b860b0f7 Adapt docs for website embedding. 2013-04-30 09:12:06 +12:00
Jason A. Novak
bfb3828f37 Finalizing documentation 2013-04-21 14:30:30 -05:00
Jason A. Novak
208204d33a Further cleanup of documentation 2013-04-21 14:28:00 -05:00
Jason A. Novak
d48d3d4eb3 More documentation cleanup and formatting 2013-04-21 14:20:51 -05:00
Jason A. Novak
1400880d58 More documentation 2013-04-21 13:58:08 -05:00
Jason A. Novak
e951b86c21 More documentation 2013-04-21 13:36:05 -05:00
Jason A. Novak
f78dada550 Add error checking to ViewProtobuf
There are protobufs that protoc can't parse.  When protoc --decode_raw
fails, it returns nothing to stdin, and writes "Failed to parse input."
to stderr. Before this commit, if protoc --decode_raw couldn't parse
the protobuf, the blank stdout output would get returned to the view;
with this commit stderr gets caught and returned to the view.
2013-04-21 12:46:37 -05:00
Jason A. Novak
52a4a8bbde Continue work on documentation of adding views 2013-04-21 12:40:35 -05:00
Jason A. Novak
0ad505ed7d Begin work on documenting adding a new view 2013-04-21 12:40:03 -05:00
Aldo Cortesi
61c794e08f Merge pull request #107 from rouli/master
Adding remote TCP and SSL setup timestamps
2013-04-19 17:19:26 -07:00
Aldo Cortesi
793c41a5c4 Merge pull request #112 from hamstah/protobuf-view
Adds a new view for protocol buffers
2013-04-19 17:18:44 -07:00
Aldo Cortesi
7c4c6f5912 Merge pull request #113 from mhils/redirect_example
Add redirect example
2013-04-19 17:17:59 -07:00
Aldo Cortesi
7bd3e1d2a4 Merge pull request #116 from afh/pull/highlight_key_help
Correct display mode highlight keys
2013-04-19 17:17:32 -07:00
Alexis Hildebrandt
3d7f31b23d Correct display mode highlight keys
Add html display mode to the help documentation.
Correct html and hex display mode highlight keys (help used 'h' for hex).
Correct json display mode highlight keys.
2013-04-16 23:54:34 +02:00
Maximilian Hils
7a7914463f Add redirect example 2013-04-07 19:16:01 +02:00
Nicolas Esteves
d4cfbbb822 Adds a new view for protocol buffers
The view uses protoc from the Google protocol buffer
tools. If the tool isn't installed, the view isn't
shown.

Google protobuf repo:
https://code.google.com/p/protobuf/
2013-04-06 19:21:13 +01:00
Aldo Cortesi
51b775cfd4 Merge pull request #101 from eentzel/keep-blank-params
Keep blank URL parameters
2013-04-04 15:55:51 -07:00
Aldo Cortesi
ca9c60d2eb Docs. 2013-04-05 11:55:28 +13:00
Aldo Cortesi
e3fd0e838d Add a basic built-in web app. 2013-03-25 09:20:26 +13:00
Aldo Cortesi
98e4421a90 Trim docs. 2013-03-23 15:42:25 +13:00
Aldo Cortesi
800af34763 Fix crash on intercept.
Fixes #106
2013-03-23 14:40:03 +13:00
Rouli
c6bf28f3f7 adding tcp and ssl setup timestamps to get better resolution on flows performance 2013-03-19 18:21:52 +02:00
Rouli
c94aadcb0e Merge remote-tracking branch 'upstream/master' 2013-03-18 14:24:13 +02:00
Aldo Cortesi
5c33f6784b GPLv3 -> MIT 2013-03-18 08:37:42 +13:00
Aldo Cortesi
6614498744 Update styling, GameCenter highscore tutorial. 2013-03-18 08:36:56 +13:00
Aldo Cortesi
d2d3eb6490 Un-break unit tests. Tsk tsk. 2013-03-17 17:53:48 +13:00
Aldo Cortesi
e50da8164f Enable --host option for mitmdump 2013-03-17 17:43:31 +13:00
Aldo Cortesi
0e993bec6f Add the --host option, which uses the value in the Host header for dispaly URLs.
- Can be toggled with "o" then "h" in mitmproxy
- Useful for transparent mode
2013-03-17 17:37:54 +13:00
Aldo Cortesi
790ad468e4 Fix bug that caused mis-identification of some HTTPS connections in transparent mode. 2013-03-17 14:35:36 +13:00
Aldo Cortesi
87f76bb62b Add filter to mitmdump examples. 2013-03-17 10:50:47 +13:00
Aldo Cortesi
55ff7e8387 Update Android cert install documents. 2013-03-17 10:44:42 +13:00
Aldo Cortesi
b6727bf7d2 Add instructions for installing the CA in the IOS Simulator. 2013-03-17 10:35:40 +13:00
Aldo Cortesi
bc1e457097 Update CONTRIBUTORS. 2013-03-17 10:12:46 +13:00
Aldo Cortesi
5b48bce585 Fix typo in setup.py
Fixes #105
2013-03-14 09:21:56 +13:00
Aldo Cortesi
cfb5ba89ce Introduce a filtered flow writer, and use it in dump.py
Fixes #104
2013-03-14 09:19:43 +13:00
Aldo Cortesi
c34d1e3de6 Docs, examples. 2013-03-11 11:49:36 +13:00
Aldo Cortesi
5ceef16486 Expand "How mitmproxy works". Clean up some un-needed sections. 2013-03-10 17:09:40 +13:00
Aldo Cortesi
6a9683719c Sync mitmproxy, pathod and netlib version numbers. 2013-03-05 09:11:22 +13:00
Aldo Cortesi
8a850dc8e6 Few more fuzzing commands, exclude console app from coverage. 2013-03-03 22:39:26 +13:00
Aldo Cortesi
cde66cd584 Fuzzing, and fixes for errors found with fuzzing. 2013-03-03 22:03:27 +13:00
Aldo Cortesi
8216801728 Three more errors turned up with fuzzing.
These are fixed in netlib, regression tests added here.
2013-03-03 15:14:49 +13:00
Aldo Cortesi
7835e0c2c7 Begin some simple fuzzing with pathod.
Finally doing what I started writing pathod for in the first place...
2013-03-03 14:56:56 +13:00
Aldo Cortesi
e608d10f45 Remove __slots__ to make it possible to inherit from Options classes. 2013-03-03 12:26:20 +13:00
Aldo Cortesi
75b5c97095 Revert "show current filepath in status bar"
This reverts commit bf8367d6cf.

This just doesn't work. We need a better solution, probably in the next release.
2013-03-03 12:18:19 +13:00
Aldo Cortesi
2465b8a376 100% unit test coverage on proxy.py. Hallelujah! 2013-03-03 12:13:33 +13:00
Aldo Cortesi
d5876a12ed Unit test proxy option parsing. 2013-03-03 11:58:57 +13:00
Aldo Cortesi
33cdd5d083 Unit test proxy auth. 2013-03-03 11:04:33 +13:00
Aldo Cortesi
5c6587d4a8 Move HTTP auth module to netlib. 2013-03-03 10:37:06 +13:00
Aldo Cortesi
bbdb59b9f9 Test controller message default reply. 2013-03-03 09:33:22 +13:00
Aldo Cortesi
c20d1d7d32 Extend unit tests for proxy.py to some tricky cases. 2013-03-02 22:42:36 +13:00
Aldo Cortesi
415844511c Test cert generation errors. 2013-03-02 16:59:16 +13:00
Aldo Cortesi
09c73019c5 Remove human_curl requirement for the test suite - it's pathoc all the way, baby. 2013-03-02 15:09:22 +13:00
Aldo Cortesi
a95d78438c Test SNI for transparent mode. 2013-03-02 15:06:49 +13:00
Aldo Cortesi
10db82e9a0 Test SNI for ordinary proxy connections. 2013-03-02 14:52:05 +13:00
Aldo Cortesi
ba674ad551 New SNI handling mechanism. 2013-03-01 09:05:39 +13:00
Rouli
b6cae7cd2d Merge remote-tracking branch 'upstream/master' 2013-02-28 13:28:57 +02:00
Rouli
35f36481b9 adding __str__ to make export to har nicer 2013-02-28 13:28:42 +02:00
Aldo Cortesi
b077189dd5 Test cert file specification, spruce up server testing truss a bit. 2013-02-24 22:52:59 +13:00
Aldo Cortesi
0257815141 Significantly simplify server connection handling, and test. 2013-02-24 22:24:21 +13:00
Aldo Cortesi
705559d65e Refactor to prepare for SNI fixes. 2013-02-24 17:35:24 +13:00
Aldo Cortesi
d0639e8925 Handle server disconnects better.
Server connections can be closed for legitimate reasons, like timeouts. If
we've already pumped data over a server connection, we reconnect on error. If
not, we treat it as a legitimate error and pass it on to the client.

Fixes #85
2013-02-24 14:04:56 +13:00
Aldo Cortesi
64285140f9 Test a difficult-to-trigger IOError, fix cert generation in test suite. 2013-02-24 11:34:01 +13:00
Aldo Cortesi
51de9f9fdf Test client connection close conditions. 2013-02-24 10:51:14 +13:00
Aldo Cortesi
05e4d4468e Test request and response kill functionality. 2013-02-23 21:59:25 +13:00
Aldo Cortesi
269780c577 Unit test dummy response functions. 2013-02-23 16:34:59 +13:00
Aldo Cortesi
f203881b0d Remove redundant clause in controller.Reply 2013-02-23 14:13:43 +13:00
Aldo Cortesi
7800b7c910 Refactor proxy core communications to be clearer. 2013-02-23 14:10:27 +13:00
Aldo Cortesi
aaf892e3af Significantly refactor the master/slave message passing interface. 2013-02-17 12:42:48 +13:00
Aldo Cortesi
1ccb2c5dea Test WSGI app calling.
- Factor out test servers into a separate file
- Adjust docs to note new Flask dependency
2013-02-16 16:46:16 +13:00
Eric Entzel
6bcf29c0ed Keep blank URL parameters
TODO: This should probably be configurable
2013-02-11 13:22:25 +11:00
Aldo Cortesi
782bbee8c0 Unit tests for ServerConnectionPool 2013-01-29 11:35:57 +13:00
Aldo Cortesi
2aa175a6ca Stub implementation of a server connection pool. 2013-01-29 10:55:19 +13:00
Aldo Cortesi
53792a5a28 Beef up unit tests for HAR utility functions - flow.py coverage now 100%. 2013-01-29 10:41:45 +13:00
Aldo Cortesi
6f157d936f Merge pull request #99 from rouli/master
Adding helper functions to make HAR export easier
2013-01-28 13:28:49 -08:00
Rouli
330fbfe8cc adding helper functions to make HAR export easier 2013-01-28 17:37:25 +02:00
Aldo Cortesi
a74ca40660 Unravel enormously long read_request into three distinct methods. 2013-01-28 22:26:25 +13:00
Aldo Cortesi
57f01ffb07 Test suite, remove extraneous code. 2013-01-28 21:59:03 +13:00
Aldo Cortesi
1e0bab65e3 Merge pull request #98 from pplante/master
Explicit file flush in mitmdump
2013-01-25 18:58:06 -08:00
phil plante
68952d579e Force flush of file content in dump
The dump file would be end up corrupted sometimes when working with mitmdump in a VM.  Adding an explicit flush seems to have resolved the file sync issues.
2013-01-24 20:46:50 -08:00
Aldo Cortesi
25cb9471f0 Add tests for client certificate support. 2013-01-20 22:39:28 +13:00
Aldo Cortesi
294bca139c Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2013-01-19 17:07:27 +13:00
Aldo Cortesi
935af538f1 Merge pull request #94 from cjneasbi/master
Fixed a bug in format_flow in common.py.
2013-01-18 20:07:05 -08:00
Chris Neasbitt
e9264a8253 Fixed a bug in format_flow in common.py. Changed the reference from timestamp to timestamp_start. 2013-01-18 23:04:11 -05:00
Aldo Cortesi
6600c589ab Rudimentary testing for client certs. 2013-01-18 17:08:30 +13:00
Aldo Cortesi
0f406e9daa Speed up the test suite by reducing time sleeping in tests. 2013-01-18 14:52:19 +13:00
Aldo Cortesi
7a79eeb143 Merge branch 'master' of ssh.github.com:cortesi/mitmproxy
Conflicts:
	test/test_server.py
2013-01-18 14:50:31 +13:00
Aldo Cortesi
8c6f1dd36b Merge pull request #93 from rouli/master
More precise timestamps
2013-01-17 17:47:35 -08:00
Rouli
6212b69fb4 fixes due to merge with master 2013-01-17 17:36:18 +02:00
Rouli
446f9f0a0f Merge remote-tracking branch 'upstream/master' 2013-01-17 17:33:29 +02:00
Rouli
20fa6a3083 changing requests and responses to have two timestamps, one marking their initiation, and the other their complete 2013-01-17 17:32:56 +02:00
Aldo Cortesi
280dd94198 Merge pull request #91 from termie/patch-1
fix some syntax / formatting in the docs
2013-01-14 09:58:15 -08:00
Aldo Cortesi
fa3dff268b Merge pull request #92 from pielgrzym/injector
New example - standalone proxy injecting iframes into responses
2013-01-14 09:55:25 -08:00
Jakub Nawalaniec
a658dba410 New example - standalone proxy injecting iframes into responses 2013-01-13 20:54:16 +01:00
Andy Smith
fb7526fc4f fix some syntax / formatting in the docs 2013-01-11 15:05:40 -06:00
Aldo Cortesi
d0ee4d60d0 Unit tests and minor code refactoring for ServerConnection. 2013-01-05 19:44:12 -08:00
Aldo Cortesi
060e3198bc Remove cert_wait_time flag.
We now cater for this by generating certs with a commencement date an hour in
the past in netlib.
2013-01-06 01:18:47 +13:00
Aldo Cortesi
891c441a6d Use new netlib certificate store implementation. 2013-01-06 01:16:08 +13:00
Aldo Cortesi
9cfc785cd3 Unit test love - 100% for flow.py, dump.py 2013-01-05 21:56:33 +13:00
Aldo Cortesi
46ab6ed491 Minor cleanups of proxy request handling. 2013-01-04 14:19:32 +13:00
Aldo Cortesi
f5e49ef598 First draft of "How mitmproxy works", a complete guide to the mechanics of the proxy process 2013-01-03 17:26:59 +13:00
Aldo Cortesi
04552375a9 Docs: remove proxydroid instructions from Android.
The "official way" is now to just use transparent mode.
2013-01-03 08:30:22 +13:00
Aldo Cortesi
101f92b256 Docs: move features into their own directory 2013-01-03 08:25:24 +13:00
Aldo Cortesi
f578d68e55 Docs: Set Headers 2013-01-03 08:20:51 +13:00
Aldo Cortesi
8e6fabd69a Docs - features. 2013-01-02 21:57:39 +13:00
Aldo Cortesi
09f664cdea Refactor proxy auth a bit
- Remove authentication scheme option. We only support basic at the moment -
we'll add the option back when we diversify.
- Add some meta variables to make printout nicer
2013-01-02 17:35:44 +13:00
Aldo Cortesi
7b3d3dc85e Documentation, setup.py updates, styling. 2013-01-02 14:02:41 +13:00
Aldo Cortesi
e93b343ac4 Docs and Readme
- Don't keep a full duplicate readme just for pypi. Pypi really needs to
learn to read markdown.
- Style and content adjustments
2013-01-01 16:35:52 +13:00
Aldo Cortesi
8b768983a7 Preliminary changelog. 2013-01-01 15:56:02 +13:00
Aldo Cortesi
6f1fa30bc6 Docs: make nav sidebar work 2013-01-01 15:30:02 +13:00
Aldo Cortesi
8b66681929 Much-needed facelift for the docs. 2013-01-01 14:09:43 +13:00
Aldo Cortesi
e42136a6ef Better error handling for transparent mode remote address resolution. 2013-01-01 11:24:11 +13:00
Aldo Cortesi
e2dc7ba09d First draft of OSX transparent proxy mode. 2013-01-01 11:13:56 +13:00
Aldo Cortesi
5347cb9c26 More work on proxy auth
- Strip auth header if auth succeeds, so it's not passed upstream
- Actually use realm specification to BasicProxyAuth, and make it mandatory
- Cleanups and unit tests
2012-12-31 10:56:44 +13:00
Aldo Cortesi
3b84111493 Test and robustify BasicProxyAuth.parse_auth_value
- This is partly in preparation for moving the implementation to netlib
- Also add an unparse_auth_value for testing (and use in pathod once the move is done)
2012-12-31 10:34:25 +13:00
Aldo Cortesi
018c229ae4 Start solidifying proxy authentication
- Add a unit test file
- Remove some extraneous methods
- Change the auth API to make the authenticate method take a header object.
2012-12-31 09:15:56 +13:00
Aldo Cortesi
cfab272321 Merge pull request #83 from rouli/master
Adding some basic proxy authentication code
2012-12-30 11:27:04 -08:00
israel
440a9f6bda adding some simple authetication code to limit proxy access 2012-12-30 01:41:58 -08:00
israel
935505bc4f adding some simple authetication code to limit proxy access 2012-12-30 01:24:30 -08:00
Aldo Cortesi
3c8dcf8808 Merge pull request #82 from kanzure/show-filepath-in-statusbar
Show current filepath in status bar
2012-12-30 00:49:45 -08:00
Aldo Cortesi
d16b3ed8fa Merge pull request #81 from kanzure/issue/79
Fix external viewer function by using shlex
2012-12-30 00:43:57 -08:00
Bryan Bishop
bf8367d6cf show current filepath in status bar
Showing the filename is useful when looking at multiple .mitm files
simultaneously.
2012-12-26 22:14:39 -06:00
Bryan Bishop
4d250095cb fix external viewer using shlex
This makes spawn_external_viewer not crash when $EDITOR or $PAGER have
spaces or multiple arguments.

In addition, spawn_external_viewer now chmods the file to read-only to
remind users who use only an $EDITOR that this function does not read
the file when the user returns.

Also, some of the redundant exception case handling for editing has been
consolidated.

fixes #79
2012-12-22 18:26:15 -06:00
Aldo Cortesi
0451eb193e Merge pull request #75 from kanzure/whitespacefixing
Make trailing whitespace more consistent
2012-12-11 11:42:36 -08:00
Bryan Bishop
1c6139e013 remove trailing whitespace 2012-12-09 15:57:11 -06:00
Aldo Cortesi
9f0db83c48 Merge pull request #74 from kanzure/editexception
Show an error when $EDITOR/$PAGER are unset.
2012-12-05 14:32:14 -08:00
Bryan Bishop
505da188eb Show an error when $EDITOR/$PAGER are unset.
This catches an exception that otherwise crashes mitmproxy.

fixes cortesi/mitmproxy#71
2012-12-05 12:58:29 -08:00
Aldo Cortesi
09c29e894e Fix READMEs: we don't support Python 2.6
Fixes #70
2012-11-30 08:18:15 +13:00
Aldo Cortesi
8c976ac7f0 Substantially rewrite AMF decoding.
This is tricky, but we should now handle a lot more corner-cases.
2012-11-26 13:25:07 +13:00
Aldo Cortesi
64bf97bfb0 Merge pull request #69 from mat128/master
PIL imports -- packaging
2012-11-24 16:28:44 -08:00
Mathieu Mitchell
15c367ffb4 Workaround for PIL's ambiguious import method and/or easy_install PIL packaging problem.
PIL documents two different way to import it's modules:
* import Image (http://www.pythonware.com/library/pil/handbook/introduction.htm)
* from PIL import Image (http://www.pythonware.com/library/pil/handbook/image.htm)

The same problem was noted in Django at https://code.djangoproject.com/ticket/6054
2012-11-23 11:48:24 -05:00
Aldo Cortesi
75ce5772ea We now require Urwid 1.1 or newer. 2012-11-23 15:45:19 +13:00
Aldo Cortesi
626fc39804 Move eventlog to new Urwid container API. 2012-11-23 15:44:43 +13:00
Aldo Cortesi
57d6650e8e Urwid 1.1 compatibility. 2012-10-29 09:30:59 +13:00
Aldo Cortesi
68f1000e42 Improve error reporting for one-shot scripts. 2012-10-11 11:12:06 +13:00
Aldo Cortesi
0d59fd7e01 Move cleanBin and hexdump into netutils. 2012-09-24 11:21:12 +12:00
Aldo Cortesi
21f74efa10 Stub out ctypes structures for OSX transparent mode. 2012-09-17 11:05:20 +12:00
Aldo Cortesi
e039940f49 Doc stubs. 2012-09-17 11:04:57 +12:00
Aldo Cortesi
3f9263a57a Doc reorg. 2012-09-16 15:35:58 +12:00
Aldo Cortesi
d115b5ae70 Expand Flow.match to accept either a string or a compiled filter expression. 2012-09-14 09:41:01 +12:00
Aldo Cortesi
54cee9db7f Catch a potential exception on connection finalization. 2012-09-14 09:40:13 +12:00
Aldo Cortesi
b7d89f6919 Don't run replace or header hooks on error. 2012-09-02 12:57:49 +12:00
Aldo Cortesi
5630d3f660 Add help entry for H global header shortcut. 2012-09-02 11:53:00 +12:00
Aldo Cortesi
9c009a872e Add U shortcut to add user-agent strings to global Headers editor. 2012-09-02 11:50:17 +12:00
Aldo Cortesi
3fc9af63c1 Fix a crash when re-editing a path prompt after an error. 2012-08-31 13:41:08 +12:00
Aldo Cortesi
26cefc95e8 Make grid editor file reading more robust. 2012-08-31 13:33:18 +12:00
Aldo Cortesi
a33e90f081 Add a shortcut to header editor to add standard User-Agent strings. 2012-08-31 13:28:04 +12:00
Aldo Cortesi
71ae158d7b Display "No Content" instead of a parse error when there is no content. 2012-08-30 12:51:04 +12:00
Aldo Cortesi
a2f9ca1d4d Add application/javascript to ~a filter asset matcher. 2012-08-30 12:42:31 +12:00
Aldo Cortesi
38ddbcc314 Add a snippet to GridEditor help text explaining that we're using escaped strings. 2012-08-25 13:29:05 +12:00
Aldo Cortesi
87463049f1 Add a "R" shortcut to GridEditor, letting the user read unescaped data from file. 2012-08-25 13:25:59 +12:00
Aldo Cortesi
514e19b172 Do away with explicit encodings, and display an error message for invalid values. 2012-08-25 13:13:16 +12:00
Aldo Cortesi
c6d1fe9e59 Use Python-style escaped strings in GridEditor. 2012-08-25 12:54:34 +12:00
Aldo Cortesi
82893ffae2 Add an "r" shortcut in grid editors to read value from file. 2012-08-25 12:21:45 +12:00
Aldo Cortesi
3787f8befb Add a graphical editor for path components (e -> p shortcut from request view screen). 2012-08-19 13:15:54 +12:00
Aldo Cortesi
a77ccc406d Getter and setter for path component on Requests. 2012-08-19 13:03:21 +12:00
Aldo Cortesi
60659a89c3 Little bit of love for the unit tests. 2012-08-19 00:22:42 +12:00
Aldo Cortesi
1b7990897e Command-line options for header setting. 2012-08-19 00:14:16 +12:00
Aldo Cortesi
3e96015e61 Add SetHeaders, analogous to ReplaceHooks, with a graphical editor in mitmproxy (H shortcut).
SetHeaders defines headers that are set on flows, based on a matching pattern.
Existing headers are over-ridden.
2012-08-18 23:41:04 +12:00
Aldo Cortesi
53e453f72e Use the new ODict get_first convenience function in a bunch of places. 2012-08-18 18:14:30 +12:00
Aldo Cortesi
15e234558d Further content view cleaups. 2012-08-18 17:51:34 +12:00
Aldo Cortesi
b70e91bbd4 Send tracebacks from content viewers to event log.
Also, 100% test coverage for content viewers.
2012-08-18 17:42:40 +12:00
Aldo Cortesi
e8553f966f Further simplifcation and testing of contentviews. 2012-08-18 17:29:29 +12:00
Aldo Cortesi
11c63dcb9f Huge cleanup of content viewers. 2012-08-18 17:08:17 +12:00
Aldo Cortesi
5c80450ce7 Merge pull request #62 from slam/amf
Optional AMF decoding support
2012-08-17 19:50:50 -07:00
Sahn Lam
3189d144a5 Optional AMF decoding support
If PyAMF is installed, enable AMF decoding.
2012-08-17 18:45:26 -07:00
Aldo Cortesi
a66d018363 Fix unit tests after argparse conversion. 2012-08-18 10:27:31 +12:00
Aldo Cortesi
d88d72e50b Merge pull request #61 from mhils/upgrade_to_argparse
Replace optparse with argparse
2012-08-17 15:24:00 -07:00
Maximilian Hils
b0566b9d4c add dummy cert dir 2012-08-17 19:13:56 +02:00
Maximilian Hils
ed389d8f05 use argparse instead of optparse 2012-08-17 19:11:59 +02:00
Aldo Cortesi
bbaa8bdba5 Add an HTML text outline view.
Uses html2text, from here:

https://github.com/aaronsw/html2text
2012-08-18 01:37:30 +12:00
Aldo Cortesi
6200bfa13e Merge branch 'master' of ssh.github.com:cortesi/mitmproxy 2012-08-18 00:24:14 +12:00
Aldo Cortesi
1bfe847a84 Stop server playback after current playback buffer is exhausted. 2012-08-18 00:23:41 +12:00
Aldo Cortesi
20b270ae9a Server replay from current buffer. 2012-08-18 00:13:04 +12:00
Aldo Cortesi
111660854d Merge pull request #60 from jimlloyd-st/preserve_dummy_certs
Preserve the genenerated dummy certs directory
2012-08-15 15:35:37 -07:00
Aldo Cortesi
76f2e6c9a4 Merge branch 'certdir' 2012-08-16 10:33:59 +12:00
Jim Lloyd
8b4b962643 Preserve the genenerated dummy certs directory
If --dummy-certs=CERTSDIR is provided, use CERTSDIR as the location
for generating/finding the dummy certs. And in this case, preserve
the CERTSDIR directory on exit.
2012-08-14 15:11:15 -07:00
Aldo Cortesi
1b225f2a55 Merge pull request #57 from cjneasbi/master
Updated readme docs with new PyOpenSSL dependency.
2012-08-10 20:41:26 -07:00
Chris Neasbitt
77f612eb61 Updated readme files with new PyOpenSSL 0.13 dependency. 2012-08-08 15:38:02 -04:00
Jim Lloyd
0ef18a7cba Adds --dummy-certs option to specify certdir
If --dummy-certs=CERTSDIR is provided, use CERTSDIR as the location
for generating/finding the dummy certs. And in this case, preserve
the CERTSDIR directory on exit.
2012-08-06 14:09:35 -07:00
Aldo Cortesi
32ad26f8bf Add a size() method to flow.Request and flow.Response. 2012-08-04 13:18:05 +12:00
Rob Wills
8e68426ad6 Return from Flow View behaviour
Following focus trumps the re-focusing the "current" (or just-viewed) flow.
2012-08-02 00:06:34 -07:00
Rob Wills
c985e22196 Press "F" to Follow
Following of the flow list
- ConsoleState now has a follow_focus property
-- when True it will cause focus to follow added flows
- ConsoleMaster implements toggle_follow_flows()
-- when enabling follow, also jumps to most recent flow
- StatusBar reports follow_focus state
-- adds "following" to option list when true
- Added "F" to FlowList keys
-- implementation requests ConsoleMaster to toggle_follow_flows()
2012-08-01 23:57:56 -07:00
Aldo Cortesi
87d05a95ff Handle invalid headers. 2012-07-30 12:54:50 +12:00
Aldo Cortesi
bb124e23b2 Prevent mitmproxy from treating logged info as urwid markup. 2012-07-27 10:08:10 +12:00
Aldo Cortesi
47b5fd666d Fix mitmproxy file reading. 2012-07-27 02:13:21 +12:00
Aldo Cortesi
31a092f6b4 Minor refactoring. Make stop_stream also close the associated file descriptor. 2012-07-27 00:19:18 +12:00
Aldo Cortesi
f93a621856 Only log real errors in WSGI apps. 2012-07-24 16:18:22 +12:00
Aldo Cortesi
84bffad3fc Fix flow read unit test to accomodate more tolerant dumpfile parsing. 2012-07-24 15:30:52 +12:00
Aldo Cortesi
b4e9e55c34 Be more tolerant of corrupted or truncated flows.
We load as far as possible. mitmproxy will only terminate if it was not able to
recover any flows. mitmdump will stop loading as soon as an error is
encountered, but not exit with an error.
2012-07-24 15:15:41 +12:00
Aldo Cortesi
a5bf9d3eb3 Merge pull request #54 from mhils/fix_r_option
fix -r option, read file in binary mode
2012-07-23 18:47:03 -07:00
Maximilian Hils
c643234c98 fix -r option, read file in binary mode 2012-07-24 03:11:28 +02:00
Aldo Cortesi
4ce309107a Merge pull request #52 from cjneasbi/master
Fixed a bug causing an AttributeError when request is set to false but response not None in ProxyHandler.handle_request
2012-07-23 15:34:25 -07:00
Chris Neasbitt
525a8f6a16 Fixed a bug causing an AttributeError when request is set to false but response not None in ProxyHandler.handle_request 2012-07-17 13:24:15 -04:00
Aldo Cortesi
2be31b726a Merge pull request #51 from dnet/master
Test cleanup and missing dependencies
2012-07-16 16:54:09 -07:00
András Veres-Szentkirályi
1a26f8215d removed assigned but unread variables 2012-07-15 22:42:59 +02:00
András Veres-Szentkirályi
da496669c2 removed unused imports 2012-07-15 22:42:45 +02:00
András Veres-Szentkirályi
013ca2a00a added testing dependencies human_curl and pathod 2012-07-15 22:42:16 +02:00
András Veres-Szentkirályi
63324e0d52 added netlib dependency 2012-07-15 22:42:07 +02:00
Aldo Cortesi
e4079aa746 Add an ~a filter expression, matching an asset content type in responses.
Asset content types are Javascript, images, Flash and CSS. This is useful
because doing a quick "!~a" while auditing an app will filter out the majority
of the static asset cruft, letting you focus on what matters.
2012-07-14 16:55:21 +12:00
Aldo Cortesi
150814f6a8 Jump back to correct flow when limit is applied. 2012-07-14 15:22:44 +12:00
Aldo Cortesi
a44a76a7da Merge branch 'master' of github.com:cortesi/mitmproxy 2012-07-11 07:17:20 +12:00
Aldo Cortesi
1d09a558a7 Fix a subtle termination condition when there's an error in a WSGI app. 2012-07-11 07:16:06 +12:00
Aldo Cortesi
01b8b0d876 Refine semantics of replay_request method. 2012-07-10 23:29:33 +12:00
Aldo Cortesi
04d9ec8c3c Make WSGI apps work in transparent mode. 2012-07-10 15:53:53 +12:00
Aldo Cortesi
79af9e89c4 Test replay corner cases. Fix discovered bugs. 2012-07-09 11:18:03 +12:00
Aldo Cortesi
aab45078ad Unit test request replay thread.
This is a small patch, but is the culmination of lots of work: we can now unit
test the deep innards of mitmproxy, with coverage. There's a lot more to come
in this vein.
2012-07-09 11:03:55 +12:00
Aldo Cortesi
e49c920d16 Refator server tests to use flow.FlowMaster and flow.State 2012-07-09 10:58:28 +12:00
Aldo Cortesi
3749d52b66 Make mitmproxy "W" over-write, not append.
The -w options in mitmdump and mitproxy should do the same thing. Append can
have unexpected consequences if the existing file is not a mitmdump.
2012-07-09 10:28:01 +12:00
Aldo Cortesi
729fd9301f Use FlowMaster stream from mitmdump. 2012-07-09 10:26:45 +12:00
Aldo Cortesi
bbd9acf551 Use FlowMaster streaming for "W" in mitmproxy. 2012-07-09 10:22:14 +12:00
Aldo Cortesi
572e8a4962 Add streaming to FlowMaster 2012-07-09 10:18:37 +12:00
Aldo Cortesi
4b6fdc92dc Remove ODict tests. ODict is now in netlib. 2012-07-09 09:54:15 +12:00
Aldo Cortesi
097b566e54 Handle new netlib.tcp.NetLibDisconnect exception. 2012-07-08 23:49:44 +12:00
Aldo Cortesi
ceb12438b6 Fix minor error in filter help. 2012-07-06 22:33:09 +12:00
Aldo Cortesi
d02bcade3a Add a domain match filter (~d regex) 2012-07-06 22:21:44 +12:00
Aldo Cortesi
c4426952ad Protect against exceptions thrown by third-party view libraries. 2012-07-06 15:43:33 +12:00
Aldo Cortesi
a7e64a1a03 mitmproxy: "W" shortcut key streams flows to file as responses arrive. 2012-07-06 14:41:10 +12:00
Aldo Cortesi
de294da2a7 Amalgamte saving "this flow" and "all flows" into a single keyboard shortcut. 2012-07-06 14:10:58 +12:00
Aldo Cortesi
40d63c9e7a Fix error when viewing extended details of SSL flow. 2012-07-06 13:33:55 +12:00
Aldo Cortesi
aa708a2d28 Fix error when serializing reverted SSL flows. 2012-07-05 11:52:56 +12:00
Aldo Cortesi
4acc9aca27 Firm up handling of Unicode data
- Modify GridEditor to know about the destination encoding of data
- Ensure that get_url always returns ASCII
2012-07-05 11:27:40 +12:00
Aldo Cortesi
837fcc65f5 Make upstream-cert the default. There's now a --no-upstream-cert option to turn it off. 2012-07-03 22:56:25 +12:00
Aldo Cortesi
fe86194cc2 Fix Python coredump (!!) on SNI IDNA decoding. 2012-07-03 22:55:02 +12:00
Aldo Cortesi
9c30e2e86d Correct handing of IDNA encoding of internationalized domain names.
- Use IDNA encoding for hostnames gleaned by upstream-cert sniffing
- Use IDNA decoding for URL display in mitmproxy and mitmdump.
2012-07-03 22:27:16 +12:00
Aldo Cortesi
ef986202ee Make server version configurable. 2012-07-03 14:12:52 +12:00
Aldo Cortesi
35d5da9f11 Move palette option getting/setting to mitmproxy.
Unbreaks mitmdump.
2012-07-03 13:42:09 +12:00
Aldo Cortesi
c664801d7d Merge pull request #48 from afh/pull/palette-option
Pull/palette option
2012-07-01 14:04:43 -07:00
Alexis Hildebrandt
a695cf177d Improve palette colors for headings 2012-07-01 09:03:20 +02:00
Alexis Hildebrandt
e41c84335d Add --palette option to select color palette 2012-07-01 08:48:30 +02:00
Aldo Cortesi
90365e270e Catch and handle SSL connection errors. 2012-07-01 12:10:32 +12:00
Aldo Cortesi
4e9d4e8ddd Tweak upstream SNI. 2012-07-01 11:53:46 +12:00
Aldo Cortesi
9985cf5473 Flush after terminal output.
Makes behaviour on the shell less mysterious.
2012-07-01 09:37:03 +12:00
Aldo Cortesi
35fdd16940 Serialize address as part of ClientConnect objects.
This is a serialization format change!
2012-07-01 00:16:30 +12:00
Aldo Cortesi
d74a341e5d Beef up logging substantially. 2012-07-01 00:15:03 +12:00
Aldo Cortesi
9fd4c37834 Merge pull request #46 from afh/pull/palettes
Color palettes
2012-06-29 21:06:20 -07:00
Aldo Cortesi
f070e4523a Handle invalid data more gracefully.
Fixes #47
2012-06-30 15:59:42 +12:00
Aldo Cortesi
16e87a81ac Stub out a transparent resolver for OSX. 2012-06-30 15:42:10 +12:00
Aldo Cortesi
38ebc81590 Add error when -T is passed on an unsupported platform. 2012-06-30 11:24:41 +12:00
Alexis Hildebrandt
0a0a6aae0b Update title palette colors for light backgrounds 2012-06-29 16:58:28 +02:00
Alexis Hildebrandt
3b80e8dd02 Add palettes for Solarized terminal color profiles 2012-06-29 12:45:02 +02:00
Alexis Hildebrandt
e287eac462 Add light palette for light backgrounds 2012-06-29 12:44:57 +02:00
Alexis Hildebrandt
3060ad5575 Replace double quotes with single quotes 2012-06-29 09:25:29 +02:00
Aldo Cortesi
8cd140ef33 Add dependency reference for netlib. 2012-06-28 15:14:57 +12:00
Aldo Cortesi
47651b1ff2 Serialization and de-serialization of new cert format. 2012-06-28 14:29:15 +12:00
Aldo Cortesi
243e0efefc Adjust for new get_remote_cert API. 2012-06-28 10:02:14 +12:00
Aldo Cortesi
35ee0c098f Remove certutils from mitmproxy. 2012-06-27 16:43:33 +12:00
Aldo Cortesi
49dedd361c Fix replay. 2012-06-27 16:22:25 +12:00
Aldo Cortesi
dd55a3e0b6 Use SNI-indicated hostname for cert generation when not using upstream certs. 2012-06-27 12:12:11 +12:00
Aldo Cortesi
ceef6ee6be Enable SSL in transparent mode. 2012-06-26 23:51:38 +12:00
Aldo Cortesi
e6cdbefb3b Add transparent mode platform module for Linux. 2012-06-26 20:49:34 +12:00
Aldo Cortesi
ad893ad134 Transparent proxy command-line flag stub. 2012-06-26 20:08:24 +12:00
Aldo Cortesi
8ccfb376f3 Remove -T and -U command-line options.
They're redundant convenience options, and we need more space.
2012-06-26 19:57:59 +12:00
Aldo Cortesi
015a74fd14 We no longer store scheme on ServerConnection. 2012-06-26 18:29:12 +12:00
Aldo Cortesi
52d0536d2c Use new TCPClient.convert_to_ssl API. 2012-06-25 15:53:26 +12:00
Aldo Cortesi
e08f91c237 Port to explicit netlib connection API. 2012-06-25 11:37:12 +12:00
Aldo Cortesi
eac3b29d5f Factor read_response out into netlib. 2012-06-24 22:01:11 +12:00
Aldo Cortesi
4db2abc01c read_headers now returns an ODictCaseless object. 2012-06-24 21:49:59 +12:00
Aldo Cortesi
e7c75933e7 read_http_body -> read_http_body_request/response 2012-06-23 15:08:01 +12:00
Aldo Cortesi
874649f134 Adapt for API changes in netlib. 2012-06-23 14:06:34 +12:00
Aldo Cortesi
7cb242c168 Move wsgi to netlib. 2012-06-19 10:42:55 +12:00
Aldo Cortesi
1b1ccab8b7 Extract protocol and tcp server implementations into netlib. 2012-06-19 09:58:50 +12:00
Aldo Cortesi
7b9756f48e Refactor protocol.py to remove dependence on flow and utils. 2012-06-17 10:52:39 +12:00
Aldo Cortesi
aae8a9959c Pull out protocol components into protocol.py 2012-06-16 21:23:32 +12:00
Aldo Cortesi
d5a0099f49 Test suite and refactoring for netlib. 2012-06-16 16:22:51 +12:00
Aldo Cortesi
18a03c063e Simplify netlib and improve API. 2012-06-16 13:53:24 +12:00
Aldo Cortesi
4e53f1ee90 Rename our tcpserver to netlib, expand to include client network functions. 2012-06-16 13:38:10 +12:00
Aldo Cortesi
8ae64337ed Create our own TCP server class.
We're going to need more control for advanced features and speed, and we can
also ditch some of the idiocies in the SocketServer module.
2012-06-16 11:40:44 +12:00
Aldo Cortesi
c7952371b7 Fix a problem in ODictCaseless that could cause duplicate headers. 2012-06-15 17:40:08 +12:00
Aldo Cortesi
8ae3270807 Basic transparent mode. 2012-06-15 09:47:04 +12:00
Aldo Cortesi
a9495dc02f Refactor test suite to make room for transparent mode tests. 2012-06-15 09:20:10 +12:00
Aldo Cortesi
176d819559 Move server comms to OpenSSL. 2012-06-14 21:57:55 +12:00
Aldo Cortesi
8dabf88ae5 Remove ability to specify SSL ciphers.
We can re-introduce this if there's demand - the feature needs a bit more thought.
2012-06-14 15:29:54 +12:00
Aldo Cortesi
8a9352b3f7 First draft conversion of server to PyOpenSSL. 2012-06-13 18:16:47 +12:00
Aldo Cortesi
d032504b17 Fix an exception when replaying a flow with no response. 2012-06-10 17:10:43 +12:00
Aldo Cortesi
d60fa9918b Localise client connection object manipulation.
This simplifies the call signature for a bunch of functions.
2012-06-10 16:49:59 +12:00
Aldo Cortesi
1f659948cd Refactor request processing at mitmproxy's core.
Gradually cleaning up towards a state machine model.
2012-06-10 16:02:48 +12:00
Aldo Cortesi
236447c65f Pass server HTTP version back to clients. 2012-06-10 13:29:09 +12:00
Aldo Cortesi
6ba5f0f35b Add HTTP version to response objects.
Another change in the serialization format.
2012-06-10 13:27:43 +12:00
Aldo Cortesi
52779d9db9 Refactoring of proxy.py
- Correctly pass HTTP request version on to upstream servers
- Adjust tests not to hang due to a pathod response with no content-length
2012-06-10 13:17:18 +12:00
Aldo Cortesi
55ddf853cd Add HTTP version to flow.Request
This is a serialization format change, that makes us incompatible with previous
versions.
2012-06-10 10:46:22 +12:00
Aldo Cortesi
a3b47e0cb5 Consolidate HTTP major and minor versions into a single variable. 2012-06-10 10:31:04 +12:00
Aldo Cortesi
8254187bf3 Add proxy.should_connection_close, and strip out unused code. 2012-06-10 10:10:46 +12:00
Aldo Cortesi
0c458e2f1a Refactor ServerConnection API. 2012-06-10 08:13:50 +12:00
Aldo Cortesi
987f443b5d Ignore incorrectnesses in traffic if they don't affect us. 2012-06-09 21:45:22 +12:00
Aldo Cortesi
9130cd63d3 Significant cleanup of proxy internals.
Dispense with the loose parsing of client requests that we had before. We now
have service modes ("proxy" and "reverse proxy" for now), and we only accept
requests that are appropriate for the mode we're in.
2012-06-09 21:27:43 +12:00
Aldo Cortesi
18c1b44475 Reverse proxy testing. 2012-06-09 20:41:28 +12:00
Aldo Cortesi
05492baf8d Move from requests to human_curl.
It turns out that _none_ of the Python stdlib or anything that relies on it
supports CONNECT through a proxy. Beggars belief, but there you go.
2012-06-09 16:17:51 +12:00
Aldo Cortesi
22192d1a46 Nose mopup: docs, no cover pragmas, a few missing path specs. 2012-06-09 13:55:55 +12:00
Aldo Cortesi
b7b357528c Port mitmproxy test suite entirely to nose. 2012-06-09 13:42:43 +12:00
Aldo Cortesi
a63240a848 Move pathod service testing truss to nose. 2012-06-09 12:13:01 +12:00
Aldo Cortesi
e78b48ab20 Start conversion to nose.
RIP pry.
2012-06-09 10:57:00 +12:00
Aldo Cortesi
7a312546f3 Shift mitmproxy test suite over to pathod.
This opens a whole brave new world of testing for mitmproxy.
2012-06-08 10:00:16 +12:00
Aldo Cortesi
903038b8de Merge branch 'master' into develop 2012-06-07 08:44:36 +12:00
Maximilian Hils
2a194f98ec add missing parser.add_option_group(group) 2012-06-06 01:26:19 +02:00
Aldo Cortesi
e9109812e1 Split parsing of intial line into separate protocols. 2012-06-03 06:04:57 -07:00
Aldo Cortesi
0a25c2263d Factor out conversion to SSL connection. 2012-06-03 01:54:11 -07:00
Aldo Cortesi
491f9bdcee Add unit tests for console/help.py 2012-06-03 01:11:07 -07:00
Aldo Cortesi
b36e37f9da Fix a traceback that sometimes occurred when an invalid limit was entered. 2012-06-02 18:41:44 -07:00
Aldo Cortesi
f9b04b84cd Silence a (rare) KeyboardInterrupt exception in mitmproxy. 2012-05-31 21:18:41 -07:00
Aldo Cortesi
ee2950cd19 Fix a crashing bug when replacing text in a flow with unicode bodies. 2012-05-25 18:10:31 -07:00
Aldo Cortesi
a0c63b6108 Fix crash when adding a Response when none existed before. 2012-05-24 16:56:18 -07:00
Paul
5f8855df55 Added a switch to send client certificates to hosts 2012-05-23 23:09:03 +02:00
Aldo Cortesi
08d6da2941 Fix AttributeError when shutting down a writing mitmdump. 2012-05-17 09:47:04 +12:00
Aldo Cortesi
0a90a3eaba Refuse to replay a request with missing content. 2012-05-16 18:24:32 +12:00
Aldo Cortesi
b3901a7652 Add interface to mark content missing, and extend UI to indicate when content is missing. 2012-05-16 18:16:44 +12:00
Aldo Cortesi
0c2d894cea Add the ability to flag content as missing in a request or a response.
We'll use this in a number of situations. First, we'll soon have response
streaming that directly pipes responses to clients. These will be content-less
from mitmproxy's perspective. Second, we'll be growing new events that fire
after headers are received, but before content is read.
2012-05-16 15:42:58 +12:00
Aldo Cortesi
12b8a43dbe Bump version number. 2012-05-11 09:52:17 +12:00
Aldo Cortesi
d42fdc4ff6 Include a formatted exception in WSGI error page. 2012-05-07 21:34:01 +12:00
Aldo Cortesi
116fcfcf7a Internal error page for WSGI.
Also, 100% test coverage.
2012-04-27 15:56:42 +12:00
Aldo Cortesi
2fe54d17df Don't specify Content-Length on empty content.
Sometimes, mitmproxy would specify a content-length header value of 0 when
content was empty. Some rare servers (like piratebay.org) would barf on this.
2012-04-25 14:38:20 +12:00
Aldo Cortesi
efa98d514c Docs and comments for WSGI app example. 2012-04-24 14:58:18 +12:00
Aldo Cortesi
c8d2b2594b Add a WSGI adapter that lets us serve a WSGI app out of mitmproxy.
This commit adds:
    - A WSGI App adapter for mitmproxy
    - An app registry in the proxy instance that lets us link WSGI apps with
    (hostname, port) combinations.
    - Fixes for a number of bugs discovered while creating this feature.
2012-04-24 14:52:29 +12:00
Aldo Cortesi
51789228be Fix PKCS12 cert generation. 2012-04-15 12:48:07 +12:00
Aldo Cortesi
2162ce1ae3 Shut mitmdump down gracefully on SIGTERM.
This is a hack at the moment, but needs must.
2012-04-15 10:35:19 +12:00
Aldo Cortesi
e5c076ab4e Note dependency on PyASN1 > 0.1.2 in setup.py 2012-04-13 05:17:12 +12:00
Aldo Cortesi
8c96264304 Serialized data version check. 2012-04-11 10:10:53 +12:00
454 changed files with 149287 additions and 12873 deletions

11
.appveyor.yml Normal file
View File

@@ -0,0 +1,11 @@
version: '{build}'
shallow_clone: true
environment:
matrix:
- PYTHON: "C:\\Python27"
install:
- "%PYTHON%\\Scripts\\pip install --src . -r requirements.txt"
- "%PYTHON%\\python -c \"from OpenSSL import SSL; print(SSL.SSLeay_version(SSL.SSLEAY_VERSION))\""
build: off # Not a C# project
test_script:
- "%PYTHON%\\Scripts\\py.test -n 4"

11
.coveragerc Normal file
View File

@@ -0,0 +1,11 @@
[run]
branch = True
[report]
show_missing = True
include = *libmproxy*
exclude_lines =
pragma: nocover
pragma: no cover
raise NotImplementedError()
omit = *contrib*, *tnetstring*, *platform*, *console*, *main.py

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
.git

6
.env Normal file
View File

@@ -0,0 +1,6 @@
DIR="$( dirname "${BASH_SOURCE[0]}" )"
ACTIVATE_DIR="$(if [ -f "$DIR/../venv.mitmproxy/bin/activate" ]; then echo 'bin'; else echo 'Scripts'; fi;)"
if [ -z "$VIRTUAL_ENV" ] && [ -f "$DIR/../venv.mitmproxy/$ACTIVATE_DIR/activate" ]; then
echo "Activating mitmproxy virtualenv..."
source "$DIR/../venv.mitmproxy/$ACTIVATE_DIR/activate"
fi

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
libmproxy/web/static/**/* -diff
web/src/js/filt/filt.js -diff

20
.gitignore vendored
View File

@@ -1,12 +1,28 @@
.DS_Store
MANIFEST
/build
/dist
/tmp
/doc
/venv
/libmproxy/gui
/release/build
*.py[cdo]
*.swp
*.swo
mitmproxy.egg-info/
mitmproxyc
mitmdumpc
mitmplaybackc
mitmrecordc
.coverage
.idea
netlib
pathod
libpathod
.cache/
# UI
node_modules
bower_components
*.compiled.js
*.map

16
.landscape.yml Normal file
View File

@@ -0,0 +1,16 @@
max-line-length: 120
pylint:
options:
dummy-variables-rgx: _$|.+_$|dummy_.+
disable:
- missing-docstring
- protected-access
- too-few-public-methods
- too-many-arguments
- too-many-instance-attributes
- too-many-locals
- too-many-public-methods
- too-many-return-statements
- too-many-statements
- unpacking-non-sequence

73
.travis.yml Normal file
View File

@@ -0,0 +1,73 @@
sudo: false
language: python
matrix:
fast_finish: true
include:
- python: 2.7
- python: 2.7
env: OPENSSL=1.0.2
addons:
apt:
sources:
# Debian sid currently holds OpenSSL 1.0.2
# change this with future releases!
- debian-sid
packages:
- libssl-dev
- python: 2.7
env: DOCS=1
script: 'cd docs && make html'
- python: pypy
- python: pypy
env: OPENSSL=1.0.2
addons:
apt:
sources:
# Debian sid currently holds OpenSSL 1.0.2
# change this with future releases!
- debian-sid
packages:
- libssl-dev
allow_failures:
# We allow pypy to fail until Travis fixes their infrastructure to a pypy
# with a recent enought CFFI library to run cryptography 1.0+.
- python: pypy
install:
- "pip install -r requirements.txt"
before_script:
- "openssl version -a"
script:
- "py.test -n 4 --cov libmproxy"
after_success:
- coveralls
notifications:
irc:
channels:
- "irc.oftc.net#mitmproxy"
on_success: change
on_failure: always
slack:
rooms:
- mitmproxy:YaDGC9Gt9TEM7o8zkC2OLNsu
on_success: change
on_failure: always
# exclude cryptography from cache
# it depends on libssl-dev version
# which needs to be compiled specifically to each version
before_cache:
- pip uninstall -y cryptography
cache:
directories:
- $HOME/.cache/pip
- /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages
- /home/travis/virtualenv/python2.7.9/bin
- /home/travis/virtualenv/pypy-2.5.0/site-packages
- /home/travis/virtualenv/pypy-2.5.0/bin

324
CHANGELOG
View File

@@ -1,3 +1,291 @@
6 November 2015: mitmproxy 0.14
* Statistics: 399 commits, 13 contributors, 79 closed issues, 37 closed
PRs, 103 days
* Docs: Greatly updated docs now hosted on ReadTheDocs!
http://docs.mitmproxy.org
* Docs: Fixed Typos, updated URLs etc. (Nick Badger, Ben Lerner, Choongwoo
Han, onlywade, Jurriaan Bremer)
* mitmdump: Colorized TTY output
* mitmdump: Use mitmproxy's content views for human-readable output (Chris
Czub)
* mitmproxy and mitmdump: Support for displaying UTF8 contents
* mitmproxy: add command line switch to disable mouse interaction (Timothy
Elliott)
* mitmproxy: bug fixes (Choongwoo Han, sethp-jive, FreeArtMan)
* mitmweb: bug fixes (Colin Bendell)
* libmproxy: Add ability to fall back to TCP passthrough for non-HTTP
connections.
* libmproxy: Avoid double-connect in case of TLS Server Name Indication.
This yields a massive speedup for TLS handshakes.
* libmproxy: Prevent unneccessary upstream connections (macmantrl)
* Inline Scripts: New API for HTTP Headers:
http://docs.mitmproxy.org/en/latest/dev/models.html#netlib.http.Headers
* Inline Scripts: Properly handle exceptions in `done` hook
* Inline Scripts: Allow relative imports, provide `__file__`
* Examples: Add probabilistic TLS passthrough as an inline script
* netlib: Refactored HTTP protocol handling code
* netlib: ALPN support
* netlib: fixed a bug in the optional certificate verification.
* netlib: Initial Python 3.5 support (this is the first prerequisite for
3.x support in mitmproxy)
24 July 2015: mitmproxy 0.13
* Upstream certificate validation. See the --verify-upstream-cert,
--upstream-trusted-cadir and --upstream-trusted-ca parameters. Thanks to
Kyle Morton (github.com/kyle-m) for his work on this.
* Add HTTP transparent proxy mode. This uses the host headers from HTTP
traffic (rather than SNI and IP address information from the OS) to
implement perform transparent proxying. Thanks to github.com/ijiro123 for
this feature.
* Add ~src and ~dst REGEX filters, allowing matching on source and
destination addresses in the form of <IP>:<Port>
* mitmproxy console: change g/G keyboard shortcuts to match less. Thanks to
Jose Luis Honorato (github.com/jlhonora).
* mitmproxy console: Flow marking and unmarking. Marked flows are not
deleted when the flow list is cleared. Thanks to Jake Drahos
(github.com/drahosj).
* mitmproxy console: add marking of flows
* Remove the certforward feature. It was added to allow exploitation of
#gotofail, which is no longer a common vulnerability. Permitting this
hugely increased the complexity of packaging and distributing mitmproxy.
3 June 2015: mitmproxy 0.12.1
* mitmproxy console: mouse interaction - scroll in the flow list, click on
flow to view, click to switch between tabs.
* Update our crypto defaults: SHA256, 2048 bit RSA, 4096 bit DH parameters.
* BUGFIX: crash under some circumstances when copying to clipboard.
* BUGFIX: occasional crash when deleting flows.
18 May 2015: mitmproxy 0.12
* mitmproxy console: Significant revamp of the UI. The major changes are
listed below, and in addition almost every aspect of the UI has
been tweaked, and performance has improved significantly.
* mitmproxy console: A new options screen has been created ("o" shortcut),
and many options that were previously manipulated directly via a
keybinding have been moved there.
* mitmproxy console: Big improvement in palettes. This includes improvements
to all colour schemes. Palettes now set the terminal background colour by
default, and a new --palette-transparent option has been added to disable
this.
* mitmproxy console: g/G shortcuts throughout mitmproxy console to jump
to the beginning/end of the current view.
* mitmproxy console: switch palettes on the fly from the options screen.
* mitmproxy console: A cookie editor has been added for mitmproxy console
at long last.
* mitmproxy console: Various components of requests and responses can be
copied to the clipboard from mitmproxy - thanks to @marceloglezer.
* Support for creating new requests from scratch in mitmproxy console (@marceloglezer).
* SSLKEYLOGFILE environment variable to specify a logging location for TLS
master keys. This can be used with tools like Wireshark to allow TLS
decoding.
* Server facing SSL cipher suite specification (thanks to Jim Shaver).
* Official support for transparent proxying on FreeBSD - thanks to Mike C
(http://github.com/mike-pt).
* Many other small bugfixes and improvemenets throughout the project.
29 Dec 2014: mitmproxy 0.11.2:
* Configuration files - mitmproxy.conf, mitmdump.conf, common.conf in the
.mitmproxy directory.
* Better handling of servers that reject connections that are not SNI.
* Many other small bugfixes and improvements.
15 November 2014: mitmproxy 0.11.1:
* Bug fixes: connection leaks some crashes
7 November 2014: mitmproxy 0.11:
* Performance improvements for mitmproxy console
* SOCKS5 proxy mode allows mitmproxy to act as a SOCKS5 proxy server
* Data streaming for response bodies exceeding a threshold
(bradpeabody@gmail.com)
* Ignore hosts or IP addresses, forwarding both HTTP and HTTPS traffic
untouched
* Finer-grained control of traffic replay, including options to ignore
contents or parameters when matching flows (marcelo.glezer@gmail.com)
* Pass arguments to inline scripts
* Configurable size limit on HTTP request and response bodies
* Per-domain specification of interception certificates and keys (see
--cert option)
* Certificate forwarding, relaying upstream SSL certificates verbatim (see
--cert-forward)
* Search and highlighting for HTTP request and response bodies in
mitmproxy console (pedro@worcel.com)
* Transparent proxy support on Windows
* Improved error messages and logging
* Support for FreeBSD in transparent mode, using pf (zbrdge@gmail.com)
* Content view mode for WBXML (davidshaw835@air-watch.com)
* Better documentation, with a new section on proxy modes
* Generic TCP proxy mode
* Countless bugfixes and other small improvements
28 January 2014: mitmproxy 0.10:
* Support for multiple scripts and multiple script arguments
* Easy certificate install through the in-proxy web app, which is now
enabled by default
* Forward proxy mode, that forwards proxy requests to an upstream HTTP server
* Reverse proxy now works with SSL
* Search within a request/response using the "/" and "n" shortcut keys
* A view that beatifies CSS files if cssutils is available
* Bug fix, documentation improvements, and more.
25 August 2013: mitmproxy 0.9.2:
* Improvements to the mitmproxywrapper.py helper script for OSX.
* Don't take minor version into account when checking for serialized file
compatibility.
* Fix a bug causing resource exhaustion under some circumstances for SSL
connections.
* Revamp the way we store interception certificates. We used to store these
on disk, they're now in-memory. This fixes a race condition related to
cert handling, and improves compatibility with Windows, where the rules
governing permitted file names are weird, resulting in errors for some
valid IDNA-encoded names.
* Display transfer rates for responses in the flow list.
* Many other small bugfixes and improvements.
16 June 2013: mitmproxy 0.9.1:
* Use "correct" case for Content-Type headers added by mitmproxy.
* Make UTF environment detection more robust.
* Improved MIME-type detection for viewers.
* Always read files in binary mode (Windows compatibility fix).
* Some developer documentation.
15 May 2013: mitmproxy 0.9:
* Upstream certs mode is now the default.
* Add a WSGI container that lets you host in-proxy web applications.
* Full transparent proxy support for Linux and OSX.
* Introduce netlib, a common codebase for mitmproxy and pathod
(http://github.com/cortesi/netlib).
* Full support for SNI.
* Color palettes for mitmproxy, tailored for light and dark terminal
backgrounds.
* Stream flows to file as responses arrive with the "W" shortcut in
mitmproxy.
* Extend the filter language, including ~d domain match operator, ~a to
match asset flows (js, images, css).
* Follow mode in mitmproxy ("F" shortcut) to "tail" flows as they arrive.
* --dummy-certs option to specify and preserve the dummy certificate
directory.
* Server replay from the current captured buffer.
* Huge improvements in content views. We now have viewers for AMF, HTML,
JSON, Javascript, images, XML, URL-encoded forms, as well as hexadecimal
and raw views.
* Add Set Headers, analagous to replacement hooks. Defines headers that are set
on flows, based on a matching pattern.
* A graphical editor for path components in mitmproxy.
* A small set of standard user-agent strings, which can be used easily in
the header editor.
* Proxy authentication to limit access to mitmproxy
5 April 2012: mitmproxy 0.8:
@@ -29,14 +317,14 @@
20 February 2012: mitmproxy 0.7:
* New built-in key/value editor. This lets you interactively edit URL query
strings, headers and URL-encoded form data.
strings, headers and URL-encoded form data.
* Extend script API to allow duplication and replay of flows.
* API for easy manipulation of URL-encoded forms and query strings.
* Add "D" shortcut in mitmproxy to duplicate a flow.
* Reverse proxy mode. In this mode mitmproxy acts as an HTTP server,
forwarding all traffic to a specified upstream server.
@@ -44,13 +332,13 @@
improve spacing and layout throughout.
* Add support for filtering by HTTP method.
* Add the ability to specify an HTTP body size limit.
* Move to typed netstrings for serialization format - this makes 0.7
backwards-incompatible with serialized data from 0.6!
* Significant improvements in speed and responsiveness of UI.
* Significant improvements in speed and responsiveness of UI.
* Many minor bugfixes and improvements.
@@ -115,14 +403,14 @@
100% of CPU.
30 March 2011: mitmproxy 0.4
30 March 2011: mitmproxy 0.4
* Full serialization of HTTP conversations
* Client and server replay
* On-the-fly generation of dummy SSL certificates
* mitmdump has "grown up" into a powerful tcpdump-like tool for HTTP/S
* Dozens of improvements to the mitmproxy console interface
@@ -130,22 +418,22 @@
* Python scripting hooks for programmatic modification of traffic
1 March 2010: mitmproxy 0.2
1 March 2010: mitmproxy 0.2
* Big speed and responsiveness improvements, thanks to Thomas Roth
* Support urwid 0.9.9
* Terminal beeping based on filter expressions
* Filter expressions for terminal beeps, limits, interceptions and sticky
cookies can now be passed on the command line.
* Save requests and responses to file
* Split off non-interactive dump functionality into a new tool called
mitmdump
* "A" will now accept all intercepted connections
* Lots of bugfixes

39
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,39 @@
# Contributing
Thank you for your interest in contributing to mitmproxy!
# Bug Reports
Bug Reports are very welcome - please file them on the GitHub [issue tracker](https://github.com/mitmproxy/mitmproxy/issues).
You can use the following template to structure your report:
```
##### Steps to reproduce the problem:
1.
2.
3.
##### What is the expected behavior?
##### What went wrong?
##### Any other comments?
---
mitmproxy version:
Operating System:
```
# Feature Requests
We're happy to hear what you'd like to see in mitmproxy. Please file feature requests on the GitHub [issue tracker](https://github.com/mitmproxy/mitmproxy/issues).
# Patches
We're always happy to accept patches. Please submit them in the form of pull requests to the main [mitmproxy repository](https://github.com/mitmproxy/mitmproxy/).
If you're working on something cool, please do not hesistate and get in touch!
Instructions for setting up a development environment can be found in the [README](README.rst).

View File

@@ -1,18 +1,105 @@
485 Aldo Cortesi
18 Henrik Nordstrom
13 Thomas Roth
11 Stephen Altamirano
6 András Veres-Szentkirályi
4 Valtteri Virtanen
2 alts
2 Michael Frister
2 Mark E. Haase
2 Heikki Hannikainen
1 meeee
1 capt8bit
1 Yuangxuan Wang
1 Ulrich Petri
1 Rune Halvorsen
1 Rory McCann
1 Henrik Nordström
1 Felix Wolfsteller
1122 Aldo Cortesi
765 Maximilian Hils
80 Marcelo Glezer
48 Thomas Kriechbaumer
28 Jim Shaver
18 Henrik Nordstrom
13 Thomas Roth
12 Pedro Worcel
11 Jake Drahos
11 Justus Wingert
11 Stephen Altamirano
10 András Veres-Szentkirályi
9 Legend Tang
8 Jason A. Novak
8 Rouli
7 Alexis Hildebrandt
5 Brad Peabody
5 Tomaz Muraus
5 Choongwoo Han
5 Matthias Urlichs
5 elitest
5 iroiro123
4 Marc Liyanage
4 Valtteri Virtanen
4 Wade 524
4 Youhei Sakurai
4 root
4 Chris Czub
4 Bryan Bishop
3 Kyle Manna
3 David Weinstein
3 Eli Shvartsman
3 Chris Neasbitt
3 Zack B
2 Rob Wills
2 isra17
2 israel
2 Michael Frister
2 Heikki Hannikainen
2 Nick Badger
2 Jim Lloyd
2 Terry Long
2 Wade Catron
2 Krzysztof Bielicki
2 Mark E. Haase
2 alts
2 Bennett Blodinger
2 Jaime Soriano Pastor
2 Colin Bendell
1 joebowbeer
1 meeee
1 michaeljau
1 peralta
1 phil plante
1 sentient07
1 sethp-jive
1 vzvu3k6k
1 Andy Smith
1 Ben Lerner
1 Dan Wilbraham
1 David Shaw
1 Doug Lethin
1 Eric Entzel
1 Felix Wolfsteller
1 FreeArtMan
1 Gabriel Kirkpatrick
1 Henrik Nordström
1 Ivaylo Popov
1 JC
1 Jakub Nawalaniec
1 James Billingham
1 Jean Regisser
1 Kit Randel
1 Kyle Morton
1 Lucas Cimon
1 Mathieu Mitchell
1 Michael Bisbjerg
1 Mike C
1 Mikhail Korobov
1 Nick HS
1 Nick Raptis
1 Nicolas Esteves
1 Oleksandr Sheremet
1 Paul
1 Rich Somerfield
1 Rory McCann
1 Rune Halvorsen
1 Ryo Onodera
1 Sahn Lam
1 Seppo Yli-Olli
1 Sergey Chipiga
1 Steve Phillips
1 Steven Van Acker
1 Suyash
1 Tarashish Mishra
1 TearsDontFalls
1 Timothy Elliott
1 Ulrich Petri
1 Vyacheslav Bakhmutov
1 Yuangxuan Wang
1 capt8bit
1 davidpshaw
1 deployable
1 gecko655
1 jlhonora

4
Dockerfile Normal file
View File

@@ -0,0 +1,4 @@
FROM mitmproxy/base:latest-onbuild
EXPOSE 8080
EXPOSE 8081
VOLUME /certs

709
LICENSE
View File

@@ -1,690 +1,19 @@
mitmproxy is licensed under the terms of the GNU General Public
License version 3, with the following addition:
In addition, as a special exception, the copyright holders give
permission to link the code of this program or portions of this
program with the OpenSSL project's "OpenSSL" library (or with modified
versions of it that use the same license as the "OpenSSL" library),
and distribute linked combinations including the two.
You must obey the GNU General Public License in all respects for all
of the code used other than "OpenSSL". If you modify file(s) provided
under this license, you may extend this exception to your version of
the file, but you are not obligated to do so. If you do not wish to do
so, delete this exception statement from your version.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Copyright (c) 2013, Aldo Cortesi. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,10 +1,9 @@
include LICENSE
include CHANGELOG
include CONTRIBUTORS
include README.txt
exclude README.mkd
include mitmproxy mitmdump
include LICENSE CHANGELOG CONTRIBUTORS README.rst
recursive-include examples *
recursive-include doc *
recursive-include test *
recursive-include libmproxy/resources *
recursive-exclude test *.swo *.swp *.pyc
recursive-include libmproxy *
recursive-exclude * *.pyc *.pyo *.swo *.swp
recursive-exclude netlib *
recursive-exclude libpathod *

View File

@@ -1,74 +0,0 @@
__mitmproxy__ is an SSL-capable man-in-the-middle proxy for HTTP. It provides a
console interface that allows traffic flows to be inspected and edited on the
fly.
__mitmdump__ is the command-line version of mitmproxy, with the same
functionality but without the user interface. Think tcpdump for HTTP.
Complete documentation and a set of practical tutorials is included in the
distribution package, and is also available at
[mitmproxy.org](http://mitmproxy.org).
Features
--------
- Intercept HTTP requests and responses and modify them on the fly.
- Save complete HTTP conversations for later replay and analysis.
- Replay the client-side of an HTTP conversations.
- Replay HTTP responses of a previously recorded server.
- Reverse proxy mode to forward traffic to a specified server.
- Make scripted changes to HTTP traffic using Python.
- SSL certificates for interception are generated on the fly.
Download
--------
Releases and rendered documentation can be found on the mitmproxy website:
[mitmproxy.org](http://mitmproxy.org)
Source is hosted on github:
[github.com/cortesi/mitmproxy](http://github.com/cortesi/mitmproxy)
Community
---------
Come join us in the #mitmproxy channel on the OFTC IRC network
(irc://irc.oftc.net:6667).
We also have a mailing list, hosted here:
http://groups.google.com/group/mitmproxy
Requirements
------------
* [Python](http://www.python.org) 2.6.x or 2.7.x.
* [PyOpenSSL](http://pypi.python.org/pypi/pyOpenSSL) 0.12 or newer.
* [pyasn1](http://pypi.python.org/pypi/pyasn1) 0.1.2 or newer.
* [urwid](http://excess.org/urwid/) version 0.9.8 or newer.
* [PIL](http://www.pythonware.com/products/pil/) version 1.1 or newer.
* [lxml](http://lxml.de/) version 2.3 or newer.
The following auxiliary components may be needed if you plan to hack on
mitmproxy:
* The test suite uses the [pry](http://github.com/cortesi/pry) unit testing
library.
* Rendering the documentation requires [countershape](http://github.com/cortesi/countershape).
__mitmproxy__ is tested and developed on OSX, Linux and OpenBSD. Windows is not
supported at the moment.
You should also make sure that your console environment is set up with the
following:
* EDITOR environment variable to determine the external editor.
* PAGER environment variable to determine the external pager.
* Appropriate entries in your mailcap files to determine external
viewers for request and response contents.

157
README.rst Normal file
View File

@@ -0,0 +1,157 @@
|travis| |coveralls| |downloads| |latest-release| |python-versions|
``mitmproxy`` is an interactive, SSL-capable man-in-the-middle proxy for HTTP
with a console interface.
``mitmdump`` is the command-line version of mitmproxy. Think tcpdump for HTTP.
``libmproxy`` is the library that mitmproxy and mitmdump are built on.
Documentation & Help
--------------------
Documentation, tutorials and distribution packages can be found on the
mitmproxy website.
|site|
Installation Instructions are available in the docs.
|docs|
You can join our developer chat on Slack.
|slack|
Features
--------
- Intercept HTTP requests and responses and modify them on the fly.
- Save complete HTTP conversations for later replay and analysis.
- Replay the client-side of an HTTP conversations.
- Replay HTTP responses of a previously recorded server.
- Reverse proxy mode to forward traffic to a specified server.
- Transparent proxy mode on OSX and Linux.
- Make scripted changes to HTTP traffic using Python.
- SSL certificates for interception are generated on the fly.
- And much, much more.
``mitmproxy`` is tested and developed on OSX, Linux and OpenBSD.
On Windows, only mitmdump is supported, which does not have a graphical user interface.
Hacking
-------
To get started hacking on mitmproxy, make sure you have Python_ 2.7.x. with
virtualenv_ installed (you can find installation instructions for virtualenv here_).
Then do the following:
.. code-block:: text
git clone https://github.com/mitmproxy/mitmproxy.git
git clone https://github.com/mitmproxy/netlib.git
git clone https://github.com/mitmproxy/pathod.git
cd mitmproxy
./dev
The *dev* script will create a virtualenv environment in a directory called
"venv.mitmproxy", and install all of mitmproxy's development requirements, plus
all optional modules. The primary mitmproxy components - mitmproxy, netlib and
pathod - are all installed "editable", so any changes to the source in the git
checkouts will be reflected live in the virtualenv.
To confirm that you're up and running, activate the virtualenv, and run the
mitmproxy test suite:
.. code-block:: text
. ../venv.mitmproxy/bin/activate # ..\venv.mitmproxy\Scripts\activate.bat on Windows
py.test -n 4 --cov libmproxy
Note that the main executables for the project - ``mitmdump``, ``mitmproxy`` and
``mitmweb`` - are all created within the virtualenv. After activating the
virtualenv, they will be on your $PATH, and you can run them like any other
command:
.. code-block:: text
mitmdump --version
For convenience, the project includes an autoenv_ file (`.env`_) that
auto-activates the virtualenv when you cd into the mitmproxy directory.
Testing
-------
If you've followed the procedure above, you already have all the development
requirements installed, and you can simply run the test suite:
.. code-block:: text
py.test -n 4 --cov libmproxy
Please ensure that all patches are accompanied by matching changes in the test
suite. The project maintains 100% test coverage.
Docs
----
The mitmproxy documentation is build using Sphinx_, which is installed automatically if you set up a development
environment as described above.
After installation, you can render the documentation like this:
.. code-block:: text
cd docs
make clean
make html
make livehtml
The last command invokes `sphinx-autobuild`_, which watches the Sphinx directory and rebuilds
the documentation when a change is detected.
.. |site| image:: https://img.shields.io/badge/https%3A%2F%2F-mitmproxy.org-blue.svg
:target: https://mitmproxy.org/
:alt: mitmproxy.org
.. |docs| image:: https://readthedocs.org/projects/mitmproxy/badge/
:target: http://docs.mitmproxy.org/en/latest/
:alt: Documentation
.. |slack| image:: http://slack.mitmproxy.org/badge.svg
:target: http://slack.mitmproxy.org/
:alt: Slack Developer Chat
.. |travis| image:: https://img.shields.io/travis/mitmproxy/mitmproxy/master.svg
:target: https://travis-ci.org/mitmproxy/mitmproxy
:alt: Build Status
.. |coveralls| image:: https://img.shields.io/coveralls/mitmproxy/mitmproxy/master.svg
:target: https://coveralls.io/r/mitmproxy/mitmproxy
:alt: Coverage Status
.. |downloads| image:: https://img.shields.io/pypi/dm/mitmproxy.svg?color=orange
:target: https://pypi.python.org/pypi/mitmproxy
:alt: Downloads
.. |latest-release| image:: https://img.shields.io/pypi/v/mitmproxy.svg
:target: https://pypi.python.org/pypi/mitmproxy
:alt: Latest Version
.. |python-versions| image:: https://img.shields.io/pypi/pyversions/mitmproxy.svg
:target: https://pypi.python.org/pypi/mitmproxy
:alt: Supported Python versions
.. _Python: https://www.python.org/
.. _virtualenv: https://virtualenv.pypa.io/en/latest/
.. _here: https://virtualenv.pypa.io/en/latest/installation.html
.. _autoenv: https://github.com/kennethreitz/autoenv
.. _.env: https://github.com/mitmproxy/mitmproxy/blob/master/.env
.. _Sphinx: http://sphinx-doc.org/
.. _sphinx-autobuild: https://pypi.python.org/pypi/sphinx-autobuild

View File

@@ -1,84 +0,0 @@
**mitmproxy** is an SSL-capable man-in-the-middle proxy for HTTP. It provides a
console interface that allows traffic flows to be inspected and edited on the
fly.
**mitmdump** is the command-line version of mitmproxy, with the same
functionality but without the user interface. Think tcpdump for HTTP.
Complete documentation and a set of practical tutorials is included in the
distribution package, and is also available at mitmproxy.org_.
Features
--------
- Intercept HTTP requests and responses and modify them on the fly.
- Save complete HTTP conversations for later replay and analysis.
- Replay the client-side of an HTTP conversations.
- Replay HTTP responses of a previously recorded server.
- Reverse proxy mode to forward traffic to a specified server.
- Make scripted changes to HTTP traffic using Python.
- SSL certificates for interception are generated on the fly.
Download
--------
Releases and rendered documentation can be found on the mitmproxy website:
mitmproxy.org_
Source is hosted on github:
`github.com/cortesi/mitmproxy`_
Community
---------
Come join us in the #mitmproxy channel on the OFTC IRC network
(irc.oftc.net, port 6667).
We also have a mailing list, hosted here:
http://groups.google.com/group/mitmproxy
Requirements
------------
* Python_ 2.6.x or 2.7.x.
* PyOpenSSL_ 0.12 or newer.
* pyasn1_ 0.1.2 or newer.
* urwid_ version 0.9.8 or newer.
* PIL_ version 1.1 or newer.
* lxml_ version 2.3 or newer.
The following auxiliary components may be needed if you plan to hack on
mitmproxy:
* The test suite uses the pry_ unit testing
library.
* Rendering the documentation requires countershape_.
**mitmproxy** is tested and developed on OSX, Linux and OpenBSD. Windows is not
supported at the moment.
You should also make sure that your console environment is set up with the
following:
* EDITOR environment variable to determine the external editor.
* PAGER environment variable to determine the external pager.
* Appropriate entries in your mailcap files to determine external
viewers for request and response contents.
.. _mitmproxy.org: http://mitmproxy.org
.. _github.com/cortesi/mitmproxy: http://github.com/cortesi/mitmproxy
.. _python: http://www.python.org
.. _PyOpenSSL: http://pypi.python.org/pypi/pyOpenSSL
.. _pyasn1: http://pypi.python.org/pypi/pyasn1
.. _PIL: http://www.pythonware.com/products/pil/
.. _lxml: http://lxml.de/
.. _urwid: http://excess.org/urwid/
.. _pry: http://github.com/cortesi/pry
.. _countershape: http://github.com/cortesi/countershape

12
dev Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -e
VENV=../venv.mitmproxy
python -m virtualenv $VENV --always-copy
. $VENV/bin/activate
pip install --src .. -r requirements.txt
echo ""
echo "* Created virtualenv environment in $VENV."
echo "* Installed all dependencies into the virtualenv."
echo "* You can now activate the virtualenv: \`. $VENV/bin/activate\`"

14
dev.bat Normal file
View File

@@ -0,0 +1,14 @@
@echo off
set VENV=..\venv.mitmproxy
virtualenv %VENV% --always-copy
if %errorlevel% neq 0 exit /b %errorlevel%
call %VENV%\Scripts\activate.bat
if %errorlevel% neq 0 exit /b %errorlevel%
pip install --src .. -r requirements.txt
if %errorlevel% neq 0 exit /b %errorlevel%
echo.
echo * Created virtualenv environment in %VENV%.
echo * Installed all dependencies into the virtualenv.
echo * Activated virtualenv environment.

File diff suppressed because one or more lines are too long

View File

@@ -1,137 +0,0 @@
a {
color: #3F8ED8;
text-decoration: none;
}
#hd.doc {
-x-system-font:none;
font-family: Helvetica,Arial,Tahoma,Verdana,Sans-Serif;
color: #444444;
margin: 0;
margin-bottom: 1em;
}
#hd.doc h1 {
letter-spacing: 3px;
font-size: 2.5em;
margin: 0.3em 0;
font-weight: normal;
}
#nav {
float: right;
}
#bd {
font: 16px/21px "HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif;
line-height: 1.5;
color: #444444;
}
#bd h1, #bd h2, #bd h3 {
font-family: "Georgia","Times New Roman",Helvetica,Arial,sans-serif;
font-weight: normal;
color: #181818;
}
#bd h1 {
font-size: 1.9em;
border-bottom: 2px solid #ff7033;
margin-top: 5px;
margin-bottom: 5px;
}
#bd h2 {
font-size: 1.4em;
border-bottom: 1px solid #cccccc;
margin-top: 5px;
margin-bottom: 5px;
}
#bd h3 {
margin-bottom: 0px;
}
#bd p {
margin: 1em 0;
margin-top: 0.5em;
}
/* Keyboard shortcuts */
#bd em {
font-weight: bold;
color: #00A700;
font-style: normal;
}
#ft.doc {
color: #aaa;
border-top: 1px solid #aaa;
clear: both;
margin-top: 2em;
font-size: 0.8em;
letter-spacing: 0.5px;
}
.faq .question {
font-size: 1.1em;
font-weight: bold;
}
pre {
font-size: 0.9em;
line-height: 1.4;
padding: 10px;
background-color: #dddddd;
margin: 1em 0;
}
.terminal {
color: #c0c0c0;
font-size: 1em;
background: #000000;
}
.docindex {
font-size: 1.3em;
line-height: 1.3;
margin-top: 0.1em;
margin-bottom: 0;
margin-left: 0px;
}
.docindex li {
list-style-position: inside;
margin-left: 0;
}
.docindex ul {
margin-left: 2em;
margin-top: 0.1em;
margin-bottom: 0.1em;
}
li a {
text-decoration: none;
}
.highlight {
font-size: 14px;
}
.example_legend{
line-height: 1;
font-size: 12px;
}
.example pre {
margin: 0;
}
.kvtable th {
text-align: left;
white-space: nowrap;
}

View File

@@ -1,30 +0,0 @@
<div id="doc">
<div style="" id="hd" class="doc">
<!--(block nav)-->
<div id="nav">
<!--(block pb)-->
<a href="@!urlTo(previous)!@">prev</a>
<!--(end)-->
<!--(block nb)-->
<a href="@!urlTo(next)!@">next</a>
<!--(end)-->
$!pb if previous else "prev"!$ |
<a href="@!urlTo('/index.html')!@">index</a> |
$!nb if next else "next"!$
</div>
<!--(end)-->
$!nav if this.title!="docs" else ""!$
<h1><a href="@!urlTo("/index.html")!@">mitmproxy 0.8 docs</a></h1>
</div>
<div id="bd">
<div id="yui-main">
<div style="" class="yui-b">
$!title if this.title!="docs" else ""!$
$!body!$
</div>
</div>
</div>
<div style="" id="ft" class="doc">
<p>@!copyright!@</p>
</div>
</div>

View File

@@ -1,42 +0,0 @@
<a href="http://github.com/cortesi/mitmproxy"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/e6bef7a091f5f3138b8cd40bc3e114258dd68ddf/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub"></a>
<div class="yui-t7" id="doc">
<div style="" id="hd">
<div class="HorizontalNavBar">
<ul>
<li class="inactive"><a href="@!urlTo("/index.html")!@">home</a></li>
<li class="active"><a href="@!urlTo("doc/index.html")!@">docs</a></li>
<li class="inactive"><a href="@!urlTo("/about.html")!@">about</a></li>
</ul>
</div>
<h1><a href="@!urlTo("/index.html")!@">mitmproxy</a> </h1>
<br>
<p>an SSL-capable man-in-the-middle proxy</p>
</div>
<div id="bd">
<div id="yui-main">
<div style="" class="yui-b">
<!--(block nav)-->
<div id="nav">
<!--(block pb)-->
<a href="@!urlTo(previous)!@">prev</a>
<!--(end)-->
<!--(block nb)-->
<a href="@!urlTo(next)!@">next</a>
<!--(end)-->
$!pb if previous and not previous.parent.root else "prev"!$ |
<a href="@!urlTo('doc/index.html')!@">index</a> |
$!nb if next and not next.parent.root else "next"!$
</div>
<!--(end)-->
$!nav if this.title!="docs" else ""!$
$!title if this.title!="docs" else "<h1>mitmproxy 0.8 docs</h1>"!$
$!body!$
</div>
</div>
</div>
<div style="" id="ft">
<p>Copyright 2011 Aldo Cortesi</p>
</div>
</div>
$!ga!$

View File

@@ -1,7 +0,0 @@
Please send any comments, suggestions and bug reports to <a href="mailto:$!docMaintainerEmail!$">$!docMaintainerEmail!$</a>.
__mitmproxy__ is licensed under Version 3 of the Gnu General Public License,
the full text of which can be found in the LICENSE file in the source
distribution.

View File

@@ -1,10 +0,0 @@
- command-line: _--anticache_
- mitmproxy shortcut: _o_, then _a_
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")!@).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,103 +0,0 @@
The proxy situation on Android is [an
embarrasment](http://code.google.com/p/android/issues/detail?id=1273). It's
scarcely credible, but Android didn't have a global proxy setting at all until
quite recently, and it's still not supported on many common Android versions.
In the meantime the app ecosystem has grown used to life without this basic
necessity, and many apps merrily ignore it even if it's there. The upshot is
that in many cases the only way to make interception work on Android is to do
it without relying on the proxy settings.
We used an Asus Transformer Prime TF201 with Android 4.0.3 in the examples
below - your device may differ, but the broad process should be similar.
Installing the mitmproxy certificate
====================================
The first step is to install mitmproxy's interception certificate on the
Android device. In your ~/.mitmproxy directory, there should be a file called
__mitmproxy-ca-cert.cer__ - we need to transfer this file to
__/sdcard/Downloads__ on the Android device. If this file doesn't exist for
you, your certs were generated with an older version of mitmproxy - just copy
the __mitmproxy-ca-cert.pem__ file to __mitmproxy-ca-cert.cer__ and proceed
from there.
In this case, we're using wget from Better Terminal Emulator Pro to transfer
the certificate from a local HTTP server. Other terminal applications may work,
and you might also transfer the file via external media like an SDcard:
<img src="android-shellwgetmitmproxyca.png"/>
Once we have the certificate on the local disk, we need to import it into the
list of trusted CAs. Go to Settings -&gt; Security -&gt; Credential Storage,
and select "Install from storage":
<img src="android-settingssecuritymenu.png"/>
The certificate in /sdcard/Downloads is automatically located and offered for
installation. Installing the cert will delete the download file from the local
disk:
<img src="android-settingssecurityinstallca.png"/>
Afterwards, you should see the certificate listed in the Trusted Credentials
store:
<img src="android-settingssecurityuserinstalledca.png"/>
If you're lucky enough to be working with an app that obeys the wireless proxy
settings, you're just about done - simply configure the settings to point at
mitmproxy. If not, proceed to the next step...
Working around Android's proxy shortcomings
===========================================
In response to Android's proxy situation, a number of apps have been created to
duct-tape proxy support onto the OS. These tools work by running a rudimentary
local proxy on the device, and forwarding all traffic destined for HTTP/S ports
to it using iptables. Since the proxy is running locally, it can detect what
the final IP address of the redirected traffic would have been. The local proxy
then connects to a user-configured upstream proxy, and initiates a proxy
CONNECT request to the destination IP.
Now, if the configured upstream proxy is mitmproxy, we have a slight problem.
Proxy requests from the Android device in this scheme will specify only the
destination IP address, __not__ the destination domain. Mitmproxy needs the
target domain to generate a valid interception certificate. The solution is
mitmproxy's [upstream certificate](@!urlTo("upstreamcerts.html")!@) option.
When this is active, mitmproxy makes a connection to the upstream server to
obtain the certificate Common Name and Subject Alternative Names.
Adding all this together, we can achieve reliable Android interception with
only a few more minutes of setup. The instructions below show how to set up an
Android device with
[ProxyDroid](https://play.google.com/store/apps/details?id=org.proxydroid) (the
local "duct-tape" proxy implementation) to achieve interception.
Install ProxyDroid
------------------
First, root your device - this is required to install ProxyDroid. Then install
ProxyDroid from the Google Play store:
<img src="android-proxydroidinstall.png"/>
You will be prompted for super-user access, which you must allow. Next, enter
the ProxyDroid settings, and change the proxy settings to point to your
mitmproxy instance. When you're done, it should look something like this:
<img src="android-proxydroidsettings.png"/>
In this case, our mitmproxy instance is at the host __maru.otago.ac.nz__,
running on port __8080__.
When you start mitmproxy, make sure that the upstream certificate option is set
(use the _--upstream-cert_ command-line option, or enable it interactively
using the _o_ shortcut):
<pre class="terminal">
mitmproxy --upstream-cert
</pre>

View File

@@ -1,19 +0,0 @@
How to install the __mitmproxy__ certificate authority in Firefox:
### 1. If needed, copy the ~/.mitmproxy/mitmproxy-ca-cert.pem file to the target.
### 2: Open preferences, click on "Advanced", then select"Encryption":
<img src="@!urlTo('firefox3.jpg')!@"/>
### 3: Click "View Certificates", "Import", and select the certificate file:
<img src="@!urlTo('firefox3-import.jpg')!@"/>
### 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.

View File

@@ -1,9 +0,0 @@
from countershape import Page
pages = [
Page("firefox.html", "Firefox"),
Page("osx.html", "OSX"),
Page("windows7.html", "Windows 7"),
Page("ios.html", "IOS"),
Page("android.html", "Android"),
]

View File

@@ -1,18 +0,0 @@
How to install the __mitmproxy__ certificate authority on IOS devices:
### 1: Set up the Mail app on the device to receive email.
### 2: Mail the mitmproxy-ca-cert.pem file to the device, and tap on the attachment.
### 3: You will be prompted to install a profile. Click "Install":
<img src="@!urlTo('ios-profile.png')!@"/>
### 4: Accept the warning by clicking "Install" again:
<img src="@!urlTo('ios-warning.png')!@"/>
### 5: The certificate should now be trusted:
<img src="@!urlTo('ios-installed.png')!@"/>

View File

@@ -1,13 +0,0 @@
How to install the __mitmproxy__ certificate authority in OSX:
### 1: Open Finder, and double-click on the mitmproxy-ca-cert.pem file.
### 2: You will be prompted to add the certificate. Click "Always Trust":
<img src="@!urlTo('osx-addcert-alwaystrust.png')!@"/>
You may be prompted for your password. You should now see the mitmproxy cert
listed under "Certificates".

View File

@@ -1,19 +0,0 @@
How to install the __mitmproxy__ certificate authority in Windows 7:
### 1: Copy the ~/.mitmproxy/mitmproxy-ca-cert.p12 file to the target system.
### 2: Double-click the certificate file. You should see a certificate import wizard:
<img src="@!urlTo('win7-wizard.png')!@"/>
### 3: Click "Next" until you're prompted for the certificate store:
<img src="@!urlTo('win7-certstore.png')!@"/>
### 4: Select "Place all certificates in the following store", and select "Trusted Root Certification Authorities":
<img src="@!urlTo('win7-certstore-trustedroot.png')!@"/>
### 5: Click "Next" and "Finish".

View File

@@ -1,19 +0,0 @@
## Any tips for running mitmproxy on OSX?
You can use the OSX <b>open</b> program to create a simple and effective
<b>~/.mailcap</b> file to view HTTP bodies:
<pre>
application/*; /usr/bin/open -Wn %s
audio/*; /usr/bin/open -Wn %s
image/*; /usr/bin/open -Wn %s
video/*; /usr/bin/open -Wn %s
</pre>
## I'd like to hack on mitmproxy. What should I work on?
There's a __todo__ file at the top of the source tree that outlines a variety
of tasks, from simple to complex. If you don't have your own itch, feel free to
scratch one of those!

View File

@@ -1,37 +0,0 @@
<ul class="docindex">
<li><a href="@!urlTo("intro.html")!@">Introduction</a></li>
<li><a href="@!urlTo("install.html")!@">Installation</a></li>
<li><a href="@!urlTo("mitmproxy.html")!@">mitmproxy</a></li>
<li><a href="@!urlTo("mitmdump.html")!@">mitmdump</a></li>
<li>Features</li>
<ul>
<li><a href="@!urlTo("clientreplay.html")!@">Client-side replay</a></li>
<li><a href="@!urlTo("serverreplay.html")!@">Server-side replay</a></li>
<li><a href="@!urlTo("sticky.html")!@">Sticky cookies and auth</a></li>
<li><a href="@!urlTo("reverseproxy.html")!@">Reverse proxy mode</a></li>
<li><a href="@!urlTo("upstreamcerts.html")!@">Upstream Certs</a></li>
<li><a href="@!urlTo("replacements.html")!@">Replacements</a></li>
<li><a href="@!urlTo("anticache.html")!@">Anticache</a></li>
<li><a href="@!urlTo("filters.html")!@">Filter expressions</a></li>
</ul>
<li><a href="@!urlTo("scripts.html")!@">Scripts</a></li>
<li><a href="@!urlTo("ssl.html")!@">Setting up SSL interception</a></li>
<ul>
<li><a href="@!urlTo("certinstall/firefox.html")!@">Firefox</a></li>
<li><a href="@!urlTo("certinstall/osx.html")!@">OSX</a></li>
<li><a href="@!urlTo("certinstall/windows7.html")!@">Windows 7</a></li>
<li><a href="@!urlTo("certinstall/ios.html")!@">iPhone/iPad</a></li>
<li><a href="@!urlTo("certinstall/android.html")!@">Android</a></li>
</ul>
<li><a href="@!urlTo("library.html")!@">libmproxy</a></li>
<li>Tutorials</li>
<ul>
<li> <a href="@!urlTo("tutorials/30second.html")!@">Client replay: a 30 second example</a> </li>
<li> <a href="@!urlTo("tutorials/gamecenter.html")!@">Setting highscores on Apple's GameCenter</a> </li>
</ul>
<li><a href="@!urlTo("faq.html")!@">FAQ</a></li>
<li><a href="@!urlTo("admin.html")!@">Administrivia</a></li>
</ul>

View File

@@ -1,89 +0,0 @@
import os, sys
import countershape
from countershape import Page, Directory, PythonModule, markup
import countershape.template
sys.path.insert(0, "..")
from libmproxy import filt
MITMPROXY_SRC = "~/git/public/mitmproxy"
if ns.options.website:
ns.title = countershape.template.Template(None, "<h1>@!this.title!@</h1>")
this.layout = countershape.Layout("_websitelayout.html")
else:
ns.title = countershape.template.Template(None, "<h1>@!this.title!@</h1>")
this.layout = countershape.Layout("_layout.html")
this.markup = markup.Markdown()
ns.docMaintainer = "Aldo Cortesi"
ns.docMaintainerEmail = "aldo@corte.si"
ns.copyright = u"\u00a9 mitmproxy project, 2012"
ns.index = countershape.widgets.SiblingPageIndex('/index.html', divclass="pageindex")
def mpath(p):
p = os.path.join(MITMPROXY_SRC, p)
return os.path.expanduser(p)
ns.license = file(mpath("LICENSE")).read()
ns.index_contents = file(mpath("README.mkd")).read()
top = os.path.abspath(os.getcwd())
def example(s):
d = file(mpath(s)).read()
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(
("~%s"%i.code, i.help)
)
for i in filt.filt_rex:
filt_help.append(
("~%s regex"%i.code, i.help)
)
for i in filt.filt_int:
filt_help.append(
("~%s int"%i.code, i.help)
)
filt_help.sort()
filt_help.extend(
[
("!", "unary not"),
("&", "and"),
("|", "or"),
("(...)", "grouping"),
]
)
ns.filt_help = filt_help
pages = [
Page("index.html", "docs"),
Page("intro.html", "Introduction"),
Page("install.html", "Installation"),
Page("mitmproxy.html", "mitmproxy"),
Page("mitmdump.html", "mitmdump"),
Page("clientreplay.html", "Client-side replay"),
Page("serverreplay.html", "Server-side replay"),
Page("sticky.html", "Sticky cookies and auth"),
Page("upstreamcerts.html", "Upstream Certs"),
Page("replacements.html", "Replacements"),
Page("reverseproxy.html", "Reverse proxy mode"),
Page("anticache.html", "Anticache"),
Page("filters.html", "Filter expressions"),
Page("scripts.html", "Scripts"),
Page("ssl.html", "Setting up SSL interception"),
Directory("certinstall"),
Page("library.html", "libmproxy: mitmproxy as a library"),
Directory("tutorials"),
Page("faq.html", "FAQ"),
Page("admin.html", "Administrivia")
]

View File

@@ -1,57 +0,0 @@
## Using Pip
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
</pre>
## From Source
- When installing from source, you will need to install the
[dependencies](@!urlTo("intro.html")!@) by hand.
- Then run the following command from the base of the source distribution:
<pre>
sudo python setup.py install
</pre>
## OSX
- 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.
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:
<pre>
application/*; /usr/bin/open -Wn %s
audio/*; /usr/bin/open -Wn %s
image/*; /usr/bin/open -Wn %s
video/*; /usr/bin/open -Wn %s
</pre>

View File

@@ -1,4 +0,0 @@
@!index_contents!@

View File

@@ -1,12 +0,0 @@
All of mitmproxy's basic functionality is exposed through the __libmproxy__
library. The example below shows a simple implementation of the "sticky cookie"
functionality included in the interactive mitmproxy program. Traffic is
monitored for __cookie__ and __set-cookie__ headers, and requests are rewritten
to include a previously seen cookie if they don't already have one. In effect,
this lets you log in to a site using your browser, and then make subsequent
requests using a tool like __curl__, which will then seem to be part of the
authenticated session.
$!example("examples/stickycookies")!$

View File

@@ -1,54 +0,0 @@
__mitmdump__ is the command-line companion to mitmproxy. It provides
tcpdump-like functionality to let you view, record, and programmatically
transform HTTP traffic. See the _--help_ flag output for complete
documentation.
## Example: saving traffic
<pre class="terminal">
> mitmdump -w outfile
</pre>
Start up mitmdump in proxy mode, and write all traffic to __outfile__.
## Example: client replay
<pre class="terminal">
> mitmdump -nc outfile
</pre>
Start mitmdump without binding to the proxy port (_-n_), then replay all
requests from outfile (_-c filename_). Flags combine in the obvious way, so
you can replay requests from one file, and write the resulting flows to
another:
<pre class="terminal">
> mitmdump -nc srcfile -w dstfile
</pre>
See the [Client-side Replay](@!urlTo("clientreplay.html")!@) section for more information.
## Example: running a script
<pre class="terminal">
> mitmdump -s examples/add_header.py
</pre>
This runs the __add_header.py__ example script, which simply adds a new header
to all responses.
## Example: scripted data transformation
<pre class="terminal">
> mitmdump -ns examples/add_header.py -r srcfile -w dstfile
</pre>
This command loads flows from __srcfile__, transforms it according to the
specified script, then writes it back to __dstfile__.

View File

@@ -1,112 +0,0 @@
__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.
## Flow list
The flow list shows an index of captured flows in chronological order.
<img src="@!urlTo("screenshots/mitmproxy.png")!@"/>
- __1__: A GET request, returning a 302 Redirect response.
- __2__: A GET request, returning 16.75kb of text/html data.
- __3__: A replayed request.
- __4__: Intercepted flows are indicated with orange text. The user may edit
these flows, and then accept them (using the _a_ key) to continue. In this
case, the request has been intercepted on the way to the server.
- __5__: A response intercepted from the server on the way to the client.
- __6__: The event log can be toggled on and off using the _e_ shortcut key. This
pane shows events and errors that may not result in a flow that shows up in the
flow pane.
- __7__: Flow count.
- __8__: Various information on mitmproxy's state. In this case, we have an
interception pattern set to ".*".
- __9__: Bind address indicator - mitmproxy is listening on port 8080 of all
interfaces.
## Flow view
The __Flow View__ lets you inspect and manipulate a single flow:
<img src="@!urlTo("screenshots/mitmproxy-flowview.png")!@"/>
- __1__: Flow summary.
- __2__: The Request/Response tabs, showing you which part of the flow you are
currently viewing. In the example above, we're viewing the Response. Hit _tab_
to switch between the Response and the Request.
- __3__: Headers.
- __4__: Body.
- __5__: View Mode indicator. In this case, we're viewing the body in __hex__
mode. The other available modes are __pretty__, which uses a number of
heuristics to show you a friendly view of various content types, and __raw__,
which shows you exactly what's there without any changes. You can change modes
using the _m_ key.
## Grid Editor
Much of the data that we'd like to interact with in mitmproxy is structured.
For instance, headers, queries and form data can all be thought of as a list of
key/value pairs. Mitmproxy has a built-in editor that lays this type of data
out in a grid for easy manipulation.
At the moment, the Grid Editor is used in four parts of mitmproxy:
- Editing request or response headers (_e_ for edit, then _h_ for headers in flow view)
- Editing a query string (_e_ for edit, then _q_ for query in flow view)
- Editing a URL-encoded form (_e_ for edit, then _f_ for form in flow view)
- Editing replacement patterns (_R_ globally)
If there is is no data, an empty editor will be started to let you add some.
Here is the editor showing the headers from a request:
<img src="@!urlTo("screenshots/mitmproxy-kveditor.png")!@"/>
To edit, navigate to the key or value you want to modify using the arrow or vi
navigation keys, and press enter. The background color will change to show that
you are in edit mode for the specified field:
<img src="@!urlTo("screenshots/mitmproxy-kveditor-editmode.png")!@"/>
Modify the field as desired, then press escape to exit edit mode when you're
done. You can also add a row (_a_ key), delete a row (_d_ key), spawn an
external editor on a field (_e_ key). Be sure to consult the context-sensitive
help (_?_ key) for more.
# Example: Interception
__mitmproxy__'s interception functionality lets you pause an HTTP request or
response, inspect and modify it, and then accept it to send it on to the server
or client.
### 1: Set an interception pattern
<img src="@!urlTo('mitmproxy-intercept-filt.png')!@"/>
We press _i_ to set an interception pattern. In this case, the __~q__ filter
pattern tells __mitmproxy__ to intercept all requests. For complete filter
syntax, see the [Filter expressions](@!urlTo("filters.html")!@) section of this
document, or the built-in help function in __mitmproxy__.
### 2: Intercepted connections are indicated with orange text:
<img src="@!urlTo('mitmproxy-intercept-mid.png')!@"/>
### 3: You can now view and modify the request:
<img src="@!urlTo('mitmproxy-intercept-options.png')!@"/>
In this case, we viewed the request by selecting it, pressed _e_ for "edit"
and _m_ for "method" to change the HTTP request method.
### 4: Accept the intercept to continue:
<img src="@!urlTo('mitmproxy-intercept-result.png')!@"/>
Finally, we press _a_ to accept the modified request, which is then sent on to
the server. In this case, we changed the request from an HTTP GET to
OPTIONS, and Google's server has responded with a 405 "Method not allowed".

View File

@@ -1,8 +0,0 @@
- command-line: _-P_ http[s]://hostname[:port]
- mitmproxy shortcut: _P_
In reverse proxy mode, mitmproxy acts as a standard HTTP server and forwards
all requests to the specified upstream server. Note that the displayed URL for
flows in this mode will use the value of the __Host__ header field from the
request, not the reverse proxy server.

View File

@@ -1,129 +0,0 @@
__mitmproxy__ has a powerful scripting API that allows you to modify flows
on-the-fly or rewrite previously saved flows locally.
The mitmproxy scripting API is event driven - a script is simply a Python
module that exposes a set of event methods. Here's a complete mitmproxy script
that adds a new header to every HTTP response before it is returned to the
client:
$!example("examples/add_header.py")!$
The first argument to each event method is an instance of ScriptContext that
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.
## Events
### start(ScriptContext)
Called once on startup, before any other events.
###clientconnect(ScriptContext, ClientConnect)
Called when a client initiates a connection to the proxy. Note that
a connection can correspond to multiple HTTP requests.
###request(ScriptContext, Flow)
Called when a client request has been received. The __Flow__ object is
guaranteed to have a non-None __request__ attribute.
### response(ScriptContext, Flow)
Called when a server response has been received. The __Flow__ object is
guaranteed to have non-None __request__ and __response__ attributes.
### error(ScriptContext, Flow)
Called when a flow error has occurred, e.g. invalid server responses, or
interrupted connections. This is distinct from a valid server HTTP error
response, which is simply a response with an HTTP error code. The __Flow__
object is guaranteed to have non-None __request__ and __error__ attributes.
### clientdisconnect(ScriptContext, ClientDisconnect)
Called when a client disconnects from the proxy.
### done(ScriptContext)
Called once on script shutdown, after any other events.
## API
The main classes you will deal with in writing mitmproxy scripts are:
<table class="kvtable">
<tr>
<th>libmproxy.flow.ClientConnection</th>
<td>Describes a client connection.</td>
</tr>
<tr>
<th>libmproxy.flow.ClientDisconnection</th>
<td>Describes a client disconnection.</td>
</tr>
<tr>
<th>libmproxy.flow.Error</th>
<td>A communications error.</td>
</tr>
<tr>
<th>libmproxy.flow.Flow</th>
<td>A collection of objects representing a single HTTP transaction.</td>
</tr>
<tr>
<th>libmproxy.flow.Headers</th>
<td>HTTP headers for a request or response.</td>
</tr>
<tr>
<th>libmproxy.flow.ODict</th>
<td>A dictionary-like object for managing sets of key/value data. There
is also a variant called CaselessODict that ignores key case for some
calls (used mainly for headers).</td>
</tr>
<tr>
<th>libmproxy.flow.Response</th>
<td>An HTTP response.</td>
</tr>
<tr>
<th>libmproxy.flow.Request</th>
<td>An HTTP request.</td>
</tr>
<tr>
<th>libmproxy.flow.ScriptContext</th>
<td> A handle for interacting with mitmproxy's from within scripts. </td>
</tr>
<tr>
<th>libmproxy.certutils.SSLCert</th>
<td>Exposes information SSL certificates.</td>
</tr>
</table>
The canonical API documentation is the code. You can view the API documentation
using pydoc (which is installed with Python by default), like this:
<pre class="terminal">
> pydoc libmproxy.flow.Request
</pre>
## Running scripts on saved flows
Sometimes, we want to run a script on __Flow__ objects that are already
complete. This happens when you start a script, and then load a saved set of
flows from a file (see the "scripted data transformation" example on the
[mitmdump](@!urlTo("mitmdump.html")!@) page). It also happens when you run a
one-shot script on a single flow through the _|_ (pipe) shortcut in mitmproxy.
In this case, there are no client connections, and the events are run in the
following order: __start__, __request__, __response__, __error__, __done__. If
the flow doesn't have a __response__ or __error__ associated with it, the
matching event will be skipped.

View File

@@ -1,46 +0,0 @@
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>
<tr>
<td>mitmproxy-ca.pem</td>
<td>The private key and certificate in PEM format.</td>
</tr>
<tr>
<td>mitmproxy-ca-cert.pem</td>
<td>The certificate in PEM format. Use this to distribute to most
non-Windows platforms.</td>
</tr>
<tr>
<td>mitmproxy-ca-cert.p12</td>
<td>The certificate in PKCS12 format. For use on Windows.</td>
</tr>
</table>
This CA is used for on-the-fly generation of dummy certificates for SSL
interception. Since your browser won't trust the __mitmproxy__ CA out of the
box (and rightly so), you will see an SSL cert warning every time you visit a
new SSL domain through __mitmproxy__. When you're testing a single site through
a browser, just accepting the bogus SSL cert manually is not too much trouble,
but there are a number of cases where you will want to configure your testing
system or browser to trust the __mitmproxy__ CA as a signing root authority:
- If you are testing non-browser software that checks SSL cert validity using
the system certificate store.
- You are testing an app that makes non-interactive (JSONP, script src, etc.)
requests to SSL resources. Another workaround in this case is to manually visit
the page through the browser, and add a certificate exception.
- You just don't want to deal with the hassle of continuously adding cert
exceptions.
Installing the mitmproxy CA
---------------------------
* [Firefox](@!urlTo("certinstall/firefox.html")!@)
* [OSX](@!urlTo("certinstall/osx.html")!@)
* [Windows 7](@!urlTo("certinstall/windows7.html")!@)
* [iPhone/iPad](@!urlTo("certinstall/ios.html")!@)

View File

@@ -1,120 +0,0 @@
.highlight { background: #f8f8f8; }
.highlight .c { color: #408080; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #808080 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0040D0 } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #7D9029 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.highlight .no { color: #880000 } /* Name.Constant */
.highlight .nd { color: #AA22FF } /* Name.Decorator */
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0000FF } /* Name.Function */
.highlight .nl { color: #A0A000 } /* Name.Label */
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #666666 } /* Literal.Number.Float */
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
.grokdoc { background: #f8f8f8; }
.grokdoc .c { color: #408080; font-style: italic } /* Comment */
.grokdoc .err { border: 1px solid #FF0000 } /* Error */
.grokdoc .k { color: #008000; font-weight: bold } /* Keyword */
.grokdoc .o { color: #666666 } /* Operator */
.grokdoc .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.grokdoc .cp { color: #BC7A00 } /* Comment.Preproc */
.grokdoc .c1 { color: #408080; font-style: italic } /* Comment.Single */
.grokdoc .cs { color: #408080; font-style: italic } /* Comment.Special */
.grokdoc .gd { color: #A00000 } /* Generic.Deleted */
.grokdoc .ge { font-style: italic } /* Generic.Emph */
.grokdoc .gr { color: #FF0000 } /* Generic.Error */
.grokdoc .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.grokdoc .gi { color: #00A000 } /* Generic.Inserted */
.grokdoc .go { color: #808080 } /* Generic.Output */
.grokdoc .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.grokdoc .gs { font-weight: bold } /* Generic.Strong */
.grokdoc .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.grokdoc .gt { color: #0040D0 } /* Generic.Traceback */
.grokdoc .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.grokdoc .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.grokdoc .kp { color: #008000 } /* Keyword.Pseudo */
.grokdoc .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.grokdoc .kt { color: #B00040 } /* Keyword.Type */
.grokdoc .m { color: #666666 } /* Literal.Number */
.grokdoc .s { color: #BA2121 } /* Literal.String */
.grokdoc .na { color: #7D9029 } /* Name.Attribute */
.grokdoc .nb { color: #008000 } /* Name.Builtin */
.grokdoc .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.grokdoc .no { color: #880000 } /* Name.Constant */
.grokdoc .nd { color: #AA22FF } /* Name.Decorator */
.grokdoc .ni { color: #999999; font-weight: bold } /* Name.Entity */
.grokdoc .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.grokdoc .nf { color: #0000FF } /* Name.Function */
.grokdoc .nl { color: #A0A000 } /* Name.Label */
.grokdoc .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.grokdoc .nt { color: #008000; font-weight: bold } /* Name.Tag */
.grokdoc .nv { color: #19177C } /* Name.Variable */
.grokdoc .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.grokdoc .w { color: #bbbbbb } /* Text.Whitespace */
.grokdoc .mf { color: #666666 } /* Literal.Number.Float */
.grokdoc .mh { color: #666666 } /* Literal.Number.Hex */
.grokdoc .mi { color: #666666 } /* Literal.Number.Integer */
.grokdoc .mo { color: #666666 } /* Literal.Number.Oct */
.grokdoc .sb { color: #BA2121 } /* Literal.String.Backtick */
.grokdoc .sc { color: #BA2121 } /* Literal.String.Char */
.grokdoc .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.grokdoc .s2 { color: #BA2121 } /* Literal.String.Double */
.grokdoc .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.grokdoc .sh { color: #BA2121 } /* Literal.String.Heredoc */
.grokdoc .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.grokdoc .sx { color: #008000 } /* Literal.String.Other */
.grokdoc .sr { color: #BB6688 } /* Literal.String.Regex */
.grokdoc .s1 { color: #BA2121 } /* Literal.String.Single */
.grokdoc .ss { color: #19177C } /* Literal.String.Symbol */
.grokdoc .bp { color: #008000 } /* Name.Builtin.Pseudo */
.grokdoc .vc { color: #19177C } /* Name.Variable.Class */
.grokdoc .vg { color: #19177C } /* Name.Variable.Global */
.grokdoc .vi { color: #19177C } /* Name.Variable.Instance */
.grokdoc .il { color: #666666 } /* Literal.Number.Integer.Long */

View File

@@ -1,105 +0,0 @@
## The setup
In this tutorial, I'm going to show you how simple it is to creatively
interfere with Apple Game Center traffic using mitmproxy. To set things up, I
registered my mitmproxy CA certificate with my iPhone - there's a [step by step
set of instructions](@!urlTo("certinstall/ios.html")!@) elsewhere in this manual. I then
started mitmproxy on my desktop, and configured the iPhone to use it as a
proxy.
## Taking a look at the Game Center traffic
Lets take a first look at the Game Center traffic. The game I'll use in this
tutorial is [Super Mega
Worm](http://itunes.apple.com/us/app/super-mega-worm/id388541990?mt=8) - a
great little retro-apocalyptic sidescroller for the iPhone:
<center>
<img src="@!urlTo("tutorials/supermega.png")!@"/>
</center>
After finishing a game (take your time), watch the traffic flowing through
mitmproxy:
<center>
<img src="@!urlTo("tutorials/one.png")!@"/>
</center>
We see a bunch of things we might expect - initialisation, the retrieval of
leaderboards and so forth. Then, right at the end, there's a POST to this
tantalising URL:
<pre>
https://service.gc.apple.com/WebObjects/GKGameStatsService.woa/wa/submitScore
</pre>
The contents of the submission are particularly interesting:
<!--(block|syntax("xml"))-->
<plist version="1.0">
<dict>
<key>category</key>
<string>SMW_Adv_USA1</string>
<key>score-value</key>
<integer>55</integer>
<key>timestamp</key>
<integer>1301553284461</integer>
</dict>
</plist>
<!--(end)-->
This is a [property list](http://en.wikipedia.org/wiki/Property_list),
containing an identifier for the game, a score (55, in this case), and a
timestamp. Looks pretty simple to mess with.
## Modifying and replaying the score submission
Lets edit the score submission. First, select it in mitmproxy, then press
__enter__ to view it. Make sure you're viewing the request, not the response -
you can use __tab__ to flick between the two. Now press __e__ for edit. You'll
be prompted for the part of the request you want to change - press __b__ for
body. Your preferred editor (taken from the EDITOR environment variable) will
now fire up. Lets bump the score up to something a bit more ambitious:
<!--(block|syntax("xml"))-->
<plist version="1.0">
<dict>
<key>category</key>
<string>SMW_Adv_USA1</string>
<key>score-value</key>
<integer>2200272667</integer>
<key>timestamp</key>
<integer>1301553284461</integer>
</dict>
</plist>
<!--(end)-->
Save the file and exit your editor.
The final step is to replay this modified request. Simply press __r__ for
replay.
## The glorious result and some intrigue
<center>
<img src="@!urlTo("tutorials/leaderboard.png")!@"/>
</center>
And that's it - according to the records, I am the greatest Super Mega Worm
player of all time.
Curiously, the top competitors' scores are all the same: 2,147,483,647. If you
think that number seems familiar, you're right: it's 2^31-1, the maximum value
you can fit into a signed 32-bit int. Now let me tell you another peculiar
thing about Super Mega Worm - at the end of every game, it submits your highest
previous score to the Game Center, not your current score. This means that it
stores your highscore somewhere, and I'm guessing that it reads that stored
score back into a signed integer. So, if you _were_ to cheat by the relatively
pedestrian means of modifying the saved score on your jailbroken phone, then
2^31-1 might well be the maximum score you could get. Then again, if the game
itself stores its score in a signed 32-bit int, you could get the same score
through perfect play, effectively beating the game. So, which is it in this
case? I'll leave that for you to decide.

View File

@@ -1,6 +0,0 @@
from countershape import Page
pages = [
Page("30second.html", "Client playback: a 30 second example"),
Page("gamecenter.html", "Setting highscores on Apple's GameCenter"),
]

View File

@@ -1,15 +0,0 @@
- command-line: _--upstream-cert_
- mitmproxy shortcut: _o_, then _u_
Normally, mitmproxy uses the target domain specified in a client's proxy
request to generate an interception certificate. When __upstream-cert__ mode is
activated a different procedure is followed: a connection is made to the
specified remote server to retrieve its __Common Name__ and __Subject
Alternative Names__. This feature is especially useful when the client
specifies an IP address rather than a host name in the proxy request. If this
is the case, we can only generate a certificate if we can establish the __CN__
and __SANs__ from the upstream server.
Note that __upstream-cert__ mode does not work when the remote server relies on
[Server Name Indication](http://en.wikipedia.org/wiki/Server_Name_Indication).
Luckily, SNI is still not very widely used.

1
docs/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
_build/

195
docs/Makefile Normal file
View File

@@ -0,0 +1,195 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/mitmproxy.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/mitmproxy.qhc"
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/mitmproxy"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/mitmproxy"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
livehtml:
sphinx-autobuild -b html -z '../libmproxy' -z '../../netlib/netlib' -r '___jb_(old|bak)___$$' $(ALLSPHINXOPTS) $(BUILDDIR)/html

BIN
docs/certinstall-webapp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

174
docs/certinstall.rst Normal file
View File

@@ -0,0 +1,174 @@
.. _certinstall:
About Certificates
==================
Introduction
------------
Mitmproxy can decrypt encrypted traffic on the fly, as long as the client
trusts its built-in certificate authority. Usually this means that the
mitmproxy CA certificates have to be installed on the client device.
Quick Setup
-----------
By far the easiest way to install the mitmproxy certificates is to use the
built-in certificate installation app. To do this, just start mitmproxy and
configure your target device with the correct proxy settings. Now start a
browser on the device, and visit the magic domain **mitm.it**. You should see
something like this:
.. image:: certinstall-webapp.png
Click on the relevant icon, follow the setup instructions for the platform
you're on and you are good to go.
Installing the mitmproxy CA certificate manually
------------------------------------------------
Sometimes using the quick install app is not an option - Java or the iOS
Simulator spring to mind - or you just need to do it manually for some other
reason. Below is a list of pointers to manual certificate installation
documentation for some common platforms.
The mitmproxy CA cert is located in ``~/.mitmproxy`` after it has been generated at the first
start of mitmproxy.
iOS
^^^
http://kb.mit.edu/confluence/pages/viewpage.action?pageId=152600377
iOS Simulator
^^^^^^^^^^^^^
See https://github.com/ADVTOOLS/ADVTrustStore#how-to-use-advtruststore
Java
^^^^
See http://docs.oracle.com/cd/E19906-01/820-4916/geygn/index.html
Android/Android Simulator
^^^^^^^^^^^^^^^^^^^^^^^^^
See http://wiki.cacert.org/FAQ/ImportRootCert#Android_Phones_.26_Tablets
Windows
^^^^^^^
See http://windows.microsoft.com/en-ca/windows/import-export-certificates-private-keys#1TC=windows-7
Windows (automated)
^^^^^^^^^^^^^^^^^^^
>>> certutil.exe -importpfx mitmproxy-ca-cert.p12
See also: https://technet.microsoft.com/en-us/library/cc732443.aspx
Mac OS X
^^^^^^^^
See https://support.apple.com/kb/PH7297?locale=en_US
Ubuntu/Debian
^^^^^^^^^^^^^
See http://askubuntu.com/questions/73287/how-do-i-install-a-root-certificate/94861#94861
Mozilla Firefox
^^^^^^^^^^^^^^^
See https://wiki.mozilla.org/MozillaRootCertificate#Mozilla_Firefox
Chrome on Linux
^^^^^^^^^^^^^^^
See https://code.google.com/p/chromium/wiki/LinuxCertManagement
More on mitmproxy certificates
------------------------------
The first time **mitmproxy** or **mitmdump** is run, the mitmproxy Certificate
Authority (CA) is created in the config directory (``~/.mitmproxy`` by default).
This CA is used for on-the-fly generation of dummy certificates for each of the
SSL sites that your client visits. Since your browser won't trust the
mitmproxy CA out of the box , you will see an SSL certificate warning every
time you visit a new SSL domain through mitmproxy. When you are testing a
single site through a browser, just accepting the bogus SSL cert manually is
not too much trouble, but there are a many circumstances where you will want to
configure your testing system or browser to trust the mitmproxy CA as a
signing root authority. For security reasons, the mitmproxy CA is generated uniquely on the first
start and is not shared between mitmproxy installations on different devices.
CA and cert files
-----------------
The files created by mitmproxy in the .mitmproxy directory are as follows:
===================== ==========================================================================
mitmproxy-ca.pem The certificate **and the private key** in PEM format.
mitmproxy-ca-cert.pem The certificate in PEM format.
Use this to distribute on most non-Windows platforms.
mitmproxy-ca-cert.p12 The certificate in PKCS12 format. For use on Windows.
mitmproxy-ca-cert.cer Same file as .pem, but with an extension expected by some Android devices.
===================== ==========================================================================
Using a custom certificate
--------------------------
You can use your own certificate by passing the ``--cert`` option to
mitmproxy. Mitmproxy then uses the provided certificate for interception of the
specified domains instead of generating a certificate signed by its own CA.
The certificate file is expected to be in the PEM format. You can include
intermediary certificates right below your leaf certificate, so that you PEM
file roughly looks like this:
.. code-block:: none
-----BEGIN PRIVATE KEY-----
<private key>
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
<cert>
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
<intermediary cert (optional)>
-----END CERTIFICATE-----
For example, you can generate a certificate in this format using these instructions:
>>> openssl genrsa -out cert.key 2048
>>> openssl req -new -x509 -key cert.key -out cert.crt
(Specify the mitm domain as Common Name, e.g. *.google.com)
>>> cat cert.key cert.crt > cert.pem
>>> mitmproxy --cert=cert.pem
Using a custom certificate authority
------------------------------------
By default, mitmproxy will use ``~/.mitmproxy/mitmproxy-ca.pem`` as
the certificate authority to generate certificates for all domains for which no
custom certificate is provided (see above). You can use your own certificate
authority by passing the ``--cadir DIRECTORY`` option to mitmproxy. Mitmproxy
will then look for ``mitmproxy-ca.pem`` in the specified directory. If
no such file exists, it will be generated automatically.
Using a client side certificate
-------------------------------
You can use a client certificate by passing the ``--client-certs DIRECTORY`` option to mitmproxy.
If you visit example.org, mitmproxy looks for a file named ``example.org.pem`` in the specified
directory and uses this as the client cert. The certificate file needs to be in the PEM format and
should contain both the unencrypted private key and the certificate.

219
docs/conf.py Normal file
View File

@@ -0,0 +1,219 @@
# -*- coding: utf-8 -*-
#
# mitmproxy documentation build configuration file, created by
# sphinx-quickstart on Thu Sep 03 14:04:13 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
import shlex
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
import libmproxy.version
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinxcontrib.documentedlist'
]
# https://github.com/sphinx-doc/sphinx/pull/2053
napoleon_include_special_with_doc = False
autodoc_member_order = "bysource"
# Add any paths that contain templates here, relative to this directory.
#templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'mitmproxy docs'
copyright = u'2015, the mitmproxy project'
author = u'The mitmproxy project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = libmproxy.version.VERSION
# The full version, including alpha/beta/rc tags.
release = libmproxy.version.VERSION
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['libmproxy.']
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
# 'logo_only': True,
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
html_title = "mitmproxy %s documentation" % version
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = "mitmproxy-long.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = "favicon.ico"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
#html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'mitmproxydoc'

86
docs/config.rst Normal file
View File

@@ -0,0 +1,86 @@
.. _config:
Configuration
=============
Mitmproxy is configured through a set of files in the users ~/.mitmproxy
directory.
mitmproxy.conf
Settings for the :program:`mitmproxy`. This file can contain any options supported by
mitmproxy.
mitmdump.conf
Settings for the :program:`mitmdump`. This file can contain any options supported by mitmdump.
common.conf
Settings shared between all command-line tools. Settings in this file are over-ridden by those
in the tool-specific files. Only options shared by mitmproxy and mitmdump should be used in
this file.
Syntax
------
Comments
^^^^^^^^
.. code-block:: none
# this is a comment
; this is also a comment (.ini style)
--- and this is a comment too (yaml style)
Key/Value pairs
^^^^^^^^^^^^^^^
- Keys and values are case-sensitive
- Whitespace is ignored
- Lists are comma-delimited, and enclosed in square brackets
.. code-block:: none
name = value # (.ini style)
name: value # (yaml style)
--name value # (command-line option style)
fruit = [apple, orange, lemon]
indexes = [1, 12, 35 , 40]
Flags
^^^^^
These are boolean options that take no value but true/false.
.. code-block:: none
name = true # (.ini style)
name
--name # (command-line option style)
Options
-------
The options available in the config files are precisely those available as
command-line flags, with the key being the option's long name. To get a
complete list of these, use the :option:`--help` option on each of the tools. Be
careful to only specify common options in the **common.conf** file -
unsupported options in this file will be detected as an error on startup.
Examples
--------
common.conf
^^^^^^^^^^^
Note that :option:`--port` is an option supported by all tools.
.. code-block:: none
port = 8080
mitmproxy.conf
^^^^^^^^^^^^^^
.. code-block:: none
palette = light

24
docs/custom-routing.txt Normal file
View File

@@ -0,0 +1,24 @@
# Adapted from http://tldp.org/HOWTO/TransparentProxy-6.html (6.2 Second method)
# Note that the choice of firewall mark (3) and routing table (2) was fairly arbitrary.
# If you are already using policy routing or firewall marking for some other purpose,
# make sure you choose unique numbers here. Otherwise, don't worry about it.
# On the router, run
PROXY_IP=192.168.1.100
TARGET_IP=192.168.1.110
iptables -t mangle -A PREROUTING -j ACCEPT -p tcp -m multiport --dports 80,443 -s ! $TARGET_IP
# Alternative to MITM the whole network:
# iptables -t mangle -A PREROUTING -j ACCEPT -p tcp -m multiport --dports 80,443 -s $PROXY_IP
iptables -t mangle -A PREROUTING -j MARK --set-mark 3 -p tcp -m multiport --dports 80,443
ip rule add fwmark 3 table 2
ip route add default via $PROXY_IP dev br0 table 2
# On the proxy machine, run
iptables -A PREROUTING -t nat -i eth0 -p tcp -m multiport --dports 80,443 -j REDIRECT --to-port 8080

52
docs/dev/addingviews.html Normal file
View File

@@ -0,0 +1,52 @@
As discussed in [the Flow View section of the mitmproxy
overview](@!urlTo("mitmproxy.html")!@), mitmproxy allows you to inspect and
manipulate flows. When inspecting a single flow, mitmproxy uses a number of
heuristics to show a friendly view of various content types; if mitmproxy
cannot show a friendly view, mitmproxy defaults to a __raw__ view.
Each content type invokes a different flow viewer to parse the data and display
the friendly view. Users can add custom content viewers by adding a view class
to contentview.py, discussed below.
## Adding a new View class to contentview.py
The content viewers used by mitmproxy to present a friendly view of various
content types are stored in contentview.py. Reviewing this file shows a number
of classes named ViewSomeDataType, each with the properties: __name__,
__prompt__, and __content\_types__ and a function named __\_\_call\_\___.
Adding a new content viewer to parse a data type is as simple as writing a new
View class. Your new content viewer View class should have the same properties
as the other View classes: __name__, __prompt__, and __content\_types__ and a
__\_\_call\_\___ function to parse the content of the request/response.
* The __name__ property should be a string describing the contents and new content viewer;
* The __prompt__ property should be a two item tuple:
- __1__: A string that will be used to display the new content viewer's type; and
- __2__: A one character string that will be the hotkey used to select the new content viewer from the Flow View screen;
* The __content\_types__ property should be a list of strings of HTTP Content\-Types that the new content viewer can parse.
* Note that mitmproxy will use the content\_types to try and heuristically show a friendly view of content and that you can override the built-in views by populating content\_types with values for content\_types that are already parsed -- e.g. "image/png".
After defining the __name__, __prompt__, and __content\_types__ properties of
the class, you should write the __\_\_call\_\___ function, which will parse the
request/response data and provide a friendly view of the data. The
__\_\_call\_\___ function should take the following arguments: __self__,
__hdrs__, __content__, __limit__; __hdrs__ is a ODictCaseless object containing
the headers of the request/response; __content__ is the content of the
request/response, and __limit__ is an integer representing the amount of data
to display in the view window.
The __\_\_call\_\___ function returns two values: (1) a string describing the
parsed data; and (2) the parsed data for friendly display. The parsed data to
be displayed should be a list of strings formatted for display. You can use
the __\_view\_text__ function in contentview.py to format text for display.
Alternatively, you can display content as a series of key-value pairs; to do
so, prepare a list of lists, where each list item is a two item list -- a key
that describes the data, and then the data itself; after preparing the list of
lists, use the __common.format\_keyvals__ function on it to prepare it as text
for display.
If the new content viewer fails or throws an exception, mitmproxy will default
to a __raw__ view.

14
docs/dev/architecture.rst Normal file
View File

@@ -0,0 +1,14 @@
.. _architecture:
Architecture
============
To give you a better understanding of how mitmproxy works, mitmproxy's
high-level architecture is detailed in the following graphic:
.. image:: ../schematics/architecture.png
:download:`architecture.pdf <../schematics/architecture.pdf>`
Please don't refrain from asking any further
questions on the mailing list, the Slack channel or the GitHub issue tracker.

9
docs/dev/exceptions.rst Normal file
View File

@@ -0,0 +1,9 @@
.. _exceptions:
Exceptions
==========
.. automodule:: libmproxy.exceptions
:show-inheritance:
:members:
:undoc-members:

59
docs/dev/models.rst Normal file
View File

@@ -0,0 +1,59 @@
.. _models:
Models
======
.. automodule:: netlib.http
.. autoclass:: Request
.. rubric:: Data
.. autoattribute:: first_line_format
.. autoattribute:: method
.. autoattribute:: scheme
.. autoattribute:: host
.. autoattribute:: port
.. autoattribute:: path
.. autoattribute:: http_version
.. autoattribute:: headers
.. autoattribute:: content
.. autoattribute:: timestamp_start
.. autoattribute:: timestamp_end
.. rubric:: Computed Properties and Convenience Methods
.. autoattribute:: text
.. autoattribute:: url
.. autoattribute:: pretty_host
.. autoattribute:: pretty_url
.. autoattribute:: query
.. autoattribute:: cookies
.. autoattribute:: path_components
.. automethod:: anticache
.. automethod:: anticomp
.. automethod:: constrain_encoding
.. autoattribute:: urlencoded_form
.. autoattribute:: multipart_form
.. autoclass:: Response
.. rubric:: Data
.. autoattribute:: http_version
.. autoattribute:: status_code
.. autoattribute:: reason
.. autoattribute:: headers
.. autoattribute:: content
.. autoattribute:: timestamp_start
.. autoattribute:: timestamp_end
.. rubric:: Computed Properties and Convenience Methods
.. autoattribute:: text
.. autoattribute:: cookies
.. autoclass:: Headers
:members:
:special-members:
:no-undoc-members:
.. autoclass:: decoded
.. automodule:: libmproxy.models
:show-inheritance:
:members: HTTPFlow, Error, ClientConnection, ServerConnection

15
docs/dev/protocols.rst Normal file
View File

@@ -0,0 +1,15 @@
.. _protocols:
Protocols
=========
.. automodule:: libmproxy.protocol
.. autoclass:: Layer
:members:
:special-members:
.. autoclass:: ServerConnectionMixin
:members:
.. autoexception:: Kill

12
docs/dev/proxy.rst Normal file
View File

@@ -0,0 +1,12 @@
.. _proxy:
Proxy Server
============
.. automodule:: libmproxy.proxy
.. autoclass:: ProxyServer
.. autoclass:: DummyServer
.. autoclass:: ProxyConfig
.. autoclass:: RootContext
:members:

View File

@@ -0,0 +1,14 @@
.. _sslkeylogfile:
TLS Master Secrets
==================
The SSL master keys can be logged by mitmproxy so that external programs can decrypt TLS
connections both from and to the proxy. Key logging is enabled by setting the environment variable
:envvar:`SSLKEYLOGFILE` so that it points to a writable text file.
Recent versions of WireShark can use these log files to decrypt packets.
You can specify the key file path in WireShark via
:samp:`Edit -> Preferences -> Protocols -> SSL -> (Pre)-Master-Secret log filename`.
Note that :envvar:`SSLKEYLOGFILE` is respected by other programs as well, e.g. Firefox and Chrome.
If this creates any issues, you can set :envvar:`MITMPROXY_SSLKEYLOGFILE` alternatively.

47
docs/dev/testing.rst Normal file
View File

@@ -0,0 +1,47 @@
.. _testing:
Testing
=======
All the mitmproxy projects strive to maintain 100% code coverage. In general,
patches and pull requests will be declined unless they're accompanied by a
suitable extension to the test suite.
Our tests are written for the `py.test`_ or nose_ test frameworks.
At the point where you send your pull request, a command like this:
>>> py.test -n 4 --cov libmproxy
Should give output something like this:
.. code-block:: none
> ---------- coverage: platform darwin, python 2.7.2-final-0 --
> Name Stmts Miss Cover Missing
> ----------------------------------------------------
> libmproxy/__init__ 0 0 100%
> libmproxy/app 4 0 100%
> libmproxy/cmdline 100 0 100%
> libmproxy/controller 69 0 100%
> libmproxy/dump 150 0 100%
> libmproxy/encoding 39 0 100%
> libmproxy/filt 201 0 100%
> libmproxy/flow 891 0 100%
> libmproxy/proxy 427 0 100%
> libmproxy/script 27 0 100%
> libmproxy/utils 133 0 100%
> libmproxy/version 4 0 100%
> ----------------------------------------------------
> TOTAL 2045 0 100%
> ----------------------------------------------------
> Ran 251 tests in 11.864s
There are exceptions to the coverage requirement - for instance, much of the
console interface code can't sensibly be unit tested. These portions are
excluded from coverage analysis either in the **.coveragerc** file, or using
**#pragma no-cover** directives. To keep our coverage analysis relevant, we use
these measures as sparingly as possible.
.. _nose: https://nose.readthedocs.org/en/latest/
.. _py.test: https://pytest.org/

BIN
docs/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -0,0 +1,15 @@
.. _anticache:
Anticache
=========
When the :option:`--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. It's also often used during
:ref:`clientreplay`, when you want to make sure the server responds with complete data.
================== ======================
command-line :option:`--anticache`
mitmproxy shortcut :kbd:`o` then :kbd:`a`
================== ======================

View File

@@ -1,6 +1,7 @@
.. _clientreplay:
- command-line: _-c path_
- mitmproxy shortcut: _c_
Client-side replay
==================
Client-side replay does what it says on the tin: you provide a previously saved
HTTP conversation, and mitmproxy replays the client requests one by one. Note
@@ -9,6 +10,9 @@ 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.
:ref:`anticache` option, to make sure the server responds with complete data.
================== =================
command-line :option:`-c path`
mitmproxy shortcut :kbd:`c`
================== =================

View File

@@ -1,34 +1,39 @@
.. _filters:
Many commands in __mitmproxy__ and __mitmdump__ take a filter expression.
Filter expressions
==================
Many commands in :program:`mitmproxy` and :program:`mitmdump` take a filter expression.
Filter expressions consist of the following operators:
<table>
<!--(for i in filt_help)-->
<tr>
<td class="filt_cmd">@!i[0]!@</td>
<td class="filt_help">@!i[1]!@</td>
</tr>
<!--(end)-->
</table>
.. documentedlist::
:header: "Expression" "Description"
:listobject: libmproxy.filt.help
- Regexes are Python-style
- Regexes can be specified as quoted strings
- Header matching (~h, ~hq, ~hs) is against a string of the form "name: value".
- Strings with no operators are matched against the request URL.
- The default binary operator is &amp;.
- The default binary operator is &.
Examples
========
--------
URL containing "google.com":
.. code-block:: none
google\.com
Requests whose body contains the string "test":
.. code-block:: none
~q ~b test
Anything but requests with a text/html content type:
!(~q & ~t \"text/html\")
.. code-block:: none
!(~q & ~t "text/html")

View File

@@ -0,0 +1,97 @@
.. _passthrough:
Ignore Domains
==============
There are two main reasons why you may want to exempt some traffic from mitmproxy's interception
mechanism:
- **Certificate pinning:** Some traffic is is protected using `Certificate Pinning`_ and
mitmproxy's interception leads to errors. For example, the Twitter app, Windows Update or
the Apple App Store fail to work if mitmproxy is active.
- **Convenience:** You really don't care about some parts of the traffic and just want them to go
away.
If you want to peek into (SSL-protected) non-HTTP connections, check out the :ref:`tcpproxy`
feature.
If you want to ignore traffic from mitmproxy's processing because of large response bodies,
take a look at the :ref:`responsestreaming` feature.
How it works
------------
================== =============================
command-line :option:`--ignore regex`
mitmproxy shortcut :kbd:`o` then :kbd:`I`
================== =============================
mitmproxy allows you to specify a regex which is matched against a ``host:port`` string
(e.g. "example.com:443") to determine hosts that should be excluded.
There are two important quirks to consider:
- **In transparent mode, the ignore pattern is matched against the IP.** While we usually infer the
hostname from the Host header if the :option:`--host` argument is passed to mitmproxy, we do not
have access to this information before the SSL handshake.
- In regular mode, explicit HTTP requests are never ignored. [#explicithttp]_ The ignore pattern is
applied on CONNECT requests, which initiate HTTPS or clear-text WebSocket connections.
Tutorial
--------
If you just want to ignore one specific domain, there's usually a bulletproof method to do so:
1. Run mitmproxy or mitmdump in verbose mode (:option:`-v`) and observe the ``host:port``
information in the serverconnect messages. mitmproxy will filter on these.
2. Take the ``host:port`` string, surround it with ^ and $, escape all dots (. becomes \\.)
and use this as your ignore pattern:
.. code-block:: none
:emphasize-lines: 6,7,9
>>> mitmdump -v
127.0.0.1:50588: clientconnect
127.0.0.1:50588: request
-> CONNECT example.com:443 HTTP/1.1
127.0.0.1:50588: Set new server address: example.com:443
127.0.0.1:50588: serverconnect
-> example.com:443
^C
>>> mitmproxy --ignore ^example\.com:443$
Here are some other examples for ignore patterns:
.. code-block:: none
# Exempt traffic from the iOS App Store (the regex is lax, but usually just works):
--ignore apple.com:443
# "Correct" version without false-positives:
--ignore '^(.+\.)?apple\.com:443$'
# Ignore example.com, but not its subdomains:
--ignore '^example.com:'
# Ignore everything but example.com and mitmproxy.org:
--ignore '^(?!example\.com)(?!mitmproxy\.org)'
# Transparent mode:
--ignore 17\.178\.96\.59:443
# IP address range:
--ignore 17\.178\.\d+\.\d+:443
.. seealso::
- :ref:`tcpproxy`
- :ref:`responsestreaming`
.. rubric:: Footnotes
.. [#explicithttp] This stems from an limitation of explicit HTTP proxying:
A single connection can be re-used for multiple target domains - a
``GET http://example.com/`` request may be followed by a ``GET http://evil.com/`` request on the
same connection. If we start to ignore the connection after the first request,
we would miss the relevant second one.
.. _Certificate Pinning: https://security.stackexchange.com/questions/29988/what-is-certificate-pinning

View File

@@ -0,0 +1,17 @@
.. _proxyauth:
Proxy Authentication
====================
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. The
proxy auth options are not compatible with the transparent, socks or reverse proxy
mode.
================== =============================
command-line :option:`--nonanonymous`,
:option:`--singleuser USER`,
:option:`--htpasswd PATH`
================== =============================

View File

@@ -1,5 +1,7 @@
- command-line: _--replace_, _--replace-from-file_
- mitmproxy shortcut: _R_
.. _replacements:
Replacements
============
Mitmproxy lets you specify an arbitrary number of patterns that define text
replacements within flows. Each pattern has 3 components: a filter that defines
@@ -12,50 +14,59 @@ replace hook is triggered on server response, the replacement is only run on
the Response object leaving the Request intact. You control whether the hook
triggers on the request, response or both using the filter pattern. If you need
finer-grained control than this, it's simple to create a script using the
replacement API on Flow components.
replacement API on Flow components.
Replacement hooks are extremely handy in interactive testing of applications.
For instance you can use a replace hook to replace the text "XSS" with a
complicated XSS exploit, and then "inject" the exploit simply by interacting
with the application through the browser. When used with tools like Firebug and
mitmproxy's own interception abilities, replacement hooks can be an amazingly
flexible and powerful feature.
flexible and powerful feature.
## On the command-line
On the command-line
-------------------
The replacement hook command-line options use a compact syntax to make it easy
to specify all three components at once. The general form is as follows:
.. code-block:: none
/patt/regex/replacement
Here, __patt__ is a mitmproxy filter expression, __regex__ is a valid Python
regular expression, and __replacement__ is a string literal. The first
character in the expression (__/__ in this case) defines what the separation
Here, **patt** is a mitmproxy filter expression, **regex** is a valid Python
regular expression, and **replacement** is a string literal. The first
character in the expression (``/`` in this case) defines what the separation
character is. Here's an example of a valid expression that replaces "foo" with
"bar" in all requests:
.. code-block:: none
:~q:foo:bar
In practice, it's pretty common for the replacement literal to be long and
complex. For instance, it might be an XSS exploit that weighs in at hundreds or
thousands of characters. To cope with this, there's a variation of the
replacement hook specifier that lets you load the replacement text from a file.
So, you might start __mitmdump__ as follows:
So, you might start **mitmdump** as follows:
<pre class="terminal">
mitmdump --replace-from-file :~q:foo:~/xss-exploit
</pre>
>>> mitmdump --replace-from-file :~q:foo:~/xss-exploit
This will load the replacement text from the file __~/xss-exploit__.
This will load the replacement text from the file ``~/xss-exploit``.
Both the _--replace_ and _--replace-from-file_ flags can be passed multiple
Both the :option:`--replace` and :option:`--replace-from-file` flags can be passed multiple
times.
## Interactively
Interactively
-------------
The _R_ shortcut key in mitmproxy lets you add and edit replacement hooks using
a built-in editor. The context-sensitive help (_h_) has complete usage
information.
The :kbd:`R` shortcut key in the mitmproxy options menu (:kbd:`o`) lets you add and edit
replacement hooks using a built-in editor. The context-sensitive help (:kbd:`?`) has
complete usage information.
================== =============================
command-line :option:`--replace`,
:option:`--replace-from-file`
mitmproxy shortcut :kbd:`o` then :kbd:`R`
================== =============================

View File

@@ -0,0 +1,69 @@
.. _responsestreaming:
Response Streaming
==================
By using mitmproxy's streaming feature, response contents can be passed to the client incrementally
before they have been fully received by the proxy. This is especially useful for large binary files
such as videos, where buffering the whole file slows down the client's browser.
By default, mitmproxy will read the entire response, perform any indicated
manipulations on it and then send the (possibly modified) response to
the client. In some cases this is undesirable and you may wish to "stream"
the reponse back to the client. When streaming is enabled, the response is
not buffered on the proxy but directly sent back to the client instead.
On the command-line
-------------------
Streaming can be enabled on the command line for all response bodies exceeding a certain size.
The SIZE argument understands k/m/g suffixes, e.g. 3m for 3 megabytes.
================== =============================
command-line :option:`--stream SIZE`
================== =============================
.. warning::
When response streaming is enabled, **streamed response contents will not be
recorded or preserved in any way.**
.. note::
When response streaming is enabled, the response body cannot be modified by the usual means.
Customizing Response Streaming
------------------------------
You can also use an :ref:`inlinescripts` to customize exactly
which responses are streamed.
Responses that should be tagged for streaming by setting their ``.stream`` attribute to ``True``:
.. literalinclude:: ../../examples/stream.py
:caption: examples/stream.py
:language: python
Implementation Details
----------------------
When response streaming is enabled, portions of the code which would have otherwise performed
changes on the response body will see an empty response body instead
(:py:data:`netlib.http.CONTENT_MISSING`). Any modifications will be ignored.
Streamed responses are usually sent in chunks of 4096 bytes. If the response is sent with a
``Transfer-Encoding: chunked`` header, the response will be streamed one chunk at a time.
Modifying streamed data
-----------------------
If the ``.stream`` attribute is callable, ``.stream`` will wrap the generator that yields all
chunks.
.. literalinclude:: ../../examples/stream_modify.py
:caption: examples/stream_modify.py
:language: python
.. seealso::
- :ref:`passthrough`

View File

@@ -0,0 +1,57 @@
.. _reverseproxy:
Reverse Proxy
=============
In reverse proxy mode, mitmproxy accepts standard HTTP(S) requests and forwards
them to the specified upstream server. This is in contrast to :ref:`upstreamproxy`, in which
mitmproxy forwards HTTP(S) proxy requests to an upstream proxy server.
================== =====================================
command-line :option:`-R http[s]://hostname[:port]`
================== =====================================
Here, **http[s]** signifies if the proxy should use TLS to connect to the server.
mitmproxy always accepts both encrypted and unencrypted requests and transforms
them to what the server expects.
.. code-block:: none
>>> mitmdump -R https://httpbin.org -p 80
>>> curl http://localhost/
# requests will be transparently upgraded to TLS by mitmproxy
>>> mitmdump -R https://httpbin.org -p 443
>>> curl https://localhost/
# mitmproxy will use TLS on both ends.
Host Header
-----------
In reverse proxy mode, mitmproxy does not rewrite the host header. While often useful, this
may lead to issues with public web servers. For example, consider the following scenario:
.. code-block:: none
:emphasize-lines: 5
>>> mitmdump -d -R http://example.com/
>>> curl http://localhost:8080/
>> GET https://example.com/
Host: localhost:8080
User-Agent: curl/7.35.0
[...]
<< 404 Not Found 345B
Since the Host header doesn't match "example.com", an error is returned.
There are two ways to solve this:
1. Modify the hosts file of your OS so that "example.com" resolves to your proxy's IP.
Then, access example.com directly. Make sure that your proxy can still resolve the original IP
or specify an IP in mitmproxy.
2. Use mitmproxy's :ref:`setheaders` feature to rewrite the host header:
``--setheader :~q:Host:example.com``.
However, keep in mind that absolute URLs within the returned document or HTTP redirects will
cause the client application to bypass the proxy.

View File

@@ -1,6 +1,7 @@
.. _serverreplay:
- command-line: _-S path_
- mitmproxy shortcut: _S_
Server-side replay
==================
Server-side replay lets us replay server responses from a saved HTTP
conversation.
@@ -8,12 +9,12 @@ conversation.
Matching requests with responses
--------------------------------
By default, __mitmproxy__ excludes request headers when matching incoming
By default, :program:`mitmproxy` excludes request headers when matching incoming
requests with responses from the replay file. This works in most circumstances,
and makes it possible to replay server responses in situations where request
headers would naturally vary, e.g. using a different user agent. The _--rheader
headername_ command-line option allows you to override this behaviour by
specifying individual headers that should be included in matching.
headers would naturally vary, e.g. using a different user agent.
The :option:`--rheader headername` command-line option allows you to override
this behaviour by specifying individual headers that should be included in matching.
Response refreshing
@@ -22,14 +23,17 @@ Response refreshing
Simply replaying server responses without modification will often result in
unexpected behaviour. For example cookie timeouts that were in the future at
the time a conversation was recorded might be in the past at the time it is
replayed. By default, __mitmproxy__ refreshes server responses before sending
them to the client. The __date__, __expires__ and __last-modified__ headers are
replayed. By default, :program:`mitmproxy` refreshes server responses before sending
them to the client. The **date**, **expires** and **last-modified** headers are
all updated to have the same relative time offset as they had at the time of
recording. So, if they were in the past at the time of recording, they will be
in the past at the time of replay, and vice versa. Cookie expiry times are
updated in a similar way.
You can turn off response refreshing using the _--norefresh_ argument, or using
the _o_ options shortcut within __mitmproxy__.
You can turn off response refreshing using the :option:`--norefresh` argument, or using
the :kbd:`o` options shortcut within :program:`mitmproxy`.
================== =================
command-line :option:`-S path`
mitmproxy shortcut :kbd:`S`
================== =================

View File

@@ -0,0 +1,19 @@
.. _setheaders:
Set Headers
===========
This feature lets you specify a set of headers to be added to requests or
responses, based on a filter pattern. You can specify these either on the
command-line, or through an interactive editor in mitmproxy.
Example: Set the **Host** header to "example.com" for all requests.
.. code-block:: none
mitmdump -R http://example.com --setheader :~q:Host:example.com
================== =============================
command-line :option:`--setheader PATTERN`
mitmproxy shortcut :kbd:`o` then :kbd:`H`
================== =============================

View File

@@ -0,0 +1,10 @@
.. _socksproxy:
SOCKS Mode
==========
In this mode, mitmproxy acts as a SOCKS5 proxy server.
================== =================
command-line :option:`--socks`
================== =================

View File

@@ -1,9 +1,10 @@
.. _sticky:
## Sticky cookies
Sticky cookies and auth
=======================
- command-line: _-t_ (sticky cookies on all requests)
- command-line: _-T filt_ (sticky cookies on requests matching filt)
- mitmproxy shortcut: _t_
Sticky cookies
--------------
When the sticky cookie option is set, __mitmproxy__ will add the cookie most
recently set by the server to any cookie-less request. Consider a service that
@@ -13,22 +14,28 @@ using a browser. After authentication, you can request authenticated resources
through mitmproxy as if they were unauthenticated, because mitmproxy will
automatically add the session tracking cookie to requests. Among other things,
this lets you script interactions with authenticated resources (using tools
like wget or curl) without having to worry about authentication.
like wget or curl) without having to worry about authentication.
Sticky cookies are especially powerful when used in conjunction with [client
replay](@!urlTo("clientreplay.html")!@) - you can record the authentication
process once, and simply replay it on startup every time you need to interact
with the secured resources.
Sticky cookies are especially powerful when used in conjunction with :ref:`clientreplay` - you can
record the authentication process once, and simply replay it on startup every time you need
to interact with the secured resources.
================== ======================
command-line :option:`-t FILTER`
mitmproxy shortcut :kbd:`o` then :kbd:`t`
================== ======================
## Sticky auth
- command-line: _-u_ (sticky auth on all requests)
- command-line: _-U filt_ (sticky auth on requests matching filt)
- mitmproxy shortcut: _u_
Sticky auth
-----------
The sticky auth option is analogous to the sticky cookie option, in that HTTP
__Authorization__ headers are simply replayed to the server once they have been
**Authorization** headers are simply replayed to the server once they have been
seen. This is enough to allow you to access a server resource using HTTP Basic
authentication through the proxy. Note that __mitmproxy__ doesn't (yet) support
replay of HTTP Digest authentication.
authentication through the proxy. Note that :program:`mitmproxy` doesn't (yet) support
replay of HTTP Digest authentication.
================== ======================
command-line :option:`-u FILTER`
mitmproxy shortcut :kbd:`o` then :kbd:`A`
================== ======================

View File

@@ -0,0 +1,31 @@
.. _tcpproxy:
TCP Proxy
=========
WebSockets or other non-HTTP protocols are not supported by mitmproxy yet. However, you can exempt
hostnames from processing, so that mitmproxy acts as a generic TCP forwarder.
This feature is closely related to the :ref:`passthrough` functionality,
but differs in two important aspects:
- The raw TCP messages are printed to the event log.
- SSL connections will be intercepted.
Please note that message interception or modification are not possible yet.
If you are not interested in the raw TCP messages, you should use the ignore domains feature.
How it works
------------
================== ======================
command-line :option:`--tcp HOST`
mitmproxy shortcut :kbd:`o` then :kbd:`T`
================== ======================
For a detailed description how the hostname pattern works, please look at the :ref:`passthrough`
feature.
.. seealso::
- :ref:`passthrough`
- :ref:`responsestreaming`

View File

@@ -0,0 +1,23 @@
.. _upstreamcerts:
Upstream Certificates
=====================
When mitmproxy receives a connection destined for an SSL-protected service, it
freezes the connection before reading its request data, and makes a connection
to the upstream server to "sniff" the contents of its SSL certificate. The
information gained - the **Common Name** and **Subject Alternative Names** - is
then used to generate the interception certificate, which is sent to the client
so the connection can continue.
This rather intricate little dance lets us seamlessly generate correct
certificates even if the client has specifed only an IP address rather than the
hostname. It also means that we don't need to sniff additional data to generate
certs in transparent mode.
Upstream cert sniffing is on by default, and can optionally be turned off.
================== =============================
command-line :option:`--no-upstream-cert`
mitmproxy shortcut :kbd:`o` then :kbd:`U`
================== =============================

View File

@@ -0,0 +1,12 @@
.. _upstreamproxy:
Upstream proxy mode
===================
In this mode, mitmproxy accepts proxy requests and unconditionally forwards all
requests to a specified upstream proxy server. This is in contrast to :ref:`reverseproxy`,
in which mitmproxy forwards ordinary HTTP requests to an upstream server.
================== ===================================
command-line :option:`-U http://hostname[:port]`
================== ===================================

239
docs/howmitmproxy.rst Normal file
View File

@@ -0,0 +1,239 @@
How mitmproxy works
===================
Mitmproxy is an enormously flexible tool. Knowing exactly how the proxying
process works will help you deploy it creatively, and take into account its
fundamental assumptions and how to work around them. This document explains
mitmproxy's proxy mechanism in detail, starting with the simplest unencrypted
explicit proxying, and working up to the most complicated interaction -
transparent proxying of SSL-protected traffic [#ssl]_ in the presence of `Server Name Indication`_.
Explicit HTTP
-------------
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`_, 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:
.. code-block:: http
GET http://example.com/index.html HTTP/1.1
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.
.. image:: schematics/how-mitmproxy-works-explicit.png
:align: center
1. The client connects to the proxy and makes a request.
2. Mitmproxy connects to the upstream server and simply forwards the request on.
Explicit HTTPS
--------------
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:
.. code-block:: http
CONNECT example.com:443 HTTP/1.1
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 into 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 theoretically 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, while we sit in the middle decoding traffic from both sides. 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 they are
legit. If this signature doesn't match or 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 :ref:`register mitmproxy as a trusted
CA with the device manually <certinstall>`.
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:
.. code-block:: http
CONNECT 10.1.1.1:443 HTTP/1.1
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 - :ref:`upstream
certificate sniffing <upstreamcerts>`. 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 Alternative 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 Alternative Name`_ field in the SSL certificate
that allows an arbitrary number of alternative domains to be specified. If the
expected domain matches any of these, the client will proceed, even though the
domain doesn't match the certificate Common Name. The answer here is simple:
when we 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 vanilla 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.
.. image:: schematics/how-mitmproxy-works-explicit-https.png
:align: center
1. The client makes a connection to mitmproxy, and issues an HTTP CONNECT request.
2. Mitmproxy responds with a ``200 Connection Established``, as if it has set up the CONNECT pipe.
3. 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.
4. Mitmproxy connects to the server, and establishes an SSL connection using the SNI hostname
indicated by the client.
5. The server responds with the matching SSL certificate, which contains the CN and SAN values
needed to generate the interception certificate.
6. Mitmproxy generates the interception cert, and continues the
client SSL handshake paused in step 3.
7. The client sends the request over the established SSL connection.
8. Mitmproxy passes the request on to the server over the SSL connection initiated in step 4.
Transparent HTTP
----------------
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 is a
redirection mechanism that transparently reroutes a TCP connection destined for
a server on the Internet to a listening proxy server. This usually takes the
form of a firewall on the same host as the proxy server - `iptables`_ on Linux or
pf_ on OSX. Once the client has initiated the connection, it makes a vanilla HTTP request,
which might look something like this:
.. code-block:: http
GET /index.html HTTP/1.1
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 for us. Each routing
mechanism has a different 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. In
mitmproxy, this takes the form of a built-in set of
modules_ that know how to talk to each platform's redirection mechanism.
Once we have this information, the process is fairly straight-forward.
.. image:: schematics/how-mitmproxy-works-transparent.png
:align: center
1. The client makes a connection to the server.
2. 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.
3. Now, we simply read the client's request...
4. ... and forward it upstream.
Transparent HTTPS
-----------------
The first step is to determine whether we should treat an incoming connection
as HTTPS. The mechanism for doing this is simple - we use the routing mechanism
to find out what the original destination port is. By default, we treat all
traffic destined for ports 443 and 8443 as SSL.
From here, the process is a merger of the methods we've described for
transparently proxying HTTP, and explicitly proxying HTTPS. We use the routing
mechanism to establish the upstream server address, and then proceed as for
explicit HTTPS connections to establish the CN and SANs, and cope with SNI.
.. image:: schematics/how-mitmproxy-works-transparent-https.png
:align: center
1. The client makes a connection to the server.
2. 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.
3. 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.
4. Mitmproxy connects to the server, and establishes an SSL connection using the SNI hostname
indicated by the client.
5. The server responds with the matching SSL certificate, which contains the CN and SAN values
needed to generate the interception certificate.
6. Mitmproxy generates the interception cert, and continues the client SSL handshake paused in
step 3.
7. The client sends the request over the established SSL connection.
8. Mitmproxy passes the request on to the server over the SSL connection initiated in step 4.
.. rubric:: Footnotes
.. [#ssl] I use "SSL" to refer to both SSL and TLS in the generic sense, unless otherwise
specified.
.. _Server Name Indication: https://en.wikipedia.org/wiki/Server_Name_Indication
.. _HTTP RFC: https://tools.ietf.org/html/rfc7230
.. _Certificate Authority: https://en.wikipedia.org/wiki/Certificate_authority
.. _Subject Alternative Name: https://en.wikipedia.org/wiki/SubjectAltName
.. _iptables: http://www.netfilter.org/
.. _pf: https://en.wikipedia.org/wiki/PF_\(firewall\)
.. _modules: https://github.com/mitmproxy/mitmproxy/tree/master/libmproxy/platform

83
docs/index.rst Normal file
View File

@@ -0,0 +1,83 @@
.. include:: introduction.rst
.. toctree::
:hidden:
:maxdepth: 1
introduction
install
certinstall
howmitmproxy
modes
.. toctree::
:hidden:
:caption: Tools
mitmproxy
mitmdump
config
.. toctree::
:hidden:
:caption: Features
features/anticache
features/filters
features/replacements
features/clientreplay
features/serverreplay
features/setheaders
features/passthrough
features/proxyauth
features/reverseproxy
features/responsestreaming
features/socksproxy
features/sticky
features/tcpproxy
features/upstreamproxy
features/upstreamcerts
.. toctree::
:hidden:
:caption: Transparent Proxying
transparent
transparent/linux
transparent/osx
.. toctree::
:hidden:
:caption: Scripting
scripting/inlinescripts
scripting/libmproxy
.. toctree::
:hidden:
:caption: Tutorials
tutorials/30second
tutorials/gamecenter
tutorials/transparent-dhcp
.. toctree::
:hidden:
:caption: Hacking
dev/architecture
dev/testing
dev/sslkeylogfile
dev/protocols
dev/proxy
dev/exceptions
dev/models
.. Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`

100
docs/install.rst Normal file
View File

@@ -0,0 +1,100 @@
.. _install:
Installation
============
.. _install-ubuntu:
Installation On Ubuntu
----------------------
Ubuntu comes with Python but we need to install pip, python-dev and several libraries.
This was tested on a fully patched installation of Ubuntu 14.04.
>>> sudo apt-get install python-pip python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev
>>> sudo pip install mitmproxy
Once installation is complete you can run :ref:`mitmproxy` or :ref:`mitmdump` from a terminal.
Installation From Source (Ubuntu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you would like to install mitmproxy directly from the master branch on GitHub or would like to
get set up to contribute to the project, install the dependencies as you would for a regular
mitmproxy installation (see :ref:`install-ubuntu`).
Then see the Hacking_ section of the README on GitHub.
Installation On Mac OS X
------------------------
The easiest way to get up and running on OSX is to download the pre-built binary packages from
`mitmproxy.org`_.
There are a few bits of customization you might want to do to make mitmproxy 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 **open** program to create a simple and effective ``~/.mailcap`` file to view
request and response bodies:
.. code-block:: none
application/*; /usr/bin/open -Wn %s
audio/*; /usr/bin/open -Wn %s
image/*; /usr/bin/open -Wn %s
video/*; /usr/bin/open -Wn %s
Once installation is complete you can run :ref:`mitmproxy` or :ref:`mitmdump` from a terminal.
Installation From Source (Mac OS X)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you would like to install mitmproxy directly from the master branch on GitHub or would like to
get set up to contribute to the project, there are a few OS X specific things to keep in mind.
- Make sure that XCode is installed from the App Store, and that the command-line tools have been
downloaded (XCode/Preferences/Downloads).
- If you're running a Python interpreter installed with homebrew (or similar), you may have to
install some dependencies by hand.
Then see the Hacking_ section of the README on GitHub.
Installation On Windows
-----------------------
.. note::
Please note that mitmdump is the only component of mitmproxy that is supported on Windows at
the moment.
**There is no interactive user interface on Windows.**
First, install the latest version of Python 2.7 from the `Python website`_.
If you already have an older version of Python 2.7 installed, make sure to install pip_
(pip is included in Python 2.7.9+ by default).
Next, add Python and the Python Scripts directory to your **PATH** variable.
You can do this easily by running the following in powershell:
>>> [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27;C:\Python27\Scripts", "User")
Now, you can install mitmproxy by running
>>> pip install mitmproxy
Once the installation is complete, you can run :ref:`mitmdump` from a command prompt.
Installation From Source (Windows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you would like to install mitmproxy directly from the master branch on GitHub or would like to
get set up to contribute to the project, install Python as outlined above, then see the
Hacking_ section of the README on GitHub.
.. _Hacking: https://github.com/mitmproxy/mitmproxy/blob/master/README.rst#hacking
.. _mitmproxy.org: https://mitmproxy.org/
.. _`Python website`: https://www.python.org/downloads/windows/
.. _pip: https://pip.pypa.io/en/latest/installing.html

26
docs/introduction.rst Normal file
View File

@@ -0,0 +1,26 @@
Introduction
============
**mitmproxy** is an interactive, SSL-capable man-in-the-middle proxy for HTTP
with a console interface.
**mitmdump** is the command-line version of mitmproxy. Think tcpdump for HTTP.
**libmproxy** is the library that mitmproxy and mitmdump are built on.
Documentation, tutorials and distribution packages can be found on the
mitmproxy website: `mitmproxy.org <https://mitmproxy.org/>`_
.. rubric:: Features
- Intercept HTTP requests and responses and modify them on the fly.
- Save complete HTTP conversations for later replay and analysis.
- Replay the client-side of an HTTP conversations.
- Replay HTTP responses of a previously recorded server.
- Reverse proxy mode to forward traffic to a specified server.
- Transparent proxy mode on OSX and Linux.
- Make scripted changes to HTTP traffic using Python.
- SSL certificates for interception are generated on the fly.
- And much, much more.

66
docs/mitmdump.rst Normal file
View File

@@ -0,0 +1,66 @@
.. _mitmdump:
.. program:: mitmdump
mitmdump
========
**mitmdump** is the command-line companion to mitmproxy. It provides
tcpdump-like functionality to let you view, record, and programmatically
transform HTTP traffic. See the :option:`--help` flag output for complete
documentation.
Examples
--------
Saving traffic
^^^^^^^^^^^^^^
>>> mitmdump -w outfile
Start up mitmdump in proxy mode, and write all traffic to **outfile**.
Filtering saved traffic
^^^^^^^^^^^^^^^^^^^^^^^
>>> mitmdump -nr infile -w outfile "~m post"
Start mitmdump without binding to the proxy port (:option:`-n`), read all flows from
infile, apply the specified filter expression (only match POSTs), and write to
outfile.
Client replay
^^^^^^^^^^^^^
>>> mitmdump -nc outfile
Start mitmdump without binding to the proxy port (:option:`-n`), then replay all
requests from outfile (:option:`-c filename`). Flags combine in the obvious way, so
you can replay requests from one file, and write the resulting flows to
another:
>>> mitmdump -nc srcfile -w dstfile
See the :ref:`clientreplay` section for more information.
Running a script
^^^^^^^^^^^^^^^^
>>> mitmdump -s examples/add_header.py
This runs the **add_header.py** example script, which simply adds a new header
to all responses.
Scripted data transformation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> mitmdump -ns examples/add_header.py -r srcfile -w dstfile
This command loads flows from **srcfile**, transforms it according to the
specified script, then writes it back to **dstfile**.

BIN
docs/mitmproxy-long.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

126
docs/mitmproxy.rst Normal file
View File

@@ -0,0 +1,126 @@
.. _mitmproxy:
.. program:: mitmproxy
mitmproxy
=========
**mitmproxy** is a console tool that allows interactive examination and
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 :kbd:`?` shortcut key to view, context-sensitive
documentation from any **mitmproxy** screen.
Flow list
---------
The flow list shows an index of captured flows in chronological order.
.. image:: screenshots/mitmproxy.png
- **1**: A GET request, returning a 302 Redirect response.
- **2**: A GET request, returning 16.75kb of text/html data.
- **3**: A replayed request.
- **4**: Intercepted flows are indicated with orange text. The user may edit
these flows, and then accept them (using the :kbd:`a` key) to continue. In this
case, the request has been intercepted on the way to the server.
- **5**: A response intercepted from the server on the way to the client.
- **6**: The event log can be toggled on and off using the :kbd:`e` shortcut key. This
pane shows events and errors that may not result in a flow that shows up in the
flow pane.
- **7**: Flow count.
- **8**: Various information on mitmproxy's state. In this case, we have an
interception pattern set to ``.*``.
- **9**: Bind address indicator - mitmproxy is listening on port 8080 of all
interfaces.
Flow view
---------
The **Flow View** lets you inspect and manipulate a single flow:
.. image:: screenshots/mitmproxy-flowview.png
- **1**: Flow summary.
- **2**: The Request/Response tabs, showing you which part of the flow you are
currently viewing. In the example above, we're viewing the Response. Hit :kbd:`tab`
to switch between the Response and the Request.
- **3**: Headers.
- **4**: Body.
- **5**: View Mode indicator. In this case, we're viewing the body in **hex** mode. The other
available modes are **pretty**, which uses a number of heuristics to show you a friendly
view of various content types, and **raw**, which shows you exactly what's there without any
changes. You can change modes using the :kbd:`m` key.
Grid Editor
-----------
Much of the data that we'd like to interact with in mitmproxy is structured.
For instance, headers, queries and form data can all be thought of as a list of
key/value pairs. Mitmproxy has a built-in editor that lays this type of data
out in a grid for easy manipulation.
At the moment, the Grid Editor is used in four parts of mitmproxy:
- Editing request or response headers (:kbd:`e` for edit, then :kbd:`h` for headers in flow view)
- Editing a query string (:kbd:`e` for edit, then :kbd:`q` for query in flow view)
- Editing a URL-encoded form (:kbd:`e` for edit, then :kbd:`f` for form in flow view)
- Editing replacement patterns (:kbd:`o` for options, then :kbd:`R` for Replacement Patterns)
If there is is no data, an empty editor will be started to let you add some.
Here is the editor showing the headers from a request:
.. image:: screenshots/mitmproxy-kveditor.png
To edit, navigate to the key or value you want to modify using the arrow or vi
navigation keys, and press enter. The background color will change to show that
you are in edit mode for the specified field:
.. image:: screenshots/mitmproxy-kveditor-editmode.png
Modify the field as desired, then press escape to exit edit mode when you're
done. You can also add a row (:kbd:`a` key), delete a row (:kbd:`d` key), spawn an
external editor on a field (:kbd:`e` key). Be sure to consult the context-sensitive
help (:kbd:`?` key) for more.
Example: Interception
---------------------
**mitmproxy**'s interception functionality lets you pause an HTTP request or
response, inspect and modify it, and then accept it to send it on to the server
or client.
1: Set an interception pattern
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: screenshots/mitmproxy-intercept-filt.png
We press :kbd:`i` to set an interception pattern. In this case, the ``~q`` filter
pattern tells **mitmproxy** to intercept all requests. For complete filter
syntax, see the :ref:`filters` section of the documentation,
or the built-in help function in **mitmproxy**.
2: Intercepted connections are indicated with orange text:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: screenshots/mitmproxy-intercept-mid.png
3: You can now view and modify the request:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: screenshots/mitmproxy-intercept-options.png
In this case, we viewed the request by selecting it, pressed :kbd:`e` for "edit"
and :kbd:`m` for "method" to change the HTTP request method.
4: Accept the intercept to continue:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: screenshots/mitmproxy-intercept-result.png
Finally, we press :kbd:`a` to accept the modified request, which is then sent on to
the server. In this case, we changed the request from an HTTP GET to
OPTIONS, and Google's server has responded with a 405 "Method not allowed".

193
docs/modes.rst Normal file
View File

@@ -0,0 +1,193 @@
.. _modes:
Modes of Operation
==================
Mitmproxy has four modes of operation that allow you to use mitmproxy in a
variety of scenarios:
- **Regular** (the default)
- **Transparent**
- **Reverse Proxy**
- **Upstream Proxy**
Now, which one should you pick? Use this flow chart:
.. image:: schematics/proxy-modes-flowchart.png
:align: center
Regular Proxy
-------------
Mitmproxy's regular mode is the simplest and the easiest to set up.
1. Start mitmproxy.
2. Configure your client to use mitmproxy by explicitly setting an HTTP proxy.
3. Quick Check: You should already be able to visit an unencrypted HTTP site through the proxy.
4. Open the magic domain **mitm.it** and install the certificate for your device.
.. note::
Unfortunately, some applications bypass the system HTTP proxy settings - Android applications
are a common example. In these cases, you need to use mitmproxy's transparent mode.
If you are proxying an external device, your network will probably look like this:
.. image:: schematics/proxy-modes-regular.png
:align: center
The square brackets signify the source and destination IP addresses. Your
client explicitly connects to mitmproxy and mitmproxy explicitly connects
to the target server.
Transparent Proxy
-----------------
In transparent mode, traffic is directed into a proxy at the network layer,
without any client configuration required. This makes transparent proxying
ideal for situations where you can't change client behaviour. In the graphic
below, a machine running mitmproxy has been inserted between the router and
the internet:
.. image:: schematics/proxy-modes-transparent-1.png
:align: center
The square brackets signify the source and destination IP addresses. Round
brackets mark the next hop on the *Ethernet/data link* layer. This distinction
is important: when the packet arrives at the mitmproxy machine, it must still
be addressed to the target server. This means that Network Address Translation
should not be applied before the traffic reaches mitmproxy, since this would
remove the target information, leaving mitmproxy unable to determine the real
destination.
.. image:: schematics/proxy-modes-transparent-wrong.png
:align: center
Common Configurations
^^^^^^^^^^^^^^^^^^^^^
There are many ways to configure your network for transparent proxying. We'll
look at two common scenarios:
1. Configuring the client to use a custom gateway/router/"next hop"
2. Implementing custom routing on the router
In most cases, the first option is recommended due to its ease of use.
(a) Custom Gateway
~~~~~~~~~~~~~~~~~~
One simple way to get traffic to the mitmproxy machine with the destination IP
intact, is to simply configure the client with the mitmproxy box as the
default gateway.
.. image:: schematics/proxy-modes-transparent-2.png
:align: center
In this scenario, we would:
1. Configure the proxy machine for transparent mode. You can find instructions
in the :ref:`transparent` section.
2. Configure the client to use the proxy machine's IP as the default gateway.
3. Quick Check: At this point, you should already be able to visit an
unencrypted HTTP site over the proxy.
4. Open the magic domain **mitm.it** and install the certificate
for your device.
Setting the custom gateway on clients can be automated by serving the settings
out to clients over DHCP. This lets set up an interception network where all
clients are proxied automatically, which can save time and effort.
.. admonition:: Troubleshooting Transparent Mode
:class: note
Incorrect transparent mode configurations are a frequent source of
error. If it doesn't work for you, try the following things:
- Open mitmproxy's event log (press :kbd:`e`) - do you see clientconnect messages?
If not, the packets are not arriving at the proxy. One common cause is the occurrence of ICMP
redirects, which means that your machine is telling the client that there's a faster way to
the internet by contacting your router directly (see the :ref:`transparent` section on how to
disable them). If in doubt, Wireshark_ may help you to see whether something arrives at your
machine or not.
- Make sure you have not explicitly configured an HTTP proxy on the client.
This is not needed in transparent mode.
- Re-check the instructions in the :ref:`transparent` section. Anything you missed?
If you encounter any other pitfalls that should be listed here, please let us know!
(b) Custom Routing
~~~~~~~~~~~~~~~~~~
In some cases, you may need more fine-grained control of which traffic reaches
the mitmproxy instance, and which doesn't. You may, for instance, choose only
to divert traffic to some hosts into the transparent proxy. There are a huge
number of ways to accomplish this, and much will depend on the router or
packet filter you're using. In most cases, the configuration will look like
this:
.. image:: schematics/proxy-modes-transparent-3.png
:align: center
Reverse Proxy
-------------
mitmproxy is usually used with a client that uses the proxy to access the
Internet. Using reverse proxy mode, you can use mitmproxy to act like a normal
HTTP server:
.. image:: schematics/proxy-modes-reverse.png
:align: center
There are various use-cases:
- Say you have an internal API running at http://example.local/. You could now
set up mitmproxy in reverse proxy mode at http://debug.example.local/ and
dynamically point clients to this new API endpoint, which provides them
with the same data and you with debug information. Similarly, you could move
your real server to a different IP/port and set up mitmproxy in the original
place to debug and or redirect all sessions.
- Say you're a web developer working on http://example.com/ (with a development
version running on http://localhost:8000/). You can modify your hosts file so that
example.com points to 127.0.0.1 and then run mitmproxy in reverse proxy mode
on port 80. You can test your app on the example.com domain and get all
requests recorded in mitmproxy.
- Say you have some toy project that should get SSL support. Simply set up
mitmproxy as a reverse proxy on port 443 and you're done (``mitmdump -p 443 -R
http://localhost:80/``). Mitmproxy auto-detects TLS traffic and intercepts it dynamically.
There are better tools for this specific task, but mitmproxy is very quick and simple way to
set up an SSL-speaking server.
- Want to add a non-SSL-capable compression proxy in front of your server? You
could even spawn a mitmproxy instance that terminates SSL (``-R http://...``),
point it to the compression proxy and let the compression proxy point to a
SSL-initiating mitmproxy (``-R https://...``), which then points to the real
server. As you see, it's a fairly flexible thing.
.. admonition:: Caveat: Interactive Use
:class: warning
Reverse Proxy mode is usually not sufficient to create a copy of an interactive website at
different URL. The HTML served to the client remains unchanged - as soon as the user clicks on
an non-relative URL (or downloads a non-relative image resource), traffic no longer passes
through mitmproxy.
Upstream Proxy
--------------
If you want to chain proxies by adding mitmproxy in front of a different proxy
appliance, you can use mitmproxy's upstream mode. In upstream mode, all
requests are unconditionally transferred to an upstream proxy of your choice.
.. image:: schematics/proxy-modes-upstream.png
:align: center
mitmproxy supports both explicit HTTP and explicit HTTPS in upstream proxy
mode. You could in theory chain multiple mitmproxy instances in a row, but
that doesn't make any sense in practice (i.e. outside of our tests).
.. _Wireshark: https://wireshark.org/

View 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>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View 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>

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More