Commit Graph

9718 Commits

Author SHA1 Message Date
Jaida Wu
3c463bb137
Merge branch 'mitmproxy:main' into main 2022-04-23 11:16:03 +08:00
EndUser509
35703b0b6b
HTTP/2 keepalive (#5144)
* Example addon for saving streamed data including a small bug fix to make it work.

* Revert "Example addon for saving streamed data including a small bug fix to make it work."

This reverts commit 02ab78def9a52eaca1a89d0757cd9475ce250eaa.

* Add https_ping_threshold option to enable keep-alive for HTTP/2 server connections by sending PING frames if the conection is idle longer than the threshold.

* Fixed test

* Fix test

* Adding pragma

* Moved timer logic to _http2.py

* Small code improvement

* Update mitmproxy/options.py

Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Update mitmproxy/options.py

Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Update mitmproxy/proxy/commands.py

Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Update mitmproxy/proxy/commands.py

Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Update mitmproxy/proxy/layers/http/_http2.py

Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Sending Wakup back to right client

* Update mitmproxy/proxy/server.py

Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Update mitmproxy/proxy/server.py

Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Update mitmproxy/proxy/server.py

Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Incorporated suggested changes
Fixed almost all tests

* make `Wakeup` a `CommandCompleted` event.

This allows us to use it with `reply()` in tests,
which makes sure that the correct instance is reused.
 # Please enter the commit message for your changes. Lines starting

* nits

`typing.Set` for Python 3.8 compatibility and a few minor stylistic changes.

* nits nits

Co-authored-by: Maximilian Hils <github@maximilianhils.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-04-22 13:59:55 +02:00
Will Monge
a863f529ab
Example: manipulate http cookies (#5278)
* added example on how to manipulate (outbound and inbound) cookies for http flows

* added entry to the CHANGELOG
2022-04-22 12:40:23 +02:00
Lijiawei
d1d854f012
Fix mitmweb export copy failed in non-secure domain (#5265)
* Fix mitmweb export copy failed in non-secure domain

https://github.com/mitmproxy/mitmproxy/issues/5264

* Set the generic type of Promise to void

* move clipboard copy to contrib, adjust for TypeScript

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-04-20 20:00:31 +02:00
Jaida Wu
9ea63e692a
make GitHub Actions build binaries only
Signed-off-by: Jaida Wu <mlgmxyysd@meowcat.org>
2022-04-20 16:36:00 +08:00
Jaida Wu
a71866d711
make it insensible
Signed-off-by: Jaida Wu <mlgmxyysd@meowcat.org>
2022-04-20 16:31:51 +08:00
Aldo Cortesi
a8b6f48374
[requires.io] dependency update on main branch (#5244)
* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

* [requires.io] dependency update

Co-authored-by: requires.io <support@requires.io>
2022-04-17 17:54:06 +02:00
Maximilian Hils
0b4cbfab99
console: be more tolerant on UTF8 checks, but enforce encoding (#5250) 2022-04-06 20:13:19 +02:00
Maximilian Hils
02d2b6d310
warn users if sse flows are received without streaming, refs #4469 (#5249) 2022-04-06 10:51:58 +00:00
kjy00302
0454f63e98
Fix text truncation for full-width characters (#4278)
* Fix text truncation for full-width characters

* Add test for TruncatedText
2022-04-06 11:17:55 +02:00
Maximilian Hils
6d67a405a9
add Flow.timestamp_created, which retains list order on replay (#5227) 2022-04-06 10:34:17 +02:00
Aldo Cortesi
85e57a91e0
[requires.io] dependency update on main branch (#5236)
* [requires.io] dependency update

* [requires.io] dependency update

* Update setup.py

Co-authored-by: requires.io <support@requires.io>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-04-02 12:05:06 +02:00
Maximilian Hils
648d3bc0f9
add wsreplay.py, close #5012 2022-03-30 15:14:29 +02:00
Maximilian Hils
0fa7c46368
fix cut addon to work with binary content, fix #3965 (#5230) 2022-03-30 12:24:18 +00:00
Maximilian Hils
31add1a7c0
console: improve flowlist performance (#5228)
Co-authored-by: BkPHcgQL3V <BkPHcgQL3V@gmx.com>
2022-03-29 19:32:40 +02:00
Gabriel Corona
66dd158560
Add domain fronting example (#5217)
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-03-29 18:24:59 +02:00
Maximilian Hils
1bc265ace7
Merge pull request #5226 from mhils/cleanup
`pyupgrade --py38-plus`
2022-03-29 15:36:32 +02:00
Maximilian Hils
9d1e3107e8 pyupgrade --keep-runtime-typing --py38-plus 2022-03-29 15:29:37 +02:00
Maximilian Hils
b8bed1d770
errorcheck: print message to stderr for console UI (#5225) 2022-03-29 15:26:46 +02:00
Maximilian Hils
beb49ab121 don't use #noqa for imports 2022-03-29 13:51:08 +02:00
Maximilian Hils
f0da667516
tlsconfig: make sure to use the correct connection, fix #5109 (#5224) 2022-03-29 08:27:53 +00:00
Aldo Cortesi
a63c96ce72
[requires.io] dependency update on main branch (#5223)
* [requires.io] dependency update

* Update setup.py

Co-authored-by: requires.io <support@requires.io>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-03-29 06:58:31 +00:00
Aldo Cortesi
533dfcd71b
[requires.io] dependency update on main branch (#5215)
* [requires.io] dependency update

* [requires.io] dependency update

* Update setup.py

Co-authored-by: requires.io <support@requires.io>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-03-28 19:18:39 +00:00
Aldo Cortesi
0f346fa89d
[requires.io] dependency update on main branch (#5207)
* [requires.io] dependency update

* [requires.io] dependency update

Co-authored-by: requires.io <support@requires.io>
2022-03-24 18:12:00 +00:00
Agustin Bacigalup
33bba38b03
Add httpdump.py example (#5190)
* add httpdump.py example

* update CHANGELOG.md

* delete print() statement

* fix flake8?
2022-03-23 13:04:38 +00:00
Maximilian Hils
af207cab07 update changelog 2022-03-23 13:56:59 +01:00
Paulo Romeira
e534086053
Add flatpak support to the browser addon (#5200) 2022-03-23 13:56:20 +01:00
Aldo Cortesi
01d67951ee
[requires.io] dependency update on main branch (#5196)
* [requires.io] dependency update

* [requires.io] dependency update

Co-authored-by: requires.io <support@requires.io>
2022-03-19 18:34:57 +00:00
Maximilian Hils
426cea5bd6 reopen main for development 2022-03-19 17:35:34 +01:00
Maximilian Hils
7352811eef bump to 8.0.0 2022-03-19 17:20:32 +01:00
Maximilian Hils
41ebb24414 update mitmweb assets 2022-03-19 17:20:32 +01:00
Maximilian Hils
b06fb6d157 security: reject whitespace in HTTP/1 header names
This commit fixes GHSA-gcx2-gvj7-pxv3 by making mitmproxy
reject header names that contain whitespace characters by default.
A new `validate_inbound_headers` option is provided to turn this behavior
off at the expense of allowing HTTP smuggling vulnerabilities.
2022-03-19 17:20:32 +01:00
Maximilian Hils
9243ba4e25 fix vt code detection on Windows 2022-03-19 17:20:32 +01:00
Maximilian Hils
218c942808 docker: use Python 3.10 2022-03-19 15:38:30 +01:00
Maximilian Hils
a95aed44a7
CI: use python 3.10 (#5195) 2022-03-19 15:37:11 +01:00
Maximilian Hils
a0e04a7833 web: display WS/WSS as method 2022-03-19 14:44:02 +01:00
Maximilian Hils
628d6201ae web: fix ~websocket filter 2022-03-19 14:37:06 +01:00
Alexander Prinzhorn
e8ae38c8b6
Fixed encoding guessing: only search for meta tags in HTML bodies (#4566) 2022-03-17 14:25:26 +00:00
Maximilian Hils
a9283befad
improve self-connect error message (#5192) 2022-03-17 14:24:42 +00:00
EndUser509
3a5550a09c
Rotate stream files (#5097)
* Example addon for saving streamed data including a small bug fix to make it work.

* Revert "Example addon for saving streamed data including a small bug fix to make it work."

This reverts commit 02ab78def9a52eaca1a89d0757cd9475ce250eaa.

* Add support for rotating stream files every hour or day

* Added tests

* Modified to change the stream file every time the formating string changes as time moves on.

* Update to more compact version

* simplify save addon logic

* make mypy happy

* fix compatibility with Python 3.8

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-03-17 10:41:05 +00:00
Maximilian Hils
ecd4790cbb
vendor click.style instead of depending on click (#5188)
click introduces subdependencies like colorama, this approach is much simpler.
2022-03-16 17:02:53 +00:00
Aldo Cortesi
b5abbc97e3
[requires.io] dependency update on main branch (#5189)
* [requires.io] dependency update

* [requires.io] dependency update

Co-authored-by: requires.io <support@requires.io>
2022-03-16 17:16:40 +01:00
Maximilian Hils
e2f42ddb30
exit for all tools on startup error, fix #4544 (#5187) 2022-03-16 13:23:32 +00:00
Maximilian Hils
148429c0b3
lowercase user-added HTTP/2 headers, fix #4746 (#5186) 2022-03-16 10:59:30 +01:00
Maximilian Hils
6f0587734e
Refactor how we process --set options (#5067)
* refactor how we process `--set` options

* minor improvements based on @marwinxxii's review

* fix nits

* update changelog
2022-03-16 07:33:30 +00:00
Alexander Prinzhorn
8e1adbc5df
Add WebSocketMessage.injected flag (#5105)
* Add WebSocketMessage.injected flag

* add flow format migration

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-03-16 07:10:23 +00:00
Eldad Marciano
cba67aa94c
an ntlm upstream addon for http \ https (#5100)
* an ntlm upstream addon for http \ https

Ntlm upstream proxy for http https all http methods

* fix filename

* lint!

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-03-15 20:44:09 +00:00
Vinayak Khandelwal
3d5f6da048
ISSUE_5068 (#5161)
* changes for custom port number

* indent correction

* test coverage

* coverage correction

* simplify LDAP auth

* make mypy hapy

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-03-15 20:39:38 +00:00
EndUser509
a0cf273484
Merge pull request #5099 from EndUser509/save_streamed_data2
Save streamed data
2022-03-15 21:34:49 +01:00
Maximilian Hils
6ec97d0b8e fix compatibility with Python 3.8 2022-03-15 21:02:35 +01:00