Commit graph

735 commits

Author SHA1 Message Date
Daniel Karandikar
746537e051
Add option to return various status codes rather than killing during server replay (#6465)
#### Description

Designed to satisfy the requirements of
https://github.com/mitmproxy/mitmproxy/issues/3489

Add `server_replay_404_extra` which behaves similarly to the kill flag,
but returns 404 responses rather than killing

#### Checklist

 - [x] I have updated tests where applicable.
 - [x] I have added an entry to the CHANGELOG.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-11-08 11:12:44 +01:00
Maximilian Hils
e6f8f088d9
Strip double slash from websocket URL, fix #6452 (#6454)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-11-04 11:00:22 +00:00
Dave T
e98cf20b28
Make mitmweb use relative paths to connect to its resources. (#6411)
* Use relative paths in index.html

* Allow relative paths in websocket.tsx

* [autofix.ci] apply automated fixes

* Replace more root-relative URLs with relative URLs

* Add test for root relative URLs in index.html

* [autofix.ci] apply automated fixes

* Update changelog

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-10-19 14:10:26 -07:00
Stanley Good
bdcd3e3192
add save HAR addon (#6368)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2023-09-24 13:51:22 +00:00
Maximilian Hils
47aaec4f74
Improve raw QUIC dumping (#6287)
* improve raw QUIC dumping

* tests++
2023-08-01 12:13:48 +02:00
Maximilian Hils
82b3d00f01 web: add version column to flow table 2023-06-25 22:29:38 +02:00
Maximilian Hils
dc99a65a6c un-prettify autogenerated PEG grammars 2023-06-25 22:29:38 +02:00
Mike-Ki-ASD
492f98d0d3
Support for selecting an elliptic curve for key exchange (#6170)
* Added option to specify an elliptic curve for key exchange between mitmproxy <-> server

* Description of changes

* Added link to pull request to CHANGELOG

* The
et/tls.py is now only dependend on their arguments and the option tls_ecdh_curve (renamed from curve) is now accessed in tlsconfig.py.

* nits

---------

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2023-06-14 10:08:20 +00:00
y52en
e0b6734ed5
Fixed auto scroll in mitmweb (#6038)
Co-authored-by: y52en <email@example.com>
2023-04-01 13:29:44 +02:00
Alexander Prinzhorn
8e7564e995
Add a prettier npm script (#5986)
* Add a prettier npm script

* Linting -> Formatting
2023-03-13 12:26:30 +01:00
Alex Gershberg
8f13293771
Add prettier to mitmweb (#5985)
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-03-12 17:50:15 +01:00
Maximilian Hils
f9d808562d add option to disable HTTP/3 2023-03-05 19:55:24 +01:00
Przemysław Dąbek
d9bdaa060a
Update links to mitmweb issue (#5952)
Replace: https://github.com/mitmproxy/mitmweb/issues/10
with: https://github.com/mitmproxy/mitmproxy/issues/3609
2023-02-27 13:42:47 +01:00
James O'Claire
01c1090ec1
Was pointing to issue on archived mitmweb issue, instead point to active mitmproxy issue (#5951) 2023-02-25 10:29:26 +01:00
Sujal Singh
e3a7941913
add delete shortcut to delete flows in mitmweb (#5896) 2023-01-30 13:59:21 +01:00
Maximilian Hils
8b74cbed72
Merge pull request #5435 from meitinger/quic
Add QUIC support.
2022-11-28 18:58:13 +01:00
Maximilian Hils
9a41fe08eb display quic as such in the ui 2022-11-28 18:51:23 +01:00
Maximilian Hils
e20aec75b0
fix #5764 (#5766) 2022-11-28 11:06:00 +00:00
Manuel Meitinger
75504e38a2 Merge remote-tracking branch 'upstream/main' into quic 2022-11-18 21:44:18 +01:00
Aldo Cortesi
0bbb0215c1
more mypy (#5724)
Co-authored-by: requires.io <support@requires.io>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-11-13 18:04:34 +00:00
Manuel Meitinger
07fe8b4f20 Merge remote-tracking branch 'upstream/main' into quic 2022-10-28 02:14:33 +02:00
Maximilian Hils
7d46cef1f3
Merge pull request #5684 from mhils/misc
Update protocol docs + nits
2022-10-26 19:38:46 +02:00
Maximilian Hils
9580c57403 [web] improve udp timestamps 2022-10-26 18:50:09 +02:00
Maximilian Hils
5121eb49af
[web] don't crash when server has disappeared, fix #5677 (#5683) 2022-10-26 18:47:09 +02:00
Manuel Meitinger
78f95b6a31 Merge remote-tracking branch 'upstream/main' into quic 2022-10-24 02:03:14 +02:00
Maximilian Hils
ca74a2a9cb
Merge pull request #5661 from mhils/vscroll
fix vScroll calcuation, refs #5658
2022-10-20 14:47:11 +02:00
Maximilian Hils
bd0c134aef flowtable: fix viewportTop calculation
Co-authored-by: liushuyi.sputnik <liushuyi.sputnik@bytedance.com>
2022-10-20 14:37:22 +02:00
Maximilian Hils
46aa7ae74c flowtable: make sure rows are rendered on startup 2022-10-20 13:38:09 +02:00
Jay Malhotra
0bd36e7313
Add content view syntax highlighting for JSON and msgpack (#5648)
* feat(contentview): add json syntax highlighting

* feat(contentview): add msgpack syntax highlighting

* fix(contentview): address pipeline failures

* feat(contentview): switch to pygment-like token names

* feat(mitmproxy): update cli syntax highlighting

* refactor: respond to review comments

* nits

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2022-10-19 21:51:03 +00:00
Maximilian Hils
3dffdc2261 fix vScroll calcuation, refs #5658 2022-10-19 21:08:24 +02:00
Marcus Vogel
42df073f7e
Save filtered button (#5531)
* Add "Save filtered" to mitmweb (backend: optional arg + js: added handler)
Use conexts in backend instead of manually closing (breaks on exceptions)
Transfer dumps gzipped instead of plain for speedup
Change Save... to Save, as there is no ...

* Add changelog
Add test

* Remove overly complicated flow dispatching for basic link functionality
Remove force gzip

* Run npm test -- -u to update jest
Throw error on invalid filter

* Add error 400 test

* Create test with invalid regex that actually fails.

* Add changelog entry

Co-authored-by: Markus Vogl <markus.vogl@datavisyn.io>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2022-10-19 20:26:44 +02:00
Maximilian Hils
0d59b57791 nits 2022-10-13 17:50:01 +02:00
Maximilian Hils
52f303c636 fix nits 2022-09-19 17:10:31 +02:00
Maximilian Hils
3212c3f9ec WireGuard: Show QR Code (#5591)
* fixup wireguard config

* mitmweb: add WireGuard QR code
2022-09-19 17:08:07 +02:00
shuyiLiu
3ccfad1896
fix issue #5198: mitmWeb crash (#5507)
* fix issue #5198: mitmWeb crash

* fix mitmWeb crash

* test cases

* fix test cases

* fix mistake

* update snapshots

* why line221 not covered by test?

Co-authored-by: liushuyi.sputnik <liushuyi.sputnik@bytedance.com>
2022-09-09 17:27:25 +02:00
sanlengjingvv
9223c178c9
Make mitmweb use option "content_view_lines_cutoff" (#5548) 2022-09-09 17:20:30 +02:00
Maximilian Hils
bfea2f27ce update test resources 2022-09-07 13:56:34 +02:00
Maximilian Hils
0ce20c55a2 fix web tests 2022-08-28 01:36:45 +02:00
Maximilian Hils
928094c916 improve signal handling 2022-08-27 19:22:38 +02:00
Maximilian Hils
0b7ad85377 [web] add capture setup screen 2022-08-25 21:38:49 +02:00
Maximilian Hils
ee14373770 [web] add /state API endpoint
This endpoint will be used to communicate the mitmproxy server state that is
not part of flows/eventlog/options. As a first use case, we now transmit the
state of all proxy server instances.
2022-08-25 21:38:49 +02:00
Manuel Meitinger
cd4a74fae7
Add support for raw UDP. (#5414) 2022-07-27 02:20:30 +02:00
Manuel Meitinger
6b6ec2983a
fix optional int issue (#5483) 2022-07-25 11:53:48 +02:00
Maximilian Hils
83e543c3e6 add multi proxy mode
This commit makes it possible for mitmproxy to spawn multiple
TCP/UDP proxy servers at the same time, see
https://github.com/mitmproxy/mitmproxy/discussions/5288
2022-07-21 15:24:11 +02:00
Maximilian Hils
d003038803 fix nits 2022-06-28 15:53:49 +02:00
Maximilian Hils
330243f2ab dns: improve web display, coverage++ 2022-04-24 23:09:11 +02:00
Manuel Meitinger
afdd3db07c [dns] extend filt.peg 2022-04-24 18:20:52 +02:00
Maximilian Hils
9c33870ac8 move DNS resolution into own addon, simple -> regular 2022-04-23 18:49:16 +02:00
Manuel Meitinger
976b1a5f27
Merge branch 'mitmproxy:main' into dns 2022-04-22 22:18:14 +02: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