Skip to content

Impairing a Browser Tab

A browser’s own network throttling has no effect on WebTransport. With moqtap intercept --bridge running, the WebTransport Inspector extension sends a tab’s WebTransport sessions through the CLI, on an impaired link, without any change to the page or its player.

Terminal window
# only the browser's sessions
moqtap intercept --bridge
# with a relay, the -u listener runs as well
moqtap intercept -u moqt://relay.example.com --bridge

A relay from MOQTAP_RELAY or .moqtap.toml starts the -u listener too, as it does without --bridge. The CLI prints its identity when it starts. moqtap cert shows the same identity at any time.

  1. Open DevTools on the page and go to the WebTransport Inspector panel.
  2. Click Impairment at the top of the panel.
  3. Check that the identity shown matches the one the CLI printed, then click Allow.

You allow a CLI once. A CLI with a different identity asks again. The extension’s options list the CLIs you have allowed, and you can remove them there.

Under Profile for this tab, pick Offline, 3G or 4G. The panel header shows the profile in use.

  • The profile applies to the inspected tab only. Other tabs can use other profiles, or none.
  • Every WebTransport session the tab opens goes through the CLI, including sessions opened by workers. Each session gets its own link: five sessions at 3G each get a 3G link.
  • Picking another profile switches the tab’s running sessions at once.
  • The profile stays with the tab across reloads and navigations until the tab closes.
  • The page keeps its relay URL, its WebTransport protocols and its serverCertificateHashes. The inspector shows each session under the URL the page opened.

Off removes the impairment. Sessions already going through the CLI keep running, unimpaired; sessions opened after that connect directly.

A session that was already open when you picked a profile cannot be moved to the CLI. The panel marks it as not impaired. Reload the page to impair it.

A page served from a public site reaches the CLI on your own machine. The browser asks whether the site may access devices on your local network. Allow it, then reload the page. If the permission was refused, the panel says so.

A page whose Content Security Policy sets connect-src needs https://127.0.0.1:* in it.

A session the CLI cannot carry fails rather than connecting directly, and the panel says what to do, such as checking the terminal running the CLI and reloading. A worker the extension cannot instrument, for example because the page’s worker-src does not allow blob:, connects directly, and the panel says so.

Off, Offline, 3G and 4G are free and need no sign-in. The dialog lists the profiles your moqtap account can use. More profiles with Pro leads to the plans that offer more.

For a scripted run against a client you control, see Scenario files.