Skip to content

Web service to manage a proxy for intercepting WebSocket traffic. For testing Ably client libraries. Ecosystems team.

License

Notifications You must be signed in to change notification settings

ably-labs/interception-proxy

Repository files navigation

Interception Proxy

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.

Requirements

  • 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

Installation

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

Commands

Setup

  • 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.

Running locally

  • npx interception-proxy: Starts the interception proxy. Use this when running in a local development environment.

Running in CI

  • npx --package interception-proxy start-service: Starts the interception proxy as a background service. Useful for CI. The script uses sudo so it’s probably not something you want to use locally.

JSON-RPC API

See docs/API.md.

Examples

Currently the best example of how to use this server is ably/ably-js#1816.

About

Web service to manage a proxy for intercepting WebSocket traffic. For testing Ably client libraries. Ecosystems team.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published