Container Sentry is a Firefox extension to open any URL (not just those with a specific domain) in a multi-account container. It also allows to specify regular expressions for urls which are allowed to be loaded outside a container.
This was needed because the VPN provider used by my employer opens a local html page which redirects to the authentication page. The Always in Container extension intercepts this request and breaks the context which in the end fails the logon to VPN.
The extension consists of a settings page (
src/settings/
) built with Vue.js, and
a background script (src/background/
).
The settings page allows users to define regex patterns that, when matched against a URL loaded in the browser, will open that URL in a specified
container tab. The background script listens for update events in browser tabs and performs the regex matching and opening of container tabs.
Firefox's Multi-Account Containers extension provides similar functionality out of the box, but only allows for matching URLs based on a domain. This extension allows for regex matching against the whole URL as opposed to exact matches based on domain.
This extension can be installed at addons.mozilla.org.
Development on, or building of, this extension requires Firefox, Node.js v20+, and Yarn. Older versions of Node will probably work, they just haven't been tested.
To load the extension in a development instance of Firefox with automatic reloading enabled, run:
yarn install
npm run start
To build and package the extension for distribution, run:
yarn install
npm run build
This will run a webpack build and place the output in build/webpack/
, followed by packaging the extension using web-ext
and placing output
in web-ext-artifacts/
.
This extension borrows a lot from the following extensions