Opened 14 months ago

Closed 7 months ago

Last modified 2 months ago

#28044 closed defect (fixed)

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, TorBrowserTeam201905R, tbb-no-uplift
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 (23)

comment:1 Changed 14 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 14 months ago by antonela

Keywords: ux-team added

comment:3 Changed 13 months ago by gk

Keywords: TorBrowserTeam201811 added; TorBrowserTeam201810 removed

Moving our tickets to November.

comment:4 Changed 12 months ago by gk

Keywords: TorBrowserTeam201812 added; TorBrowserTeam201811 removed

Moving our tickets to December.

comment:5 Changed 11 months ago by gk

Keywords: TorBrowserTeam201901 added; TorBrowserTeam201812 removed

Moving tickets to Jan 2019.

comment:6 Changed 11 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 11 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 11 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 10 months ago by gk

Keywords: TorBrowserTeam201902 added; TorBrowserTeam201901 removed

Moving tickets to February.

comment:11 Changed 10 months ago by hefee

Cc: hefee added

comment:12 Changed 10 months 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 10 months 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 10 months 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 10 months 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 10 months 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 9 months ago by gk

Keywords: TorBrowserTeam201903R added; TorBrowserTeam201902R removed

February is gone.

comment:18 Changed 9 months ago by gk

Keywords: TorBrowserTeam201904R added; TorBrowserTeam201903R removed

Moving review tickets to April.

comment:19 Changed 7 months ago by gk

Keywords: TorBrowserTeam201905R added; TorBrowserTeam201904R removed

No April anymore, moving review tickets to May.

comment:20 in reply to:  13 ; Changed 7 months ago by gk

Keywords: TorBrowserTeam201905 added; TorBrowserTeam201905R removed
Status: needs_reviewneeds_revision

Replying to mcs:

Okay, 9.0a1 is on the horizon.

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

b7e7058359b402e9f37e27a86b99b68702189cdb - looks good
80cedf677bb43d10c6b37902ca22af7650752bf0 just one white space between "locale" and "torlauncher" (in +% locale torlauncher en-US %locale/en-US/) as used for the other locales and no "/" at the end of locale/en-US/ as done with the other locales, otherwise this looks good
2dd09cb68db2b267cd12db7ce542406791fd6ef7 - there are some conflicts with the languages strings (sorry for that), otherwise this looks good

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

Looks good to me.

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

Looks good to me.

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.

Okay, works for me in a follow-up ticket.

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).

Sounds good.

comment:21 in reply to:  20 Changed 7 months ago by mcs

Keywords: TorBrowserTeam201905R added; TorBrowserTeam201905 removed
Status: needs_revisionneeds_review

Replying to gk:

b7e7058359b402e9f37e27a86b99b68702189cdb - looks good
80cedf677bb43d10c6b37902ca22af7650752bf0 just one white space between "locale" and "torlauncher" (in +% locale torlauncher en-US %locale/en-US/) as used for the other locales and no "/" at the end of locale/en-US/ as done with the other locales, otherwise this looks good
2dd09cb68db2b267cd12db7ce542406791fd6ef7 - there are some conflicts with the languages strings (sorry for that), otherwise this looks good

We rebased the above changes and fixed the en-US locale issues that you found. We chose to add a trailing / for the non-en-US locales (by modifying import-translations.sh) since the results are more consistent with what Mozilla does. For example, see browser/extensions/pocket/locale/jar.mn. The three new tor-launcher patches are available on the bug28044-02 branch within the brade repo::
https://gitweb.torproject.org/user/brade/tor-launcher.git/log/?h=bug28044-02

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

Looks good to me.

Rebased:
https://gitweb.torproject.org/user/brade/tor-browser.git/commit/?h=bug28044-02&id=70e8a9a20fea7bc4036fb1e8af01c65a82089f79

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

Looks good to me.

Rebased:
https://gitweb.torproject.org/user/brade/tor-browser-build.git/commit/?h=bug28044-02&id=6d94f73dc055c1739a67ffd422f7f5bf29218723

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.

Okay, works for me in a follow-up ticket.

I filed #30473 for that task.

comment:22 Changed 7 months ago by gk

Resolution: fixed
Status: needs_reviewclosed

Okay, we are done here. The -02 patches look good to me and I merged them to the respective repositories:

The changes in tor-browser-build are in commit 6d94f73dc055c1739a67ffd422f7f5bf29218723 on master.
The changes in tor-browser are in commit 2852840dd1a12dc66e2aa00d97ed73f0761fb1cc on tor-browser-60.6.1esr-9.0-1 (we don't want to have them in 8.5 and thus on the 8.5 branch)
The changes in tor-launcher are in commits ab7e47f4ab54626e8b7e6348aac25fc3436d166f, b46c6039d1a5bf95aa9cbd777a51220d1df80aa0, and 864170b5c1e0626dbfe3707d48037010596c42e5 on master

Additionally, I bumped the tor-browser branch used for nightlies from now on and the upcoming alpha in tor-browser-build with commit 68d7be6c41aa408c20cb87511efe59e7afa60357 (on master).

comment:23 Changed 2 months ago by sysrqb

Keywords: tbb-no-uplift added
Note: See TracTickets for help on using tickets.