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
lain3d
667a098002
Fix case that causes corrupt har files to be written ( #6459 )
...
#### Description
* Update savehar addon to fix creating corrupt har files caused by empty
response content
#### 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-06 07:31:28 -08:00
Maximilian Hils
4f361e4263
Rename: osproxy -> local redirector ( #6453 )
...
refs #6332
2023-11-04 10:52:18 +00:00
Maximilian Hils
c637032af8
Declare Support for Python 3.12 ( #6434 )
2023-10-31 17:57:21 +00:00
Maximilian Hils
f55ee1d44f
Migrate to ruff ( #6433 )
2023-10-31 16:03:53 +01:00
Maximilian Hils
7f18545f3c
fix connection reuse with proxyauth ( #6432 )
2023-10-31 13:17:28 +00:00
outlaws-bai
640bb5377e
fix #6426 - Optimize LDAP Proxy Auth ( #6428 )
...
* fix #6426
https://github.com/mitmproxy/mitmproxy/issues/6426
* Revert "fix #6426 "
This reverts commit 822b05b522c55a79e2de2809c49b2508f8edfd6c.
* fix # 6426 Optimize LDAP Proxy Auth
* [autofix.ci] apply automated fixes
* update CHANGELOG.md
---------
Co-authored-by: jincong.bai <jincong.bai@zatech.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-10-31 12:52:21 +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
Maximilian Hils
2667ed44f5
add DNS-over-HTTPS contentview
2023-09-30 03:08:46 +02:00
Maximilian Hils
d2136b66a0
add raw hex stream contentview
2023-09-30 03:08:46 +02:00
Maximilian Hils
c851a055c3
fix certificate generation for punycode domains, fix #6381 ( #6382 )
2023-09-24 17:55:21 +00: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
dd1ee72b21
use client.id as connection id where possible ( #6372 )
...
this fixes compatibilit with the new macOS transparent mode, where the client's peername is unspecified (which otherwise leads to duplicates)
2023-09-18 23:17:46 +00:00
Stanley Good
b3272a3757
add har support in FlowReader class ( #6335 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2023-09-18 21:05:29 +00:00
Maximilian Hils
5f24e70130
fix HAR version comparison in tests ( #6298 )
...
the tests will otherwise break once we bump the version
2023-08-04 09:00:27 +00:00
Maximilian Hils
2c32e1e586
improve how we log tracebacks ( #6295 )
...
instead of formatting the traceback on site, we not pass the exception info to the logging machinery. this allows addons to hook in and for example report to sentry.
2023-08-02 21:53:43 +00:00
Maximilian Hils
47aaec4f74
Improve raw QUIC dumping ( #6287 )
...
* improve raw QUIC dumping
* tests++
2023-08-01 12:13:48 +02:00
Arnaud Durand
d3af57f13b
Enable unsafe legacy SSL renegotiation ( #6281 )
...
* Enable unsafe legacy renegotiation
* Update CHANGELOG
* Fix missing proxy_server_context argument in test
* use pyopenssl's OP_LEGACY_SERVER_CONNECT
---------
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2023-07-29 16:39:25 +00:00
Stanley Good
eacbb25e93
ReadHAR addon ( #6283 )
...
* moved readhar to addons and adjusted tests
* fixed tests for read_har function
* Add har export addon (#6252 )
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
* fixed path issues
* added back contrib/import_har
* [autofix.ci] apply automated fixes
* fixed windows error hopefully
* [autofix.ci] apply automated fixes
* fixed ubuntu 3.10 isoformat error
* [autofix.ci] apply automated fixes
* fixed Path import
* [autofix.ci] apply automated fixes
* need to fix ubuntu 3.10 isoformat
* [autofix.ci] apply automated fixes
* replaced Z with +00:00 before isoformatting
* fixed tox lint
* moved readhar to addons and adjusted tests
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2023-07-29 18:32:23 +02:00
Stanley Good
cb1c824255
Add har export addon ( #6252 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2023-07-27 19:37:06 +00:00
Maximilian Hils
934b92a0ee
recommend port+2 instead of port+1 to avoid clashes with mitmweb ( #6221 )
...
fix #5891
2023-07-02 12:59:55 +00:00
Maximilian Hils
a1b78133b5
client replay: use correct SNI ( #6222 )
2023-07-02 12:58:08 +00:00
Pradyot Ranjan
cb131b606f
Refactored use of server-replay-nopop to server-reply-pop ( #6123 )
...
* server-replay-nopop -> server-replay-pop
Co-authored-by: Pradyot Ranjan <99216956+prady0t@users.noreply.github.com>
* server-replay-pop -> server-replay-reuse
---------
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2023-07-02 11:32:18 +00:00
Maximilian Hils
06ba039e4f
udp: listen on both ipv4 and ipv6 by default ( #6206 )
...
* udp: listen on both ipv4 and ipv6 by default
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-06-27 08:02:23 +00:00
Maximilian Hils
ff0155b1f7
temporarily disable half-broken HTTP/3 modes ( #6203 )
...
those will come back after shipping a reverse-proxy MVP
2023-06-27 07:57:03 +00:00
Maximilian Hils
038512bada
Always include either SNI or target IP address as SAN ( #6202 )
...
* always include either SNI or target IP address as SAN
this unbreaks reverse proxy setups that are directly addressed by IP.
* [autofix.ci] apply automated fixes
* fix test
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-06-26 02:35:50 +02:00
Maximilian Hils
e71a7661b2
do not crash on invalid quic headers ( #6200 )
...
refs #6199
2023-06-25 20:28:55 +00: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
Maximilian Hils
e0e46f453c
re-use SNI in reverse proxy mode if the original connection was torn down ( #6148 )
...
fix #6143
2023-05-28 16:35:34 +00:00
Maximilian Hils
8757757892
improve ux when errors are logged during startup, fix #5935 ( #6020 )
2023-03-26 18:14:57 +00:00
Maximilian Hils
555a2d2199
disallow bare except statements ( #6017 )
2023-03-26 13:57:48 +00: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
ed740e72bf
fix Python 3.10 compat
2023-03-05 23:33:03 +01:00
Maximilian Hils
f9d808562d
add option to disable HTTP/3
2023-03-05 19:55:24 +01:00
Maximilian Hils
edb85d4af1
refactor NextLayer addon
2023-03-05 19:55:24 +01:00
Maximilian Hils
524adbf950
Revert "add MaybeClientTLSLayer"
...
This reverts commit e7b0e3f351686c2ef5f1daa13365216b775eefb3.
2023-03-05 19:55:24 +01:00
Maximilian Hils
0583e8e46c
add MaybeClientTLSLayer
2023-03-05 19:55:24 +01:00
Maximilian Hils
262cadab75
is_[d]tls_record -> starts_like_[d]tls_record
2023-03-05 19:55:24 +01:00
autofix-ci[bot]
51670861e6
[autofix.ci] apply automated fixes
2023-02-27 08:37:11 +01:00
WenzelTian
5259d1e31a
add the architecture determination when running the wireguard test ( #5953 )
2023-02-26 15:25:10 +01:00
Maximilian Hils
244ff35e60
fix usage of asyncio.create_task ( #5928 )
...
this fixes #5926
2023-02-13 21:45:02 +00:00
Pradyot Ranjan
41555edab9
Reformatted list ( #5919 )
...
* Reformatted list
* [autofix.ci] apply automated fixes
* Reformatted list
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-02-09 11:38:27 +01:00
Maximilian Hils
7da3a8e871
treat multipart as bytes, not str. fixes #5148 ( #5917 )
2023-02-07 10:29:08 +00:00
Sujal Singh
b9f3574728
fix Host and :authority header not being updated on changes to host or port ( #5908 )
...
* fix map remote addon not setting `Host` header correctly
* fix failing tests
* fix coverage
* fix host and authority headers
* raise error when port is not of type int
* fix nits
* [autofix.ci] apply automated fixes
* coverage++
---------
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-02-06 17:35:16 +01:00
Maximilian Hils
54185c2c8d
Add experimental Windows OS proxy mode ( #5912 )
...
* add experimental Windows OS proxy mode
this is merely a proof-of-concept now, but works under the most ideal circumstances.
2023-02-06 17:34:48 +01:00
dependabot[bot]
dfeddcf4ad
Bump install-pinned/black from 9101a4d68e870eaaaae21c412d1d879b93c9afcb to 13c8a20eb904ba800c87f0b34ccfd932ac2ff81d ( #5899 )
...
* Bump install-pinned/black
Bumps [install-pinned/black](https://github.com/install-pinned/black ) from 9101a4d68e870eaaaae21c412d1d879b93c9afcb to 13c8a20eb904ba800c87f0b34ccfd932ac2ff81d.
- [Release notes](https://github.com/install-pinned/black/releases )
- [Commits](9101a4d68e...13c8a20eb9 )
---
updated-dependencies:
- dependency-name: install-pinned/black
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* [autofix.ci] apply automated fixes
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-02-01 23:08:09 +00:00
Sujal Singh
89d688e9fc
temporary fix for unhandled AlternativeServiceAvailable event ( #5898 )
...
* temporary fix for unhandled AlternativeServiceAvailable event
* [autofix.ci] apply automated fixes
* better log message for AlternativeServiceAvailable service
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-02-01 18:05:09 +01:00
stephenspol
849a3c33cb
Removed escaping string to get real raw view ( #5894 )
...
* Removed escaping string to get real raw view
* [autofix.ci] apply automated fixes
* Updated changelog
* extend tests
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2023-01-29 10:56:39 +00:00
Bernhard M. Wiedemann
d06afcc1f9
Fix tests after 2037 ( #5852 )
...
Background:
As part of my work on reproducible builds for openSUSE, I check that software still gives identical build results in the future.
The usual offset is +16 years, because that is how long I expect some software will be used in some places.
This showed up failing tests in our package build.
See https://reproducible-builds.org/ for why this matters.
2023-01-06 22:37:55 +01:00
Igor Talankin
385633874c
Added a command for appending flows to server replay list ( #5851 )
...
* Added a command to append flows to replay server list
* Added changelog entry for `replay.server.add`
* Update CHANGELOG.md
Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2023-01-06 15:49:54 +00:00