Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

italankin/mitmproxy-addons

Repository files navigation

mitmproxy-addons

Some addons which can be used for developing and testing client-server applications.

Usage

Run mitmproxy with one or more addons:

$ mitmproxy \
 -s replayserverex.py \
 -s sleeper.py

Or while running:

: set scripts=replayserverex.py

Or via config.yaml:

scripts: [
 '~/mitmproxy-addons/offline.py',
 '~/mitmproxy-addons/sleeper.py'
]

Addons

Extensions for built in ServerPlayback addon.

Commands:

  • replay.server.file.add - add flows to server playback from file
  • replay.server.list - show server playback buffer

This addon allows to add a filter and for any flow matching it status code and contents of the response will be replaced.

For example, to replace any response from google.com with a status code of 200 and contents from response.json:

: replay.server.matchers.add google.com 200 response.json

Commands:

  • replay.server.matchers.add - add a matcher for server playback
  • replay.server.matchers.clear - clear all matchers
  • replay.server.matchers.list - show matchers list

Adds a delay before sending a request.

Options:

  • sleep - delay client requests by this amount of time (milliseconds)
  • sleep_filter - delay only flows which match the filter

Simulate offline mode by killing all (or matching a filter) requests.

Options:

  • offline - kill all flows
  • offline_filter - kill only flows matching the filter

About

Probably useful mitmproxy addons

Topics

Resources

License

Stars

Watchers

Forks

Languages

AltStyle によって変換されたページ (->オリジナル) /