Skip to content

Simplify which circuit we show in the Tor circuit panel

When we show the Tor circuit panel, we can either show:

  1. The most recent circuit that is being used for the domain of the current tab. I.e. what circuit is being used for the domain.
  2. The last circuit that was used to load a resource in the current tab. I.e. what circuit was used for the current tab.

At the moment we choose 2. The two approaches can differ in the following circumstance:

  1. Open https://en.wikipedia.org/wiki/Tor_(network).
  2. Open https://en.wikipedia.org/wiki/Tor_(network) again in another tab (or some other wikipedia page).
  3. Request a new circuit in the second tab.

With approach 1, the first tab will show the new circuit, even before there has been any remote activity on the page. With approach 2, the first tab will continue to show the old circuit until the page makes some remote request, such as hovering a link for the wikipedia preview, or refreshing the page.

Given that the Tor circuit panel only says "Circuit for wikipedia.org" and doesn't mention anything about "this tab", either approach would technically work. However, I think approach 1 would be more consistent for users and simpler to understand. @felicia and @donuts let me know what you think.

Implementation wise, it would also help simply our TorDomainIsolator code if we could drop all the browser-specific logic, and just use top-level-domains instead.

Finally, as pierov pointed out today, on android we only have one browser instance anyway, so approach 2 would not even work as intended. I got this wrong, see #43608 (comment 3183426).

/cc @pierov

Edited by henry
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information