mitmproxy/web
Matteo Luppi 385800f07f
web: copy request/response data to clipboard (#7352)
* create ui component for copying content

* write function to copy viewcontentdata to clipboard

* add type string to url

* call the endpoint to fetch the full content

* update snapshots

* disable button after copying text

* update changelog

* remove disable on copy button

* [autofix.ci] apply automated fixes

* disable copy button while fetching

* [autofix.ci] apply automated fixes

* adjust isFetching and isCopied position

* hide copy button if there is no content

* update snapshot

* Delete web/src/templates/index.html

* adjust naming convention

* update test

* update snapshots

* nits

* add async/await

* [autofix.ci] apply automated fixes

* improve test coverage

* improve even more test coverage

* test coverage final improvement

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2025-02-03 23:37:40 +00:00
..
gen Exposing 'localModeUnavailable' to the frontend (#7390) 2024-12-11 16:57:19 +01:00
src web: copy request/response data to clipboard (#7352) 2025-02-03 23:37:40 +00:00
.editorconfig
.prettierignore Add prettier to mitmweb (#5985) 2023-03-12 17:50:15 +01:00
README.md Update package-lock.json, bump esbuild (#6915) 2024-06-12 11:44:25 +00:00
eslint.config.mjs Adopt ESLint (#7008) 2024-07-09 11:06:05 +02:00
gulpfile.js web: remove unnecessary template copying build step (#7490) 2025-01-17 18:09:45 +01:00
jest.config.js Add prettier to mitmweb (#5985) 2023-03-12 17:50:15 +01:00
package-lock.json Update Web Dependencies (#7011) 2024-07-13 01:20:15 +02:00
package.json Update Web Dependencies (#7011) 2024-07-13 01:20:15 +02:00
tsconfig.json web: Upgrade Redux (#6926) 2024-06-14 00:27:33 +02:00

README.md

Quick Start

  • Install mitmproxy as described in ../CONTRIBUTING.md
  • Run node --version to make sure that you have at least Node.js 18 or above. If you are on Ubuntu <= 22.04, you need to upgrade.
  • Run cd mitmproxy/web to change to the directory with package.json
  • Run npm install to install dependencies
  • Run npm start to start live-compilation
  • Run mitmweb after activating your Python virtualenv (see ../CONTRIBUTING.md).

Testing

  • Run npm test to run the test suite.

Code formatting

Architecture

There are two components:

Contributing

We very much appreciate any (small) improvements to mitmweb. Please do not include the compiled assets in mitmproxy/tools/web/static in your pull request. Refreshing them on every commit would massively increase repository size. We will update these files before every release.

Developer Tools