Commit Graph

9691 Commits

Author SHA1 Message Date
Maximilian Hils
6398dc308a
WebSockets: don't assert that server is connected upon initialization (#4932)
there may already have been a disconnect, which is still in the processing queue.

fix #4931
2021-11-22 07:41:33 +01:00
Marius
1c93a93696
Add font types to asset filter (~a) (#4928)
* Add font types to asset filter (~a)

* Add PR number to changelog

* remove flash mention

* restore asset test

Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2021-11-21 15:47:09 +01:00
Anthony Sottile
3847842f73
add runtime dependency on setuptools (#4919)
resolves #4918

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2021-11-21 14:14:47 +00:00
shindexro
9a469806eb
quote argument of view.flows.resolve (#4910)
* Fix #4902

* Update type signature

* Switch to None check

* Fix spacing

* Quote view.flows.resolve argument

* Switch to call_strings
2021-11-19 13:04:20 +01:00
Maximilian Hils
7be646f44a add note that spoof_source_address is unavailable, refs #4914 2021-11-18 15:39:23 +01:00
Maximilian Hils
0904cc3f5f
console: add error message for older Windows versions (#4911) 2021-11-18 07:45:28 +00:00
shindexro
888ce66f90
Correct flow-detail documentation (#4909)
* Fix #4902

* Update type signature

* Switch to None check

* Fix spacing

* Skip URL shortening when flow-detail is 0

* Sync docs with implementation

* Update URL shortening test
2021-11-18 08:26:05 +01:00
shindexro
39fa242e25
fix crash when invoking replay.server.count from console (#4905)
fix #4902
2021-11-17 16:53:43 +00:00
Maximilian Hils
83f05897ce fixup Windows transparent mode, fix #3876 and #3438 2021-11-16 21:12:09 +01:00
Christian Zenker
eb43ae4709
Use the slim base image for container (#4889) 2021-11-16 12:49:12 +01:00
Marius
301f8cf79d
Create search.py (#4900)
* Create search.py

* Address linter findings

* Address linter findings
2021-11-16 12:47:34 +01:00
Maximilian Hils
4f47612548 StackOverflow -> GitHub Discussions (part 2) 2021-11-16 11:02:57 +01:00
Maximilian Hils
9571491e50
StackOverflow -> GitHub Discussions 2021-11-16 10:26:38 +01:00
Karl Parkinson
df32d61086
Remove pyopenssl cruft (#4897)
* remove old pyopenssl cruft

* bump minimum version of pyopenssl

* add extra spaces to conform to style guide

* update changelog

* replace getattr with direct SSL method calls

* put version check back in but remove setdefault method calls

* tweak changelog wording

* bumb tox.ini pyOpenSSL dependency version

Co-authored-by: Karl Parkinson <karlparkinson@Karls-MBP.hitronhub.home>
2021-11-11 09:37:00 +01:00
Maximilian Hils
fd5caf40c7
server replay: improve option help (#4894) 2021-11-05 17:48:12 +00:00
Peter Hoffmann
260fc68211
Fix #4876 Don't do CONNECT on plaintext HTTP replays via upstream (#4882)
* Replays via upstream also need to comply with upstream handling

* Adjusted test for HTTP upstream replay which should NOT do a CONNECT

* Added Changelog

* Test for replay https pver upstream with CONNECT

* Proxy requests use full URL with host & port

* Finally remove some prints

* lint!

Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2021-10-31 20:23:04 +00:00
Thomas Kriechbaumer
1c10abef00
Merge pull request #4875 from Kriechi/bump-ci
bump CI steps and dependencies
2021-10-21 22:10:22 +02:00
Thomas Kriechbaumer
8d1135d66a bump CI steps and dependencies
not bumping codecov action due to dependency and security concerns
2021-10-21 22:03:33 +02:00
mame82
3a884ceb8f
gRPC packed repeated encoding (#4872)
* Replaced Kaitai protobuf parser with custom implementation, to prepare packed data handling

* Clamp varint size for bool conversion to 64bit, to satify tests

* moved WireParser into ProtoParser

* preserve work state

* Full packed support

* noc changes to example addon

* Adjusted test regex for ValueError

* Do not try to unpack fields twice
2021-10-21 13:20:13 +02:00
Thomas Kriechbaumer
eea48c6c27
Merge pull request #4850 from Kriechi/bump-docker
bump docker
2021-10-20 20:02:10 +02:00
Thomas Kriechbaumer
fffed0cb3a bump docker
closes #4846
2021-10-20 19:57:21 +02:00
Maximilian Hils
79f464bc78
ignore superfluous newlines after HTTP CONNECT, fix #4870 (#4871) 2021-10-19 11:25:22 +00:00
Maximilian Hils
0ad4a5983e web: update timestamp column style, fix #4092 2021-10-18 15:12:35 +02:00
mame82
8b6345e4a7
gRPC view: Adjusted parsing strategy for deprecated protobuf fields (#4858)
* Adjusted parsing strategy for deprecated protobuf fields

* Added test comment

* adjusted comment to reflect correct field IDs
2021-10-13 13:16:49 +02:00
Brad Dixon
77cf2ab4ee
fix for #4852 (#4857)
* fix for #4852

* changelog
2021-10-13 13:15:21 +02:00
Maximilian Hils
d6ba6777eb
enable live-reloading for contentviews (#4856) 2021-10-12 23:07:14 +02:00
mame82
480052f58b
Grpc contentview (#4851)
* Partial gRPC contentview prototype, not linted, no tests, not as add-on

* Linted (flake8)

* Save dev state

* Rewrote of protobuf parser, use decoding strategy, reduced rendered data. Parser uses  generators

* minor cleanup

* fix: preferred encoding was provided as function instead of value

* flake8: line length

* Backlinked message tree objects, temporary debug out

* Partial implementation of gRPC definitions. Save state to fix a cras (data invalidate in edit mode)

* hack: deal with missing exception handling for generator based content views

* gRPC/Protoparser descriptions (with test code)

* replaced manual gzip decoding with mitmproxy.net.encoding.decode

* Refactored typing imports

* Reafctoring

* distinguish request vs response definitions, separate view config from parser config

* Code cleaning, moved customized protobuf definitions to example addon

* final cleanup

* changelog

* Stubs for tests

* Fixed render_riority of addon example

* Started adding tests

* Work on tests

* mypy

* Added pseudo encoder to tests, to cover special decodings

* Example addon test added

* finalized tests, no 100 percent coverage possible, see comments un uncovered code

* minor adjustments

* fixup tests

* Typos

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2021-10-12 13:32:56 +02:00
Maximilian Hils
aa2ec224c7
Body Editing Fixes (#4853)
* clarify that `IS_WINDOWS` includes WSL

* windows: fix file editing

tornado's asnycio patch does not take nonexisting file descriptors very well,
so we need to catch errors here.

* body editing: better editor guessing, fix #4798
2021-10-12 00:23:35 +02:00
Maximilian Hils
0d466f2a2e body editing: better editor guessing, fix #4798 2021-10-12 00:18:48 +02:00
Maximilian Hils
82529d88f0 windows: fix file editing
tornado's asnycio patch does not take nonexisting file descriptors very well,
so we need to catch errors here.
2021-10-11 18:29:42 +02:00
Maximilian Hils
9688618bbd clarify that IS_WINDOWS includes WSL 2021-10-11 18:29:42 +02:00
Maximilian Hils
aad92c9d5a
Merge pull request #4847 from mhils/flowfilter
Flowfilter Improvements
2021-10-09 18:38:56 +02:00
Maximilian Hils
e3640801a5 lint! 2021-10-09 18:34:29 +02:00
Vinh Quang Tran
0b48fdfc29
Prevent connection lost in mitmweb when pressing Download button. (#4849) 2021-10-09 18:32:07 +02:00
Maximilian Hils
25bdf2f9d8 web: update filters 2021-10-08 18:39:22 +02:00
Maximilian Hils
c2d8674a7b web: minor fixes 2021-10-08 18:39:22 +02:00
Maximilian Hils
c43a2ef8dc improve flowfilter api: raise on invalid input, add ~all 2021-10-08 17:45:47 +02:00
Maximilian Hils
adfccb90a5 minor fixes 2021-10-08 17:36:16 +02:00
Brad Dixon
9346002e0f
Add client_playback_concurrency option (#4842)
* nowait

* docs, tests, flake8

* we ideally support other values in the future

Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2021-10-08 13:08:36 +02:00
Maximilian Hils
79896e23b7 contentview example: be explicit about passed metadata 2021-10-07 15:21:46 +02:00
Aaron Tan
278611bf77
Fix websocket view jumps to top bug (#4845) 2021-10-06 17:06:01 +02:00
Thomas Kriechbaumer
7a66231253
fix import errors caused by coverage.py (#4843)
* fix import errors caused by coverage.py

* LINT

Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2021-10-05 19:32:11 +00:00
Maximilian Hils
aa2f935dbb
Don't allow server.via change for live connections (#4841)
* don't allow `server.via` change for live connections

* return early if no tls context was set
2021-10-05 21:19:51 +02:00
Thomas Kriechbaumer
6be24f452e
Merge pull request #4810 from mhils/h2-fuzzing
Improve h2 Fuzzing Setup
2021-10-05 21:15:57 +02:00
Thomas Kriechbaumer
9e8b96a5cc bump h2 to v4.1 for fixes 2021-10-05 20:56:23 +02:00
Maximilian Hils
25c5da1857 return early if no tls context was set 2021-10-05 19:49:35 +02:00
Maximilian Hils
0f5b8c88af don't allow server.via change for live connections 2021-10-05 19:45:52 +02:00
Maximilian Hils
3cb89069b9 fix compat with upcoming cryptography release 2021-10-05 08:19:37 +02:00
Maximilian Hils
b2a760b4e9
Merge pull request #4829 from mitmproxy/requires-io-main
[requires.io] dependency update on main branch
2021-09-29 12:11:11 +02:00
Maximilian Hils
1919c0de59
Don't set 'content-length' with 'transfer-encoding' (#4827)
* Don't set 'content-length' with 'transfer-encoding'

When updating the response content for a response, avoid adding the
'content-length' header if the response contains a 'transfer-encoding'
header, from the spec [1]:

> When a message does not have a Transfer-Encoding header field, a
Content-Length header field can provide the anticipated size, as a
decimal number of octets, for a potential payload body

Note the 'transfer-encoding' header is not used with HTTP/2

https://httpwg.org/specs/rfc7230.html#header.content-length

* don't crash when sending content-length+transfer-encoding

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2021-09-28 18:38:25 +02:00