Aldo Cortesi
7922e70037
Basic response generation.
2012-06-20 10:51:37 +12:00
Aldo Cortesi
084be7684d
Close socket on shutdown.
2012-06-20 10:51:02 +12:00
Aldo Cortesi
892ee2a904
Start porting web app to Flask.
2012-06-19 16:57:57 +12:00
Aldo Cortesi
ce1ef55456
Adapt WSGI, convert test suite to nose.
2012-06-19 14:23:22 +12:00
Aldo Cortesi
a700721891
Porting to netlib proceeds apace.
2012-06-19 13:23:07 +12:00
Aldo Cortesi
7cb242c168
Move wsgi to netlib.
2012-06-19 10:42:55 +12:00
Aldo Cortesi
c7e9051cbb
Import wsgi.
2012-06-19 10:42:25 +12:00
Aldo Cortesi
1b1ccab8b7
Extract protocol and tcp server implementations into netlib.
2012-06-19 09:58:50 +12:00
Aldo Cortesi
b558997fd9
Initial checkin.
2012-06-19 09:42:32 +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
bd99a13f39
Start refactoring towards netlib, adding SNI and client testing.
2012-06-17 07:57:24 +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
b1f410c78d
Join thread on test exit to avoid race condition.
2012-06-09 20:42: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
00c8bef0ff
Port test suite over to Nose.
2012-06-09 15:08: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
456b11df9a
Add requests to install_requires.
2012-06-07 17:03:16 +12:00
Aldo Cortesi
a29ebe31dc
SSL support for test struss.
...
Also, rewrite requests usage for latest version.
2012-06-07 17:02:17 +12:00
Aldo Cortesi
81fc990314
Fail if only one of certfile or keyfile is specified.
2012-06-07 16:36:54 +12:00
Aldo Cortesi
9ae53aecd0
We can't sensibly unit test pages withhout firing up a server.
...
We've just added functionality to do this ourselves, so rip out the old stuff.
2012-06-07 16:35:54 +12:00
Aldo Cortesi
26c8437e88
Better test daemon cleanup, improve utils test coverage.
2012-06-07 14:05:42 +12:00
Aldo Cortesi
34ffe46fa0
Add /api/info, returning general info on the running pathod daemon.
2012-06-07 11:39:37 +12:00
Aldo Cortesi
14b2a69d21
Start building a Pathod unit testing truss.
...
- Add test.py, which will house the testing API.
- Extend API with a shutdown method, used to terminate the test daemon.
- Refactor to allow clean shutdown.
2012-06-07 11:23:23 +12:00