Maximilian Hils
5ce370e2a9
lint!
2016-11-18 12:59:59 +01:00
Aldo Cortesi
8065b44eed
addons.view: clarify modification events
...
This adds a set of store modification events, and uses them for flow settings.
This addresses a bug where settings could persist even after flows were deleted.
2016-11-15 09:53:17 +13:00
Aldo Cortesi
9b08279c7c
addons.proxyauth: out with the old, in with the new
...
- Strip out old auth mechanisms, and enable addon
- Disable web app auth for now - this should just use the Tornado auth stuff
2016-11-13 19:59:59 +13:00
Aldo Cortesi
dc88b7d110
addons.proxyauth: complete and test
2016-11-13 18:14:23 +13:00
Aldo Cortesi
e644d2167c
stub out proxyauth addon
...
Stub out basic workings, add and test configure event.
2016-11-13 16:22:33 +13:00
Aldo Cortesi
fe01b1435a
upstream_proxy_auth -> upstream_auth
...
Also clarify what this does in commandline help.
2016-11-13 11:50:28 +13:00
Aldo Cortesi
3b00bc339d
Complete upstream authentication module
...
- Handles upstream CONNECT and regular requests, plus HTTP Basic for reverse
proxy
- Add some tests to make sure we can rely on the .via attribute on server
connections.
2016-11-13 11:43:27 +13:00
Aldo Cortesi
a9b4560187
Refine handling of HTTP CONNECT
...
- CONNECT requests do not generate the usual http events. Instead, they
generate the http_connect event and handlers then have the option of setting an
error response to abort the connect.
- The connect handler is called for both upstream proxy and regular proxy CONNECTs.
2016-11-12 18:28:37 +13:00
Aldo Cortesi
38f8d9e541
Add the http_connect event for HTTP CONNECT requests
2016-11-12 12:44:43 +13:00
Aldo Cortesi
bc01a146b0
Upstream proxy auth to addon
2016-11-12 11:58:04 +13:00
Aldo Cortesi
3958940420
Test failure during 100-continue
...
Also:
- Remove duplicate and unused code
- Tighten scope of HttpReadDisconnect handler - we only want to ignore this for
the initial read, not for the entire block that includes things like the expect
handling.
2016-11-12 11:58:04 +13:00
Aldo Cortesi
82ac7d05a6
Bug: ask requestheaders before request body is read
...
Also add the beginnings of a test suite to exercise issues like this.
2016-11-12 11:58:04 +13:00
Thomas Kriechbaumer
184e29e119
http2: add push-promise metadata test
2016-11-05 05:13:36 +01:00
Aldo Cortesi
067198a5dd
Remove deprecated interfaces
2016-11-04 11:47:47 +13:00
Aldo Cortesi
6c8c4465d9
script.concurrent: tests to taddons
2016-11-04 10:59:41 +13:00
Aldo Cortesi
4f4db223fe
addons: convert last of the test suite to taddons
2016-11-04 09:17:56 +13:00
Aldo Cortesi
deb66d3cac
addons.setheaders: fix configure bug, tests to taddons
2016-11-04 09:09:39 +13:00
Aldo Cortesi
b51a96081a
addons.view: test suite to 100%
...
This takes coverage for all of /addons to 100%
2016-11-04 08:55:01 +13:00
Aldo Cortesi
17e828b243
addons.view: test improvements
2016-11-03 20:53:06 +13:00
Aldo Cortesi
5ade93f2ad
addons.streambodies: 100% test coverage
2016-11-03 20:16:07 +13:00
Aldo Cortesi
d7d6edb3d1
addons.serverplayback: 100% test coverage
2016-11-03 20:05:21 +13:00
Aldo Cortesi
e1fc80937d
addons.serverplayback: test suite to taddons
2016-11-03 19:43:33 +13:00
Aldo Cortesi
e9a96f4d7f
addons.script: 100% test coverage
2016-11-03 19:36:34 +13:00
Aldo Cortesi
d9538637c3
addons.script: convert to test.taddons
2016-11-03 18:57:34 +13:00
Aldo Cortesi
d31f2698a5
addons.onboarding: remove duplicate code
2016-11-03 16:20:38 +13:00
Aldo Cortesi
9fc6674151
addons.intercept: 100% test coverage
2016-11-03 16:16:29 +13:00
Aldo Cortesi
77e6dfe35c
streamfile: make options less crazy
...
Instead of a (file, mode) tuple, move to "streamfile" as the path, and
"streamfile_append" to specify if we should append or not.
Leave the command-line options intact for now.
2016-11-03 15:18:55 +13:00
Aldo Cortesi
9f77c79227
FileStreamer -> StreamFile
...
options.wfile -> options.streamfile
2016-11-03 15:00:18 +13:00
Aldo Cortesi
43a8221989
addons: filestreamer test cov to 100%
...
Also address a bug in taddons that caused options changes that raised errors to
be retained rather than rolled back.
2016-11-03 14:50:23 +13:00
Aldo Cortesi
fbdce4b629
addons filstreamer: tests and bugfixes
...
- Move tests to taddons
- Fix a bug where options updates caused streaming to halt
2016-11-03 12:44:19 +13:00
Aldo Cortesi
5109fd8ecb
Change antiquated test cipher suites
...
This breaks Travis, possibly due to OpenSSL version.
2016-11-03 08:23:19 +13:00
Aldo Cortesi
b867fb35a3
addons: dumper spit and polish
...
- 100% test coverage
- Cleanups
- Add test/mitmproxy/addons/dumperview.py, a small utility for viewing dumper
output variations
2016-11-02 22:47:49 +13:00
Aldo Cortesi
a75b3474a4
tests: convert test_dumper to use taddons
2016-11-02 11:17:08 +13:00
Aldo Cortesi
59b269425f
tests: client_playback coverage
2016-11-02 10:59:33 +13:00
Aldo Cortesi
7e6d014f8f
tests: pathod/tutils.py -> pathod/tservers.py
...
And remove all aliases for mitmproxy.test.tutils
2016-11-02 10:06:25 +13:00
Aldo Cortesi
c55e8d8f62
tests: clean up test/mitmproxy/tutils.py
...
Remove aliases, use mitmproxy/test/tutils instead.
2016-11-02 09:44:18 +13:00
Aldo Cortesi
fc7606bd98
tests: minor cleanup for tests/mitmproxy/tutils.py
2016-11-02 08:51:26 +13:00
Aldo Cortesi
83fdd82a52
addons anticom, anticache: expand tests, new truss
2016-11-01 17:38:45 +13:00
Aldo Cortesi
50deaf56bf
Remove addons.State
...
- Do a first-pass port of mitmweb. Some stuff still broken.
- Remove more all State tests from the test suite
2016-11-01 10:06:28 +13:00
Aldo Cortesi
9d9735dd07
Replace addons.state in test suite
...
Use a super-simple flow recorder instead.
2016-11-01 09:36:24 +13:00
Aldo Cortesi
daf355bb4c
console: add caching sort keys
...
This is a tad complicated. The underlying sorted list implementation expects
the sort key to be stable for the lifetime of the object. However, if we sort
by size, for instance, the sort order changes as the flow progresses through
its lifecycle. We address this through two means:
- Let order keys cache the sort value by flow ID.
- Add a facility to refresh items in the list by removing and re-adding them
when they are updated.
2016-10-30 21:11:30 +13:00
Aldo Cortesi
9abfb1aac2
console: re-add follow focus
2016-10-30 19:47:32 +13:00
Aldo Cortesi
f08b57fb9b
console: "v" to reverse flow order
2016-10-30 17:57:43 +13:00
Aldo Cortesi
a67a591893
console: o for flow order
...
"o" shortcut and --order cmdline option to change flow order.
Options is now bound to "O".
2016-10-30 17:42:34 +13:00
Aldo Cortesi
6b6c44551a
addons.view: Add first-class support for marking
...
Marking now works differently - it's no longer just another filter, it's
applied in addition to the filter. This means you can apply a filter, mark some
flows, and then toggle between marked and unmarked flows matching the filter.
I'm leaving the filter for marked flows intact - it will come in handy in other
situations.
2016-10-30 15:45:36 +13:00
Aldo Cortesi
2b76db1272
console: Port from state to view
...
First phase of the port - basic flow list and flow view functionality working.
More to come.
2016-10-30 14:56:36 +13:00
Aldo Cortesi
b9eb1a3479
Add options.default_contentview
...
This is the first step in a longer process of revamping content views. For the
moment, the option is not exposed on the command line.
2016-10-30 12:05:37 +13:00
Aldo Cortesi
944dcbaaa0
Cleanups: remove intercept from addons.state, unused imports
2016-10-30 11:13:05 +13:00
Aldo Cortesi
81a00f6f76
Replace interception in mitmproxy and mitmweb with addon
...
Fixes #1674
2016-10-30 11:07:09 +13:00
Aldo Cortesi
d1f14961ed
test.taddon: Add cycle() method, use it to test addons.intercept
2016-10-30 10:52:57 +13:00