Firefox's extension API can make a proxy decision for an individual request. When the request has valid tab attribution, an extension can compare its tab ID with the tab the user selected.

For an existing Firefox extension background script, the routing fragment can be:

browser.proxy.onRequest.addListener(details => {
  if (details.tabId === selectedTabId) {
    return {type: 'http', host: 'proxy.example', port: 8080};
  }
  return {type: 'direct'};
}, {urls: ['<all_urls>']});

The extension supplies selectedTabId from its own user-selection logic. Its HTTP host and integer port may come from the HTTP proxy list for a permitted public-tab test. It needs the proxy permission and host permissions covering the filtered URLs.

This differs from a PAC script, whose standard URL-and-host decision does not identify a browser tab. It also differs from changing Firefox's global manual proxy while another tab is loading.

Account for the underlying browser configuration: ProxyInfo's direct value does not override a user-configured proxy. Check the base policy and fallback behavior rather than promising that every unmatched request goes directly.

Some traffic lacks reliable tab information, and Mozilla documents inaccurate attribution for HTTP/3 proxy connections. This illustrates request routing, not a guarantee that every connection associated with a browsing task is isolated by tab. Extension-specific container routing is another model to evaluate.

Allakkat attuumassuteqartut