Skip to content

Measure SDK network traffic

Install

These are the instructions to get a proxy working for gRPC / streaming. This document goes over how to make mitmproxy work for iOS Simulators:

Install mitmproxy

Bash
$ brew install mitmproxy

Install the tls certificates into the iOS Simulator

  1. Run the proxy (without the interface for now)
    Bash
    $ mitmdump
    [13:47:11.995] HTTP(S) proxy listening at *:8080.
    
  2. Modify your network settings to set up the proxy (you’ll need both HTTP and HTTPS): macOS network system settings
  3. Visit from Safari mitm.it and select the iOS certificate to download -> click “Allow” in the profile prompt. mitmproxy iOS download
  4. Go to Settings > General > VPN & Device Management > mitmproxy > Install mitmproxy iOS installation
  5. Go to Settings > General > About > Certificate Trust Settings > mitmproxy (enabled) mitmproxy iOS trust certificate

Measure network traffic

  1. Store the content of GitHub gist as measure.py file on disk.
  2. Run your app (or restart it if you had it running) and run the proxy with the provided script.
    Bash
    $ mitmdump -s measure.py --allow-hosts "api.bitdrift.io" -q
    

🎉Done!

proxy terminal output