Skip to content

Draft: fixup! Bug 27476: Implement about:torconnect captive portal within Tor Browser

Various design tweaks and bug-fixes:

  • about:torconnect now supports redirects via the 'redirect' search parameter; when navigating to a url before bootstrapping, the original url is passed to about:torconnet?redirect=${encodedURL}, about:torconnect stores and redirects to said location on bootstrap
  • users will be redirected to about:torconnect?redirect=${encoded(about:tor)} when visiting about:tor before bootstrap to avoid the needles red warning page
  • created a tor-styles.css to contain branding-specific css, also includes a copy of all the photon colors as only a subset of them are actually included in the firefox codebase (said said does not include the purples we need)
  • swapped out identity-icons-brand.svg with a flat colorable icon for the identity-block for nightly,alpha and official (release)
  • identity-block icon and text colors now altered: purple for release, teal for alpha, and blue for nightly; said colors are theme specific (light/default and dark)
  • the TorConnect 'state' object passed down now incldues two new flags:
    • StateChanged : set when first transitioning states so aboutTorConnect.js can focus elements properly; also set the first time about:torconnect requests state
    • Exit : renamed 'Close' flag since it's meant to signal about:torconnect should exit (either by closing, or by redirecting)
  • removed invalid showCopyLog() call and reference to non-existent quickstart variable from aboutTorConnet.js (both left over from refactor)
  • Switched 'Offline' string to 'Not Connected' in URLBar (string committed in tor-launcher already)
  • Clicking the bootstrap status field in the URLBar now opens about:torconnect in a new tab
  • Fixed URLBar css (had some incorrect margins for compact and touch uidensities)
  • removed unused image element from torconnect-urlbar.inc.xhtml
  • 'warning' message bar in about:preferences#tor switched to purple from yellow, altered icon to ordinary onion (as this message bar is meant to be informative, not scary)
  • fixed state transition bug in TorConnect.jsm; new state is set before calling the transition callbacks, old state is passed down as an argument for transitions which need to know which state we came from (fixes broken ${any-state} -> Error -> Configuring transition chain)
  • fixed #40574, all redirect scenarios are now handled by about:torconnect through the same interface in browser.js; we can now load previous session, urls from the command line, or load into our home page(s) by going through about:torconnect first (previous sessions will attempt to load cached data first, and then redirect to about:torconnect?redirect=${prevPage} once a network request is required)

Closes #40547 (closed) Closes #40567 (closed)

Edited by richard

Merge request reports