Commit Graph

505 Commits

Author SHA1 Message Date
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
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
a48cccadb5 fix tests on windows 2014-07-18 03:13:52 +02:00
Maximilian Hils
b0c366aa45 Merge pull request #300 from zbrdge/freebsd-platform
Freebsd 10 platform
2014-07-03 02:24:00 +02:00
Zack B
64c265b710 added unit test update. coverage still at 97% 2014-07-01 16:33:48 -07:00
Vyacheslav Bakhmutov
b7c1d05782 Remove global should_exit and fix tests 2014-06-13 14:14:55 +07: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
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
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
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
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
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
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
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
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
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
Aldo Cortesi
a85974eaa8 Fix flow initialization order error
Resolves #210
2014-02-08 17:17:35 +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
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
Maximilian Hils
d864a326d2 fix all tests except those using set_url and get_url 2014-02-05 14:33:17 +01:00
Maximilian Hils
6a53ae5fd3 push failing tests down to 43 2014-02-04 05:02:17 +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
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
Maximilian Hils
125166020b move test requirements out of main requirements.txt 2014-01-28 03:09:21 +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
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
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
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
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
Pedro Worcel
799c877676 now really fix it + test 2013-12-26 22:18:34 +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
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
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
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
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
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
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
cb3a4a0f3c Remove obsolete test. 2013-12-08 21:58:55 +13:00
Maximilian Hils
2956c144d3 Merge branch 'master' into 0.10 2013-09-14 23:47:04 +02:00
Aldo Cortesi
aaba940dea Fix pretty_size unit tests. 2013-08-23 10:28:16 +12: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
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
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
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
5c1157ddaf Move app instantiation out of proxy.py. 2013-07-24 10:32:56 +12: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
Maximilian Hils
d462b444b7 update tests to reflect changes to options.scripts 2013-06-17 16:48:06 +02:00
Maximilian Hils
fd36142018 Merge remote-tracking branch 'origin/scripts_improvements' into 0.10 2013-06-16 00:41:43 +02: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
11cc48ca25 Adapt for new request_client_cert option in netlib. 2013-05-13 09:08:24 +12:00
Aldo Cortesi
5cd7563d12 Minor coverage. 2013-04-30 09:13:33 +12: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
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
e3fd0e838d Add a basic built-in web app. 2013-03-25 09:20:26 +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
Aldo Cortesi
d2d3eb6490 Un-break unit tests. Tsk tsk. 2013-03-17 17:53:48 +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
cfb5ba89ce Introduce a filtered flow writer, and use it in dump.py
Fixes #104
2013-03-14 09:19:43 +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
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
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
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
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
57f01ffb07 Test suite, remove extraneous code. 2013-01-28 21:59:03 +13:00
Aldo Cortesi
25cb9471f0 Add tests for client certificate support. 2013-01-20 22:39:28 +13: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
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
d0ee4d60d0 Unit tests and minor code refactoring for ServerConnection. 2013-01-05 19:44:12 -08: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