Commit Graph

5480 Commits

Author SHA1 Message Date
Aldo Cortesi
7433dfceae Bump unit tests, fix two serious wee buglets discovered. 2013-01-26 21:29:45 +13:00
Aldo Cortesi
e5b125eec8 Introduce the mock module to improve unit tests.
There are a few socket corner-cases that are incredibly hard to reproduce in a
unit test suite, so we use mock to trigger the exceptions instead.
2013-01-26 21:19:35 +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
cc4867064b Streamline netlib.test API 2013-01-25 16:03:59 +13:00
Aldo Cortesi
2eb6651e51 Extract TCP test utilities into netlib.test 2013-01-25 15:54:41 +13:00
Aldo Cortesi
5288848d03 Adjust docs, old -C is now -I. 2013-01-21 09:36:20 +13:00
Aldo Cortesi
25cb9471f0 Add tests for client certificate support. 2013-01-20 22:39:28 +13:00
Aldo Cortesi
9bd269c26a Add support for client certificates
- pathod request logs now include a clientcert member with details on the
client cert, or None if there wasn't one.
- pathoc has a -C option to specify a client certificate
2013-01-20 22:37:43 +13:00
Aldo Cortesi
7248a22d5e Improve error signalling for client certificates. 2013-01-20 22:36:54 +13:00
Aldo Cortesi
00d20abdd4 Beef up client certificate handling substantially. 2013-01-20 22:13:38 +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
1499529e62 Fix client cert typo. 2013-01-18 17:07:35 +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
ad92d37147 Merge pull request #8 from rouli/master
Improving timestamp feature
2013-01-16 19:15:39 -08:00
Rouli
04048b4c73 renaming the timestamp in preparation of other timestamps that will be added later, adding tests 2013-01-16 22:30:19 +02:00
Aldo Cortesi
f673cfed63 Merge pull request #7 from rouli/master
Adding read timestamp
2013-01-14 10:02:17 -08: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
Israel Nir
10457e876a adding read timestamp to enable better resolution of when certain reads were performed (timestamp is updated when the first byte is available on the network) 2013-01-10 15:51:37 +02:00
Aldo Cortesi
d0ee4d60d0 Unit tests and minor code refactoring for ServerConnection. 2013-01-05 19:44:12 -08:00
Aldo Cortesi
e4acace8ea Sanity-check certstore common names. 2013-01-06 01:34:39 +13: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
91834ea78f Generate certificates with a commencement date an hour in the past.
This helps smooth over small discrepancies in client and server times, where
it's possible for a certificate to seem to be "in the future" to the client.
2013-01-06 01:16:58 +13:00
Aldo Cortesi
72032d7fe7 Basic certificate store implementation and cert utils API cleanup. 2013-01-06 01:16:25 +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
369b55b094 Docs - pathoc and pathod proxy behaviour 2013-01-05 20:46:31 +13:00
Aldo Cortesi
ed7ef84557 Implement and unit test not-after-connect option. 2013-01-05 20:36:06 +13:00
Aldo Cortesi
5493925ea0 CONNECT through proxy mode for pathoc
Also, use this to unit test the pathod CONNECT implementation.
2013-01-05 20:29:46 +13:00
Aldo Cortesi
a9a4064ff9 Unit test for ODict.__iter__ 2013-01-05 20:08:48 +13:00
Aldo Cortesi
d3b46feb60 Handle non-integer port error in parse_init_connect correctly 2013-01-05 20:06:55 +13:00
Aldo Cortesi
c744ef2dcb Proxy mode: drop to SSL if we see an HTTP CONNECT request 2013-01-05 17:15:42 +13:00
Aldo Cortesi
1e932e7045 Collect SSL options into an SSLOptions object
Also split SSL cert specifications from SSL service mode - we can now enter SSL
service mode through a proxy CONNECT request as well.
2013-01-05 16:48:49 +13:00
Aldo Cortesi
3886ccae93 Provisional proxy mode support for pathod. 2013-01-05 15:25:09 +13:00
Aldo Cortesi
ddc08efde1 Minor cleanup of http.parse_init* methods. 2013-01-04 14:23:52 +13:00
Aldo Cortesi
46ab6ed491 Minor cleanups of proxy request handling. 2013-01-04 14:19:32 +13:00
Aldo Cortesi
d7f641c6ee Shift SSL parameters into Pathoc class 2013-01-04 10:37:26 +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
bb317051a4 Merge branch 'master' of ssh.github.com:cortesi/netlib 2013-01-03 14:05:33 +13:00