A Dart client for the mitmproxy Remote Interceptions addon.


This package enables access to all functionality provided by the mitmproxy Remote Interceptions addon, including:

  • A HTTPS-compatible proxy server provided by mitmproxy
  • Interception and modification of all HTTP(S) requests and responses
  • Dynamic interception filtering based on summarised request and response data


Quick start

  1. Familiarize yourself with mitmproxy and the mitmproxy Remote Interceptions addon.

  2. Import the package:

import 'package:mitmproxy_ri_client/mitmproxy_ri_client.dart' as mitm_ri;
  1. Now, intercept to your heart's content:
final client = await mitm_ri.Client.connect(
  // Add a header to every response.
  handleResponse: (request, response) {
    return mitm_ri.MessageSet(
      response: response!.copyWith(
        headers: {
          'X-MITM-Dart-Example': ['Hello, world!'],

Additional information

The interception flow is described in detail in the mitmproxy Remote Interceptions addon WebSocket API documentation.


A library providing a complete mitmproxy Remote Interceptions client.