Aldo Cortesi
264a09e778
Let's dispense with this fiction that we support multiple servers
...
It's simple enough to re-add if needed, and until then is just cruft.
2016-10-19 12:37:32 +13:00
Aldo Cortesi
87629586ae
web app cleanups: tests and examples
2016-10-19 11:48:51 +13:00
Aldo Cortesi
ceb8caee98
Web apps to addons
...
This commit removes the app registry, adds a wsgiapp addon base, and ports the
onboarding app to it.
2016-10-19 11:40:51 +13:00
Aldo Cortesi
03cb5bb325
No need for all builtins to be loaded for server tests
2016-10-18 22:30:21 +13:00
Aldo Cortesi
466f5e56a1
Convert flow.state to an addon
...
A first step, and already many things are much nicer.
2016-10-18 21:51:36 +13:00
Aldo Cortesi
d5056c5627
accept_addon -> resume, intercept/resume events
2016-10-18 12:02:35 +13:00
Aldo Cortesi
825b02d495
master.duplicate_flow -> state.duplicate_flow
...
This is a pure operation on state, and doesn't belong on master.
Part of prep to move state to an addon.
2016-10-18 11:29:51 +13:00
Aldo Cortesi
b25d94a6ac
Response body streaming to addon
2016-10-18 10:42:05 +13:00
Maximilian Hils
beed406058
fix tests
2016-10-17 03:37:42 -07:00
Thomas Kriechbaumer
94c9dd66e6
remove empty lines at beginning of file
2016-10-17 10:32:12 +02:00
Maximilian Hils
758860531a
fix socks5 mode with tls
2016-10-16 23:05:51 -07:00
Aldo Cortesi
c774a9fec9
python3: clean up super and __future__
2016-10-17 18:03:07 +13:00
Aldo Cortesi
a647b30365
python3: clean up class brackets
2016-10-17 17:37:08 +13:00
Aldo Cortesi
fb22f2ff4f
Zap object base class
2016-10-17 17:37:08 +13:00
Aldo Cortesi
ce98a9219e
test & examples: zap six
2016-10-17 16:45:45 +13:00
Aldo Cortesi
9a0195bf64
scripts: keep scripts just after the ScriptLoader in addon chain
...
We need scripts to run _before_ filestreamer, so we can't just add them to the
end of the chain. This patch also fixes an issue that could cause scripts to be
initialised un-necessarily if only the order of scripts in options changed.
2016-10-16 20:26:06 +13:00
Aldo Cortesi
fb69c9c345
docs: overview, classes, arguments
2016-10-16 20:26:06 +13:00
Maximilian Hils
e9284ab7ee
add regression test for #1605
2016-10-14 01:22:30 -07:00
Aldo Cortesi
89d36713e3
certutils: cap the cert store size at 100 by default
...
This should be enough to give us reuse without growing infinitely. This is part
of fixing the memory situation in mitmdump.
TODO: There's an opportunity here for a better algorithm, that expires certs
based on least-recently-accessed time, rather than oldest generated time.
2016-10-05 10:44:31 +11:00
Thomas Kriechbaumer
90898f9084
use flt instead of filt for flowfilter expressions
2016-10-04 14:51:04 +02:00
Aldo Cortesi
882c363ec5
debug: Hard exit after debug signal
2016-10-04 16:48:13 +11:00
Aldo Cortesi
7fe09f4d26
Consolidate logging
...
- Make log event handler work
- Move terminal event log into an addon
- Clean various log related errors and duplications
2016-10-04 13:00:15 +11:00
Aldo Cortesi
2e48b60ff1
Clarify channel interaction pattern
...
Before this patch, it wasn't clear when the arguments to an event could be
modified, and when a new object should be returned. After this patch, the right
thing to do is to modify the arguments in 99% of cases. The only exception to
this is root_layer, for which we can find a better structure down the track.
2016-10-04 08:13:56 +11:00
Aldo Cortesi
1ae73b9157
Add requestheaders event
...
HTTP1 only for now, HTTP2 coming next.
2016-10-04 08:13:56 +11:00
Thomas Kriechbaumer
36c04f1631
fix flowfilter.match args
2016-10-03 12:04:17 +02:00
Thomas Kriechbaumer
bb60b76af4
use flowfilter.match
2016-10-03 11:45:54 +02:00
Thomas Kriechbaumer
ba84248910
rename mitmproxy.filt -> mitmproxy.flowfilter
2016-10-03 11:45:54 +02:00
Maximilian Hils
611dad12a7
Revert "Add API to programmatically create new requests ( #1534 )"
...
This reverts commit ccbdcd684b
,
which yielded a test timeout.
2016-10-02 23:08:51 -07:00
Tyler St. Onge
ccbdcd684b
Add API to programmatically create new requests ( #1534 )
2016-10-01 13:06:59 +02:00
Aldo Cortesi
070aa27cf5
parse_set_cookie header returns an empty list if no cookies are found
...
This matches parse_cookie, and is more idiomatic.
2016-09-28 15:10:31 +10:00
Aldo Cortesi
b21f076cc8
Merge branch 'multi-cookie' of https://github.com/dufferzafar/mitmproxy
2016-09-28 12:44:40 +10:00
Shadab Zafar
5383c15ff2
Add tests for comma separated Set-Cookies
2016-09-27 21:28:54 +05:30
Ryan Laughlin
ad6d675b20
In reverse proxy mode, always send SNI
2016-09-27 10:49:04 -04:00
Shadab Zafar
e8ffc5167b
Can't have , in the sticky cookie test
...
Since we support comma separated cookies now
2016-09-27 16:44:09 +05:30
Shadab Zafar
9ec0790271
Make needed changes in tests
2016-09-27 16:44:09 +05:30
Shadab Zafar
85bf5e18f6
Update cookie tests
...
This is needed since _read_pairs now returns a list of cookies each of which
is a list of [name, value] tuples.
2016-09-27 16:44:08 +05:30
Maximilian Hils
eeec17902f
update dependencies, minor fixes ( #1577 )
2016-09-24 21:01:48 -07:00
Maximilian Hils
0a643ad20f
remove option argument for addons.add ( #1576 )
2016-09-24 18:21:12 -07:00
Maximilian Hils
9142da1a7d
Merge pull request #1566 from mhils/issue-1546
...
add websocket on/off switch, improve logging (fix #1546 , fix #1547 )
2016-09-22 03:06:39 -07:00
Maximilian Hils
77868434e7
fix tests
2016-09-22 02:10:02 -07:00
Maximilian Hils
a3329c5a80
scripts: cut traceback properly, fix #1467
2016-09-22 02:03:12 -07:00
Maximilian Hils
9e0b935fa2
Merge pull request #1564 from mhils/issue-1554
...
Fix Response.make content-length header
2016-09-21 21:49:14 -07:00
Maximilian Hils
0b532789a0
fix Response.make content-length header
2016-09-21 20:34:01 -07:00
Maximilian Hils
770936f1f9
raise TypeError on invalid header assignment, fix #1562
2016-09-21 19:21:32 -07:00
Aldo Cortesi
cfb943bfdd
Redesign client replay
...
- Move to an addon
- Use a much simpler synchronisation mechanism
2016-09-11 20:00:34 +12:00
Aldo Cortesi
6b9221ffeb
Add "run_once" support to the script addon, use it in mitmproxy
...
Fixes #1418
2016-09-11 13:22:01 +12:00
Aldo Cortesi
9b814ca067
options.replay_ignore* -> options.server_replay_ignore*
2016-09-10 10:21:52 +12:00
Aldo Cortesi
8677e91074
options.nopop -> options.server_replay_nopop
2016-09-10 10:09:07 +12:00
Aldo Cortesi
5ebe8c1bc8
options.rheaders -> options.server_replay_use_headers
2016-09-10 10:09:07 +12:00
Aldo Cortesi
b0213a2c0e
options.kill -> options.replay_kill_extra
2016-09-10 10:09:07 +12:00