Commit Graph

6426 Commits

Author SHA1 Message Date
Matthew Shao
20d3ae98e0 [web] Reach 100% coverage for ducks/eventLog.js 2017-03-22 18:32:28 +08:00
Matthew Shao
ab2fcbef8d Fix#2184, mitmweb -n dispalys incorrect message. (#2187)
* Fixes #2184, python code.

* Fixes #2184, JavaScript code.

* [web] Update Footer.jsx (#2184)
2017-03-22 01:26:04 +01:00
Aldo Cortesi
00902e6feb Merge pull request #2190 from cortesi/mypy
mypy for all of ./mitmproxy
2017-03-22 11:16:02 +13:00
Aldo Cortesi
95d9ec88ac tox: mypy checking for entire codebase
Also fix a few linting errors.
2017-03-22 10:29:46 +13:00
Maximilian Hils
26d0254203 [requires.io] dependency update on master branch (#2193) 2017-03-21 18:43:56 +01:00
Aldo Cortesi
cacad8373b Make tnetstrings pass mypy
Mypy doesn't support recursive types yet, so we can't properly express
TSerializable nested structures. For now, we just disable type checking in the
appropriate locations.

https://github.com/python/mypy/issues/731
2017-03-20 13:09:24 +13:00
Aldo Cortesi
4ca78604af Factor out an io module
Include tnetstring - we've made enough changes that this no longer belongs in
contrib.
2017-03-20 12:50:09 +13:00
Aldo Cortesi
0c0c0d38cc Merge pull request #2186 from cortesi/tighten
Tighten some options-related functionality
2017-03-20 12:39:49 +13:00
Aldo Cortesi
3a8da31835 mypy all of the codebase bar tnetstring
In some places, this involved removing type declarations where our types were
terminally confused. The grideditor specifically needs a cleanup and
restructure.
2017-03-20 12:38:08 +13:00
Aldo Cortesi
b98ce71770 Fix sliding window type specs 2017-03-20 12:21:50 +13:00
Aldo Cortesi
2153c337e0 addons.view: we no longer have a None order state
This bumps coverage back to 100% for addons
2017-03-20 09:12:09 +13:00
Maximilian Hils
92e3358915 Merge pull request #2182 from syahn/fix-#2134
Fix #2134
2017-03-19 14:47:50 +01:00
Aldo Cortesi
b19fefd173 options: default_contentview uses lowercase 2017-03-19 14:39:16 +13:00
Aldo Cortesi
04f1a4443d options: reraise when there's an error with a partial update
Fixes #2174
2017-03-19 14:36:23 +13:00
Aldo Cortesi
8d68196fd0 console: use overlay chooser to pick flow view mode
More consistent, and fixes status prompt overflow issue.
2017-03-19 14:13:54 +13:00
Aldo Cortesi
1b6bc874b5 console options: "d" to reset this option to default 2017-03-19 14:01:32 +13:00
Aldo Cortesi
43e7b9d68c options: choices for content views and tighten console order spec
Also clean up some leftovers from filter option name change.
2017-03-19 13:39:28 +13:00
Aldo Cortesi
22d7c31ea8 dumper, mitmdump: kill filtstr
Dumper now also uses view_filter. Passing arguments to mitmdump is now
precisely equivalent to setting both filestream_filter and view_filter.
2017-03-19 13:21:46 +13:00
Aldo Cortesi
475a4e3eb0 streamfile: add streamfile_filter and use it instead of filtstr 2017-03-19 13:08:26 +13:00
Aldo Cortesi
6f745b90a8 console options: fix bug that caused keys to be handled by wrong component 2017-03-19 13:05:27 +13:00
Aldo Cortesi
b1ef4bce30 options: filter -> view_filter 2017-03-19 13:02:51 +13:00
Aldo Cortesi
1b330ba453 Merge pull request #2173 from cortesi/coptions
Console options editor
2017-03-19 12:27:41 +13:00
Aldo Cortesi
cb18c91f13 console options: help for overlays, improved layout for overlay grid editor 2017-03-19 12:14:42 +13:00
Aldo Cortesi
21794c7bbe optmanager: test coverage 2017-03-19 11:29:41 +13:00
Aldo Cortesi
49b0a67eb9 console options: add an overlay grid editor for sequence options 2017-03-19 10:32:22 +13:00
Aldo Cortesi
4e24c95a61 optmanager: cope with bound methods in .subscribe
Fixes #2122
2017-03-19 10:32:22 +13:00
Aldo Cortesi
3f50d5fdbb console options: handle choices settings
This implements a generic chooser overlay, and uses it to handle setting
options that have fixed choices. We'll use this overlay elsewhere too.
2017-03-19 10:32:22 +13:00
Aldo Cortesi
fea08ef919 console options: in-place editor for simple strings and ints 2017-03-19 10:32:22 +13:00
Aldo Cortesi
3a949f35f8 console options: better defaults display, g/G/D keyboard shortcuts 2017-03-19 10:32:22 +13:00
Aldo Cortesi
d759150734 console: options/help pane switching, toggle bools with enter 2017-03-19 10:32:22 +13:00
Aldo Cortesi
8130b9880a options cleanups
- Move default client ciphers - no need to have a 10-line string default.
- Add some style guidance on options help
- Be consistent about reflowing options help
2017-03-19 10:32:22 +13:00
Aldo Cortesi
bc67cee687 console: sketch out look and feel of the new Options editor 2017-03-19 10:32:22 +13:00
Aldo Cortesi
39659c7528 Make mypy succeed with imports on master.py
We get little benefit from our mypy QA checks at the moment, because we skip
imports. This patch is what's needed to make mypy succeed with imports on a
single file: master.py

It also updates mypy to the current version, and enables a QA check.

Mypy bugs I encountered:

dict.update with kwargs not supported:

https://github.com/python/mypy/issues/1031

property setters and getters must be adjacent:

https://github.com/python/mypy/issues/1465
2017-03-19 10:32:22 +13:00
Frank Ahn
125ae2d8f9 Fix #2134 2017-03-18 09:51:05 +09:00
Maximilian Hils
c0882496e3 Merge pull request #2176 from MatthewShao/jest-dev
[web] Reach 100% coverage for ducks/utils/store.js
2017-03-17 15:15:55 +01:00
Matthew Shao
6c338c84a6 [web] Reach 100% coverage for ducks/utils/store.js 2017-03-17 17:17:11 +08:00
Aldo Cortesi
253fa95018 Merge pull request #2169 from cortesi/mypy
mypy without skipping imports
2017-03-17 09:43:29 +13:00
Aldo Cortesi
5192810ff6 Make mypy succeed with imports on master.py
We get little benefit from our mypy QA checks at the moment, because we skip
imports. This patch is what's needed to make mypy succeed with imports on a
single file: master.py

It also updates mypy to the current version, and enables a QA check.

Mypy bugs I encountered:

dict.update with kwargs not supported:

https://github.com/python/mypy/issues/1031

property setters and getters must be adjacent:

https://github.com/python/mypy/issues/1465
2017-03-17 08:13:47 +13:00
Aldo Cortesi
eac210829e Rip out master handler mechanism
All events are now handled by addons, and we no longer support any events on
master.
2017-03-17 07:56:32 +13:00
Maximilian Hils
7a8b362df6 Merge pull request #2156 from syahn/pretty-popup
[web] Adjust pop-up docs position
2017-03-16 18:36:39 +01:00
Maximilian Hils
6d66184eba Merge pull request #2168 from cortesi/handlers
Rip out old handlers mechanism - all events are now handled in addons
2017-03-16 14:57:26 +01:00
Maximilian Hils
50eeac482f Merge pull request #2153 from MatthewShao/jest-dev
[web] Reach 100% coverage for ducks/ui/flow.js
2017-03-16 14:51:33 +01:00
Maximilian Hils
6c0bbcc9ee Merge pull request #2170 from felixonmars/patch-1
Fix test_format_xml with dot in path
2017-03-16 12:34:01 +01:00
Thomas Kriechbaumer
4a354ffb83 Merge pull request #2172 from Kriechi/bump-h2
bump h2 and hyperframe
2017-03-16 11:21:31 +01:00
Thomas Kriechbaumer
2a934ed323 bump h2 and hyperframe 2017-03-16 10:33:36 +01:00
Felix Yan
b352557092 Fix test_format_xml with dot in path
When the path contains dot ".", replacing all dots will generate a non-exist result and raises a FileNotFoundError. Replacing only the last dot fixes this.
2017-03-16 16:48:21 +08:00
Aldo Cortesi
c5e0dc64b9 Rip out master handler mechanism
All events are now handled by addons, and we no longer support any events on
master.
2017-03-16 18:33:24 +13:00
Aldo Cortesi
3de9829003 Remove last handlers in test suite
While we're here, make checking that there are NO logs on the proxy more
efficient by setting a short timeout. This reduces total test suite running
time by 15% on my system.
2017-03-16 18:05:57 +13:00
Aldo Cortesi
1410cbb4b6 Remove test handlers by using taddons.RecordingMaster
This also means expanding and tweaking the recording master API, which we
reflect through the current test suite
2017-03-16 18:05:57 +13:00
Aldo Cortesi
85ddc5056b Move mitmproxy console handlers to addon 2017-03-16 18:05:57 +13:00