Opened 5 months ago

Last modified 2 weeks ago

#28044 needs_review defect

Integrate Tor Launcher into tor-browser

Reported by: gk Owned by: brade
Priority: High Milestone:
Component: Applications/Tor Launcher Version:
Severity: Normal Keywords: AffectsTails, ux-team, TorBrowserTeam201903R
Cc: tbb-team, intrigeri, hefee Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by gk)

We need to move away from our XPCOM extensions, Tor Launcher being one of them. As for Tor Browser it might be hard/impossible, if we tried to reimplement everything Tor Launcher does with the WebExtensions API. Instead we plan to integrate it tighter into the browser itself making use of its capabilities.

This ticket is the parent ticket for this plan.

We need probably a proposal making sure we have the plan right before going to implement it.

Child Tickets

Change History (17)

comment:1 Changed 5 months ago by gk

FWIW: #25260 has some good historical context for options on how to integrate Tor Launcher into tor-browser. We can benefit from the work done there.

comment:2 Changed 5 months ago by antonela

Keywords: ux-team added

comment:3 Changed 4 months ago by gk

Keywords: TorBrowserTeam201811 added; TorBrowserTeam201810 removed

Moving our tickets to November.

comment:4 Changed 3 months ago by gk

Keywords: TorBrowserTeam201812 added; TorBrowserTeam201811 removed

Moving our tickets to December.

comment:5 Changed 2 months ago by gk

Keywords: TorBrowserTeam201901 added; TorBrowserTeam201812 removed

Moving tickets to Jan 2019.

comment:6 Changed 2 months ago by mcs

Cc: tbb-team added; mcs removed

Kathy and I did some research and experimentation over the past couple of days, and we believe the best approach is to:

  1. Integrate Tor Launcher directly into Tor Browser, following up on the work that Matt did here: https://github.com/sysrqb/tor-launcher/commits/bug25260_mozbuild
  2. Keep tor-launcher.git as a separate repository so that other projects such as TorBirdy can continue to package the code as an XPCOM extension.
  3. Fix other incompatibilities with the Firefox ESR68 codebase as we find them. For example, support for XUL overlays has been removed by Mozilla, so we will instead need to preprocess some of the Tor Launcher source files in order to include some shared XUL.

For 1. above we will need decide on the best way to pull the Tor Launcher code into Tor Browser. We could use a git submodule and integrate tightly with the browser build process, or we could "post process" browser/omni.ja to add the necessary Tor Launcher pieces.

A related goal will be to keep the Tor Launcher files together as much as possible within the browser package; this will make it easier for developers to drop in updated Tor Launcher files for testing (but it will never again be as easy as just copying over an .xpi file). Within browser/omni.ja, we will probably need to place files under these subdirectories:

  • defaults/preferences/
  • chrome/torlauncher/
  • components/torlauncher/

and we will need to ensure that the following manifest files are updated to register the Tor Launcher pieces:

  • chrome/chrome.manifest
  • components/components.manifest

We will also need to decide whether it is worthwhile to rename the preferences, e.g., extensions.torlauncher.loglevel could be renamed to torlauncher.loglevel

comment:7 Changed 2 months ago by gk

Sounds all good to me. As to the submodule vs. post-processing question. What are the trade-offs here?

comment:8 Changed 2 months ago by gk

Something that came to mind: we should think what to do with the Tor Network Settings... as the onion button is likely to go away during the Torbutton integration.

comment:10 Changed 6 weeks ago by gk

Keywords: TorBrowserTeam201902 added; TorBrowserTeam201901 removed

Moving tickets to February.

comment:11 Changed 6 weeks ago by hefee

Cc: hefee added

comment:12 Changed 6 weeks ago by mcs

The proposal has now been accepted and is now available in the tor-browser-spec repo:
https://gitweb.torproject.org/tor-browser-spec.git/tree/proposals/102-integrate-tor-launcher-into-tor-browser.txt

comment:13 Changed 3 weeks ago by mcs

Keywords: TorBrowserTeam201902R added; TorBrowserTeam201902 removed
Status: newneeds_review

This work is now ready for review. There are 3 Tor Launcher commits which are available on the bug28044-01 branch within the brade repo:
https://gitweb.torproject.org/user/brade/tor-launcher.git/log/?h=bug28044-01

There is one tor-browser commit:
https://gitweb.torproject.org/user/brade/tor-browser.git/commit/?h=bug28044-01&id=79f8ea9c98c69eb594e7d2aace9199b3bceb22cb

And one tor-browser-build commit:
https://gitweb.torproject.org/user/brade/tor-browser-build.git/commit/?h=bug28044-01&id=90a8ef3543cddebc2bfa946351c9eacc58641dd9

We also need to update the proposal to account for feedback we received from Tails as well as a couple of other things we learned; we will do that soon. For localization, including all of the completed translations seems to work fine. Also, we ended up keeping the pkg-prepare target in the Tor Launcher Makefile because it may be useful for TorBirdy or other projects (that Makefile is no longer used by the tor-browser-build process).

comment:14 Changed 3 weeks ago by gk

Description: modified (diff)

Nice! Have you by chance tried testing the mechanism you are using for integrating Tor Launcher into the browser in, say, some recent-ish mozilla-central build? It might be worth it in order to figure out whether we could do more work already now in case there are unanticipated problems with our migration plan for esr68.

comment:15 in reply to:  14 ; Changed 3 weeks ago by mcs

Replying to gk:

Nice! Have you by chance tried testing the mechanism you are using for integrating Tor Launcher into the browser in, say, some recent-ish mozilla-central build? It might be worth it in order to figure out whether we could do more work already now in case there are unanticipated problems with our migration plan for esr68.

We did not try the build integration, but in early January we performed an experiment in which we manually embedded Tor Launcher inside a nightly build of Firefox 66 (that is, we hacked browser/omni.ja). I do not remember everything about that experiment, but the general integration approach was successful (although #29197 needs to be fixed for Tor Launcher functionality to work fully in newer Firefox builds).

Please let us know if you want Kathy and me to do a new, more thorough experiment.

comment:16 in reply to:  15 Changed 3 weeks ago by gk

Replying to mcs:

Replying to gk:

Nice! Have you by chance tried testing the mechanism you are using for integrating Tor Launcher into the browser in, say, some recent-ish mozilla-central build? It might be worth it in order to figure out whether we could do more work already now in case there are unanticipated problems with our migration plan for esr68.

We did not try the build integration, but in early January we performed an experiment in which we manually embedded Tor Launcher inside a nightly build of Firefox 66 (that is, we hacked browser/omni.ja). I do not remember everything about that experiment, but the general integration approach was successful (although #29197 needs to be fixed for Tor Launcher functionality to work fully in newer Firefox builds).

Please let us know if you want Kathy and me to do a new, more thorough experiment.

Thanks, works for me. :)

comment:17 Changed 2 weeks ago by gk

Keywords: TorBrowserTeam201903R added; TorBrowserTeam201902R removed

February is gone.

Note: See TracTickets for help on using tickets.