Commit Graph

10739 Commits

Author SHA1 Message Date
Maximilian Hils
c46af057de
Use upstream urwid again (#6929)
use upstream urwid again
2024-06-14 17:43:21 +00:00
Maximilian Hils
87d5abd2b0
web: Upgrade Redux (#6926)
* update redux and fix resulting test and type failures
* update prettier
2024-06-14 00:27:33 +02:00
Maximilian Hils
e5c1ab0135
Update CHANGELOG.md 2024-06-14 00:08:16 +02:00
Andras Spitzer
bde577aabc
fix zstd decompression (#6921)
* fix zstd decompression (issue #6914)

* add our fix to CHANGELOG

* add explicit read_across_frames=True + move zstd test to test_encoding.py

---------

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2024-06-13 09:23:33 +00:00
Maximilian Hils
249eb8c735
release script: add one less newline 2024-06-13 11:19:23 +02:00
mitmproxy release bot
da05700b9a reopen main for development 2024-06-12 22:56:11 +00:00
mitmproxy release bot
719cb1449c mitmproxy 10.3.1 2024-06-12 22:56:10 +00:00
Maximilian Hils
832e735b0a
Fix clipboard handling in safari (#6917)
* fix clipboard handling in safari

closes #6911, #6909

Co-authored-by: Can Yesilyurt <36952967+canyesilyurt@users.noreply.github.com>

* [autofix.ci] apply automated fixes

* update dependencies

---------

Co-authored-by: Can Yesilyurt <36952967+canyesilyurt@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-06-12 14:59:40 +02:00
Maximilian Hils
40ae9ff05b
Update package-lock.json, bump esbuild (#6915)
update node version, bump esbuild
2024-06-12 11:44:25 +00:00
Maximilian Hils
460789b7be
Autofix generated JS files and do not patch them in tests (#6910)
* autofix generated JS files and do not patch them in tests

* autofix: setup python

* [autofix.ci] apply automated fixes

* autofix: setup node

* add missing newline

* fixup

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-06-12 01:25:46 +02:00
Maximilian Hils
968a169077
Update CHANGELOG.md 2024-06-11 15:02:28 +02:00
Gaurav Jain
fa8b8998d7
Update strip_ech addon to use the new DNS HTTPS records API (#6905)
* Update and rename strip_ech addon to use new DNS HTTPS records API

* Update CHANGELOG.md

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-06-09 20:26:26 +00:00
Gaurav Jain
03c8db88bb
Allow parsing of HTTPS record from DNS RDATA (#6884)
* Unpack HTTPS DNS record data

* Fix linting issues

* Add entry to CHANGELOG.md

* [autofix.ci] apply automated fixes

* Reorder functions

* [autofix.ci] apply automated fixes

* Rename private methods

* Use Enum to store constants

* Restructure constants

* Handle errors

* Use dataclasses to represent HTTPS records

* [autofix.ci] apply automated fixes

* Fix mypy errors

* [autofix.ci] apply automated fixes

* Allow packing of HTTPSRecords to its byte format

* Add tests for https_record

* [autofix.ci] apply automated fixes

* Rename https_record to https_records

* [autofix.ci] apply automated fixes

* Increase test coverage

* [autofix.ci] apply automated fixes

* Increase test coverage

* [autofix.ci] apply automated fixes

* Increase test coverage

* [autofix.ci] apply automated fixes

* Add comments

* Restructure HTTPS record API

* [autofix.ci] apply automated fixes

* Remove  from public API

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-06-09 19:56:21 +00:00
dependabot[bot]
bd39c7b96f
Bump install-pinned/ruff from f8793aa7caf0b3196d6ed1370aea45f3c06304a3 to f91b0bd5d5680f7ecf60fcd37860121a4b6dadf5 in the github-actions group (#6890)
Bump install-pinned/ruff in the github-actions group

Bumps the github-actions group with 1 update: [install-pinned/ruff](https://github.com/install-pinned/ruff).


Updates `install-pinned/ruff` from f8793aa7caf0b3196d6ed1370aea45f3c06304a3 to f91b0bd5d5680f7ecf60fcd37860121a4b6dadf5
- [Release notes](https://github.com/install-pinned/ruff/releases)
- [Commits](f8793aa7ca...f91b0bd5d5)

---
updated-dependencies:
- dependency-name: install-pinned/ruff
  dependency-type: direct:production
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-02 07:44:33 -05:00
dependabot[bot]
9642c1a73e
Update types-requests requirement from <=2.32.0.20240521,>=2.31.0.10 to >=2.31.0.10,<=2.32.0.20240523 in the mypy group (#6892)
Update types-requests requirement in the mypy group

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:production
  dependency-group: mypy
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-02 07:43:59 -05:00
dependabot[bot]
556caafdd1
Update requests requirement from <=2.32.2,>=2.9.1 to >=2.9.1,<=2.32.3 (#6893)
Updates the requirements on [requests](https://github.com/psf/requests) to permit the latest version.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.9.1...v2.32.3)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-02 07:43:46 -05:00
dependabot[bot]
8ec2815fa5
Update ruff requirement from <=0.4.4,>=0.4.1 to >=0.4.1,<=0.4.7 (#6894)
Updates the requirements on [ruff](https://github.com/astral-sh/ruff) to permit the latest version.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.4.1...v0.4.7)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-02 07:43:31 -05:00
dependabot[bot]
310bac7315
Update protobuf requirement from <=5.26.1,>=3.14 to >=3.14,<=5.27.0 (#6895)
Updates the requirements on [protobuf](https://github.com/protocolbuffers/protobuf) to permit the latest version.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.14.0...v5.27.0)

---
updated-dependencies:
- dependency-name: protobuf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-02 07:43:16 -05:00
Gaurav Jain
de871df53b
Add blockech addon (#6876)
* Add blockech addon

* Update CHANGELOG.md

* [autofix.ci] apply automated fixes

* Add tests

* [autofix.ci] apply automated fixes

* Fix tests

* Add suggested changes

* [autofix.ci] apply automated fixes

* rephrase changelog to be more user-centric

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2024-05-28 18:10:46 +02:00
Orhan Kavrakoğlu
8cf0cca702
Fix slowdown when sending large data over HTTP/2 (#6873) (#6875)
* Do not mutate data when splitting into chunks (#6873)

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-05-25 16:13:17 +02:00
dependabot[bot]
552c320fad
Update requests requirement from <=2.32.1,>=2.9.1 to >=2.9.1,<=2.32.2 (#6865)
---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-22 00:36:10 +00:00
Maximilian Hils
215dfea515
Skip proxyauth on client replay, fix #6836 (#6866)
* skip proxyauth on client replay, fix #6836

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-05-22 00:31:48 +00:00
dependabot[bot]
ae56c9e488
Update pyinstaller requirement from <=6.6.0,>=6.6.0 to >=6.6.0,<=6.7.0 in the pyinstaller group (#6864)
* ---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  dependency-group: pyinstaller
...

Signed-off-by: dependabot[bot] <support@github.com>

* pin pyinstaller

we'd had enough fun with this over the years

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2024-05-22 00:19:19 +00:00
Maximilian Hils
59faf5a69b
pick more conservative upper version bounds for dependencies (#6862)
* enforce strict upper bounds for dependencies

going forward, we rely on dependabot to widen version ranges.

* update GHA actions (#22)

updated-dependencies:
- dependency-name: install-pinned/ruff
  dependency-type: direct:production
  dependency-group: github-actions
- dependency-name: apple-actions/import-codesign-certs
  dependency-type: direct:production
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* restrict pytest

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-22 00:09:16 +00:00
Alex Gaynor
6c6c7425dc
Temporarily prohibit pytest 8.2.1 in order to fix CI (#6858)
See https://github.com/pytest-dev/pytest/issues/12263
2024-05-20 13:20:58 +02:00
fosple
0503fbb63a
Update change_upstream_proxy.py (#6853)
Script was not working as ServerSpec accepts a tuple, which was not supplied. I fixed it so a tuple is supplied to ServerSpec
2024-05-18 12:06:48 +02:00
Alexander Prinzhorn
d6dc12c835
Update all_markers.py (#6849) 2024-05-16 14:15:55 +02:00
Maximilian Hils
f05c050f61 ci: add build provenance 2024-05-03 12:23:16 +02:00
dependabot[bot]
a609601e25
Bump the github-actions group with 2 updates (#6827)
Bumps the github-actions group with 2 updates: [install-pinned/ruff](https://github.com/install-pinned/ruff) and [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action).


Updates `install-pinned/ruff` from 8e23c2ad6e5fef4f7451bbdbc1ad068881096aeb to 50364bc42dfc4f7ed30b3a2c09a14c8c43a23bdf
- [Release notes](https://github.com/install-pinned/ruff/releases)
- [Commits](8e23c2ad6e...50364bc42d)

Updates `docker/setup-buildx-action` from 3.2.0 to 3.3.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](2b51285047...d70bba72b1)

---
updated-dependencies:
- dependency-name: install-pinned/ruff
  dependency-type: direct:production
  dependency-group: github-actions
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-02 10:00:31 +02:00
dependabot[bot]
025b9d40ce
Bump pyinstaller from 6.5.0 to 6.6.0 (#6826)
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 6.5.0 to 6.6.0.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.5.0...v6.6.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-02 10:00:00 +02:00
Alex Gaynor
30562344b4
temporarily prohibit pytest 8.2.0 in order to fix CI (#6823)
See https://github.com/pytest-dev/pytest/issues/12263
2024-04-29 13:28:51 +02:00
Alexander Prinzhorn
14d5fa0474
Update PyInstaller spec to set the u (unbuffered) flag (#6821)
* Update PyInstaller spec to set the u (unbuffered) flag
* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-28 10:25:51 +02:00
Maximilian Hils
b5574fb298
Fix program exit when n is passed (#6819)
* fix program exit when `n` is passed

fix #6818

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-24 14:14:54 +02:00
Maximilian Hils
b2298d7e99
fix CI (#6816) 2024-04-21 23:04:20 +00:00
Maximilian Hils
aedbde938a
tests: speedups, lowest-version, ... (#6812) 2024-04-21 23:44:09 +02:00
Maximilian Hils
2c96c96e75
prefix version tags with 'v' (#6810) 2024-04-19 21:28:05 +02:00
mitmproxy release bot
4d00ec03b4 reopen main for development 2024-04-17 11:31:13 +00:00
mitmproxy release bot
8ab74b4f0f mitmproxy 10.3.0 2024-04-17 11:31:13 +00:00
Maximilian Hils
3c1727d0d9 fix hypothesis being flaky 2024-04-17 12:51:20 +02:00
Maximilian Hils
f997cd3a21
add server_connect_error hook (#6806)
* Add server connection error hook

* Add new hook to api-events doc

* Rename and add test

* Forgot to commit

* Small fix

* [autofix.ci] apply automated fixes

* fixed test_server.py

* fixed 'Import block is un-sorted or un-formatted'

* [autofix.ci] apply automated fixes

* test++, doc++

* add CHANGELOG entry

* [autofix.ci] apply automated fixes

* fix authors

* fix test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: haanhvu <haanh6594@gmail.com>
Co-authored-by: spacewasp <spacewasp1982@gmail.com>
2024-04-17 12:47:06 +02:00
Maximilian Hils
b858a826bf
Add codecov token (#6797)
add codecov token
2024-04-12 15:26:23 +00:00
Maximilian Hils
bfbd777cbb
Fix certs for unicode domains (#6796)
* fix certs for unicode domains

fix #6729

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-12 17:22:19 +02:00
Maximilian Hils
61b094ac36
fix race in websocket broadcaster (#6795) 2024-04-12 16:16:25 +02:00
Maximilian Hils
00d6c88af5 docs: fix #6750 2024-04-12 15:55:45 +02:00
Maximilian Hils
11a086805c
fix cryptography DeprecationWarning (#6790)
* fix cryptography DeprecationWarning

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-09 10:14:52 +02:00
txrp0x9
1b44691d33
Fix saving of websocket flows (#6767)
* fix websocket message saving

* [autofix.ci] apply automated fixes

* added websocket as a supported format to export command, with tests for the same

* [autofix.ci] apply automated fixes

* added websocket message serialization in raw export, with test coverage

* [autofix.ci] apply automated fixes

* code suggestion fixes

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

* [autofix.ci] apply automated fixes

* suggestion fixes

* fix merged code

* added tests for websocket export and cut.save

* [autofix.ci] apply automated fixes

* fix tests and add changes to changelog

* fix tests and add changes to changelog

* fix changelog

* fix changelog

* changelog addition

* changelog revert

* test fix

* [autofix.ci] apply automated fixes

* more test coverage

* [autofix.ci] apply automated fixes

* add changes to changelog

* add more test coverage

* [autofix.ci] apply automated fixes

* simplify

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2024-04-04 19:07:20 +00:00
Changsin
8cf0cba1cb
Setting SIG_IGN for SIGPIPE errors (#6764)
* Setting SIG_IGN for SIGPIPE errors

    The issue was reported in https://github.com/mitmproxy/mitmproxy/issues/6744

    Problem description:
    When there is a sudden surge of requests, mitmproxy will hit SIGPIPE (broken pipe) errors because it was trying to write to a closed socket. The stacktrace is:
    File "asyncio/runners.py", line 44, in run
    File "asyncio/base_events.py", line 636, in run_until_complete
    File "asyncio/base_events.py", line 603, in run_forever
    File "asyncio/base_events.py", line 1909, in _run_once
    File "asyncio/events.py", line 80, in _run
    File "mitmproxy/proxy/server.py", line 294, in handle_connection
    File "mitmproxy/proxy/server.py", line 407, in server_event
    File "asyncio/streams.py", line 325, in write
    File "asyncio/selector_events.py", line 924, in write

    When this happens, the process terminates unless handled
    The fix will allow the process to continue to run.

* add changelog entry

* [autofix.ci] apply automated fixes

* Handling SIGPIPE only in non-Windows platforms

* [autofix.ci] apply automated fixes

* nit: make check platform-agnostic

---------

Co-authored-by: changsin <changsin@strac.io>
Co-authored-by: Maximilian Hils <github@maximilianhils.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-03 14:17:56 +00:00
winy
ccf45a92e4
Add hex editor for non text files (#6768)
* add hex editor for non text files

* update changelog

* [autofix.ci] apply automated fixes

* fix failing text

* fix tests

* fix lint

* [autofix.ci] apply automated fixes

* Update test/mitmproxy/tools/console/test_master.py

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

* Update test/mitmproxy/tools/console/test_master.py

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

* a few changes

* fix tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2024-04-02 13:19:01 +02:00
dependabot[bot]
174253b79b
Update pytest-cov requirement from <4.2,>=2.7.1 to >=2.7.1,<5.1 (#6777)
Updates the requirements on [pytest-cov](https://github.com/pytest-dev/pytest-cov) to permit the latest version.
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.7.1...v5.0.0)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 23:08:58 +00:00
dependabot[bot]
043f8544a3
Bump pyinstaller from 6.4.0 to 6.5.0 (#6775)
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.4.0...v6.5.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 23:01:45 +00:00