Web service to create proxies for intercepting and manipulating WebSocket traffic between an Ably client library and the Realtime service. Very much a prototype and a work in progress (see the abundant TODOs in the code). The motivation for this work is currently best described by this internal RFC.
- Node LTS — I tested on 20
- Python 3.x — I tested on 3.12.4
- mitmproxy (PyPi) — I tested on 10.3.1
- websockets (PyPi) — I tested on 12.0
There are currently no NPM releases of this package, so you’ll need to install it directly from the Git repo:
npm install https://github.com/ably-labs/interception-proxy
npx --package interception-proxy generate-mitmproxy-certs
: Generates the mitmproxy TLS certificate, so that you can add it to the trust store used by the process under test.
npx interception-proxy
: Starts the interception proxy. Use this when running in a local development environment.
npx --package interception-proxy start-service
: Starts the interception proxy as a background service. Useful for CI. The script usessudo
so it’s probably not something you want to use locally.
See docs/API.md
.
Currently the best example of how to use this server is ably/ably-js#1816.