mirror of https://github.com/vee1e/mitmproxy - An interactive TLS-capable intercepting HTTP proxy for penet
Find a file
Maximilian Hils 7fdf111feb
mitmweb: Add Capture Tab (#6999)
* Squashed commit of the following:

commit 5ca998dd9ece4292407e42d6b2989703b5b0e562
Author: Matteo Luppi <100372313+lups2000@users.noreply.github.com>
Date:   Wed Jun 26 17:27:47 2024 +0200

    Sync capture tab to main (#6963)

    * Update CHANGELOG.md

    * 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>

    * Update package-lock.json, bump esbuild (#6915)

    update node version, bump esbuild

    * 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>

    * mitmproxy 10.3.1

    * reopen main for development

    * release script: add one less newline

    * 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>

    * Update CHANGELOG.md

    * web: Upgrade Redux (#6926)

    * update redux and fix resulting test and type failures
    * update prettier

    * Use upstream urwid again (#6929)

    use upstream urwid again

    * Add `HttpConnectedHook` and `HttpConnectErrorHook` (#6930)

    * Add HttpConnectedHook and HttpConnectErrorHook

    * [autofix.ci] apply automated fixes

    ---------

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

    * make DNS mode listen for both UDP and TCP (#6912)

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

    * release ci: strip "v" prefix from sigstore file

    * fix: OSError raised when ipv6 is disabled (#6942)

    the function should return None in this case

    * Update autofix action (#6946)

    update autofix action

    * Fix issue #6944: Optimize response/request_body_buf by using list of byte chunks to avoid concatenation overhead (#6952)

    * Fix the issue #6944: non-linear growth in processing time with mitmproxy regarding packet size. Replace the string (bytes) concatenation implementation of request_body_buf and response_body_buf to a list of chunk of bytes.

    * Update the CHANGELOG.md regarding issue #6944

    * [autofix.ci] apply automated fixes

    * Update CHANGELOG.md

    * [autofix.ci] apply automated fixes

    * move receivebuffer into dedicated class

    * [autofix.ci] apply automated fixes

    ---------

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    Co-authored-by: Maximilian Hils <git@maximilianhils.com>

    * Use existing API to unpack/pack domain names in HTTPS records (#6949)

    * Use existing API to unpack/pack domain names in HTTPS records

    * [autofix.ci] apply automated fixes

    * tangentially related grammar fix

    ---------

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    Co-authored-by: Maximilian Hils <github@maximilianhils.com>

    * Add support for DNS over TCP (#6935)

    * Parse DNS over TCP messages

    * [autofix.ci] apply automated fixes

    * Update _next_layer to detect DNS over TCP messages

    * [autofix.ci] apply automated fixes

    * Fixup

    * allow query pipelining

    * [autofix.ci] apply automated fixes

    * Restructure pack/unpack mechanism and update tests

    * Add tests

    * [autofix.ci] apply automated fixes

    * [autofix.ci] apply automated fixes (attempt 2/3)

    * [autofix.ci] apply automated fixes

    * [autofix.ci] apply automated fixes

    * Update next_layer test

    * Add suggested changes

    * [autofix.ci] apply automated fixes

    * bump minimum hypothesis version

    * bump hypothesis for good

    * Update CHANGELOG.md

    ---------

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    Co-authored-by: Maximilian Hils <git@maximilianhils.com>

    * web: fix "show more" button (#6958)

    fix #6951

    ---------

    Co-authored-by: Maximilian Hils <git@maximilianhils.com>
    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    Co-authored-by: Can Yesilyurt <36952967+canyesilyurt@users.noreply.github.com>
    Co-authored-by: mitmproxy release bot <noreply@mitmproxy.org>
    Co-authored-by: Andras Spitzer <sendai@swordsaint.net>
    Co-authored-by: Gaurav Jain <64748057+errorxyz@users.noreply.github.com>
    Co-authored-by: Walt Chen <godsarmycy@gmail.com>
    Co-authored-by: jackfromeast <thisiszhengyu@gmail.com>
    Co-authored-by: Maximilian Hils <github@maximilianhils.com>
    Co-authored-by: Alexander Prinzhorn <alexander@prinzhorn.it>

commit e047e76b226b335698ac1f56527558e5c9841114
Author: Matteo Luppi <100372313+lups2000@users.noreply.github.com>
Date:   Wed Jun 26 13:07:27 2024 +0200

    Feature/wireguard mode (#6959)

    * define first components

    * Update CHANGELOG.md

    * 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>

    * Update package-lock.json, bump esbuild (#6915)

    update node version, bump esbuild

    * 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>

    * define first modes components

    * adapt code to reuse checkbox component

    * mitmproxy 10.3.1

    * reopen main for development

    * [autofix.ci] apply automated fixes

    * improve mode toggle design

    * remove inline style

    * release script: add one less newline

    * 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>

    * first attempt to make the modes functional

    * [autofix.ci] apply automated fixes

    * Update CHANGELOG.md

    * web: Upgrade Redux (#6926)

    * update redux and fix resulting test and type failures
    * update prettier

    * refactor code according to review

    * [autofix.ci] apply automated fixes

    * first prototype regular mode

    * [autofix.ci] apply automated fixes

    * Use upstream urwid again (#6929)

    use upstream urwid again

    * change name regular duck

    * Add `HttpConnectedHook` and `HttpConnectErrorHook` (#6930)

    * Add HttpConnectedHook and HttpConnectErrorHook

    * [autofix.ci] apply automated fixes

    ---------

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

    * rewrite updateMode function and error handling regular mode

    * remove label component

    * add input field to local mode and fix onKeyDown issue

    * add dropdown to reverse mode

    * [autofix.ci] apply automated fixes

    * change defualt string reverse dropdown

    * add new logic to handle modes in the duck

    * add local mode with no applications

    * [autofix.ci] apply automated fixes

    * regular mode is now persistent

    * forgot recieve event in regular mode

    * join receive and update event

    * make local mode functional

    * make wireguard mode functional

    * [autofix.ci] apply automated fixes

    * make reverse mode functional

    * [autofix.ci] apply automated fixes

    * fix bug reverse mode when refreshing

    * fix bug local mode

    * [autofix.ci] apply automated fixes

    * fix old test

    * implement first tests

    * [autofix.ci] apply automated fixes

    * make DNS mode listen for both UDP and TCP (#6912)

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

    * remove wireguard and reverse modes

    * change name function to set local applications

    * remove error handling

    * remove left over

    * add some other review changes

    * [autofix.ci] apply automated fixes

    * release ci: strip "v" prefix from sigstore file

    * fix addListen Addr function

    * adjust reverse protocol attribute

    * create proper method to parse the mode

    * adjust passing applications to local mode

    * fix onKeyDown listener and add new input field to local mode

    * [autofix.ci] apply automated fixes

    * remove leftover

    * update tests

    * [autofix.ci] apply automated fixes

    * remove wireguard and reverse files

    * remove additional state local mode

    * adjust tests local mode

    * update tests local mode

    * update last tests modes

    * [autofix.ci] apply automated fixes

    * fix: OSError raised when ipv6 is disabled (#6942)

    the function should return None in this case

    * use fetchMock instead of jest.mock

    this is slightly nicer because we are testing at the application boundary

    * duck tests should use action creators and not manually construct actions

    * move toggleLocal to fetchMock

    * move updateMode and ModeState into utils

    this avoids circular imports. utils may not be the perfect place, but much better than the circular imports

    * nits

    * [autofix.ci] apply automated fixes

    * update tests regular and local mode

    * [autofix.ci] apply automated fixes

    * review changes tests

    * [autofix.ci] apply automated fixes

    * adjust parseMode issue

    * [autofix.ci] apply automated fixes

    * add first components for wireguard mode

    * fix CI

    * fix typo

    * add tests to wireguard mode

    * [autofix.ci] apply automated fixes

    ---------

    Co-authored-by: Maximilian Hils <git@maximilianhils.com>
    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    Co-authored-by: Can Yesilyurt <36952967+canyesilyurt@users.noreply.github.com>
    Co-authored-by: mitmproxy release bot <noreply@mitmproxy.org>
    Co-authored-by: Andras Spitzer <sendai@swordsaint.net>
    Co-authored-by: Gaurav Jain <64748057+errorxyz@users.noreply.github.com>
    Co-authored-by: Walt Chen <godsarmycy@gmail.com>

commit d9770ad2b1c41737119cbcea9b8dd938d9dcc421
Author: Matteo Luppi <100372313+lups2000@users.noreply.github.com>
Date:   Mon Jun 24 19:40:47 2024 +0200

    Feature/implement mvp new tab page (#6923)

commit afb22c210500a320fef8bc1bb16094a2b36c5b21
Author: Maximilian Hils <git@maximilianhils.com>
Date:   Fri Jun 21 23:09:31 2024 +0200

    Sync `capture-tab` with `main` (#6943)

    * Update CHANGELOG.md

    * 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>

    * Update package-lock.json, bump esbuild (#6915)

    update node version, bump esbuild

    * 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>

    * mitmproxy 10.3.1

    * reopen main for development

    * release script: add one less newline

    * 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>

    * Update CHANGELOG.md

    * web: Upgrade Redux (#6926)

    * update redux and fix resulting test and type failures
    * update prettier

    * Use upstream urwid again (#6929)

    use upstream urwid again

    * Add `HttpConnectedHook` and `HttpConnectErrorHook` (#6930)

    * Add HttpConnectedHook and HttpConnectErrorHook

    * [autofix.ci] apply automated fixes

    ---------

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

    * make DNS mode listen for both UDP and TCP (#6912)

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

    * release ci: strip "v" prefix from sigstore file

    * fix: OSError raised when ipv6 is disabled (#6942)

    the function should return None in this case

    * [autofix.ci] apply automated fixes

    ---------

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    Co-authored-by: Can Yesilyurt <36952967+canyesilyurt@users.noreply.github.com>
    Co-authored-by: mitmproxy release bot <noreply@mitmproxy.org>
    Co-authored-by: Andras Spitzer <sendai@swordsaint.net>
    Co-authored-by: Gaurav Jain <64748057+errorxyz@users.noreply.github.com>
    Co-authored-by: Walt Chen <godsarmycy@gmail.com>

commit d0867f66d65c0b85340518712d6ce75147be8aad
Author: Matteo Luppi <100372313+lups2000@users.noreply.github.com>
Date:   Mon Jun 10 11:27:54 2024 +0200

    Feature/add new capture tab (#6887)

    * add just the new tab to the header

    * remove header menu from capture tab

    * create context to handle the current active menu tab

    * update tests

    * remove useless comments

    * update tests to reach higher coverage

    * remove context, use props to achieve same result

    * update tests

    * [autofix.ci] apply automated fixes

    * add test for capture menu component

    * adjust changelog format

    * [autofix.ci] apply automated fixes

    * fix CHANGELOG

    ---------

    Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
    Co-authored-by: Maximilian Hils <git@maximilianhils.com>
    Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Feature/regular mode port (#6965)

* add input field with default port to regular mode

* remove useless code

* make port functional

* fix tests

* add tests regular mode

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Feature/error handling regular mode (#6972)

* first prototype error handling

* update tests , but failing

* [autofix.ci] apply automated fixes

* fix tests

* change error names

* [autofix.ci] apply automated fixes

* listen fro state updates instead of options ones

* forgot error state

* change backend config

* [autofix.ci] apply automated fixes

* Update mitmproxy/addons/proxyserver.py

* [autofix.ci] apply automated fixes

* fix tests

* change logic backend error

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <github@maximilianhils.com>

* Feature/error handling wireguard local (#6995)

* add error handling wireguard mode

* update tests wireguard mode

* add errror handling local mode and tests

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* add remianing modes message

* getMode returns if there aren't errors + update tests

* [autofix.ci] apply automated fixes

* move check inside includeModeState + tests

* remove useless checks

* modify toggle method for wireguard mode (test fails)

* fixups

* [autofix.ci] apply automated fixes

* add fetch tests

* add snapshot tests for regular mode ui

we want more of those once we have changed the structure of backendState.servers

* [autofix.ci] apply automated fixes

* nits

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>

* Web: Switch to flow list upon arrival of the first flow. (#7000)

* move active menu into redux state

this is necessary so that we can incorporate it into url state

* switch to flow list upon arrival of the first flow

* [autofix.ci] apply automated fixes

* simplify test

* update header.less

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

---------

Co-authored-by: Matteo Luppi <100372313+lups2000@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-05 20:53:14 +00:00
.github Update ruff requirement from <=0.4.7,>=0.4.1 to <=0.5.0,>=0.5.0 (#6990) 2024-07-02 12:07:47 +02:00
docs Add HttpConnectedHook and HttpConnectErrorHook (#6930) 2024-06-15 00:02:54 +05:30
examples Update change_upstream_proxy.py (#6853) 2024-05-18 12:06:48 +02:00
mitmproxy mitmweb: Add Capture Tab (#6999) 2024-07-05 20:53:14 +00:00
release fixup release script 2024-07-05 17:54:55 +02:00
test Decompress domain names in ResourceRecord data (#6954) 2024-07-05 03:19:19 +02:00
web mitmweb: Add Capture Tab (#6999) 2024-07-05 20:53:14 +00:00
.gitattributes test dumpfiles: .bin -> .mitm 2021-02-03 19:27:15 +01:00
.gitignore fix display of error messages on early shutdown (#6719) 2024-03-07 20:41:26 +00:00
CHANGELOG.md Decompress domain names in ResourceRecord data (#6954) 2024-07-05 03:19:19 +02:00
codecov.yml remove release/ from coverage 2022-07-25 01:39:04 +02:00
CONTRIBUTING.md CONTRIBUTING.md: temporarily remove --cov 2023-12-02 08:37:37 +07:00
LICENSE
MANIFEST.in
pyproject.toml Improve intercept specs with new syntax from mitmproxy_rs (#6980) 2024-07-03 15:52:38 +00:00
README.md Remove Links to Slack Workspace (#6560) 2023-12-19 12:20:43 +00:00
SECURITY.md Create SECURITY.md 2021-09-13 16:34:33 +02:00

mitmproxy

Continuous Integration Status Codacy Badge autofix.ci: enabled Coverage Status Latest Version Supported Python versions

mitmproxy is an interactive, SSL/TLS-capable intercepting proxy with a console interface for HTTP/1, HTTP/2, and WebSockets.

mitmdump is the command-line version of mitmproxy. Think tcpdump for HTTP.

mitmweb is a web-based interface for mitmproxy.

Installation

The installation instructions are here. If you want to install from source, see CONTRIBUTING.md.

Documentation & Help

General information, tutorials, and precompiled binaries can be found on the mitmproxy website.

mitmproxy.org

The documentation for mitmproxy is available on our website:

mitmproxy documentation stable mitmproxy documentation dev

If you have questions on how to use mitmproxy, please use GitHub Discussions!

mitmproxy discussions

Contributing

As an open source project, mitmproxy welcomes contributions of all forms.

Dev Guide