Skip to content

Draft: 40091: Move HTTPS Everywhere into omni.ja

This is only for desktop, we'll have to handle Fenix separately. I tried using the same code also for Fenix (just putting it in some common place instead of BrowserGlue.jsm), but there were issues with the builtin extension UI not being visible until force-restarting Fenix. So I believe it's better to install it in Fenix separately as they document it, from a resource://android/assets/..., which maps to app/src/main/assets/. See https://searchfox.org/mozilla-central/rev/bfdb6a1ef893e4c926ce52700ed187a9743603ce/mobile/android/docs/geckoview/consumer/web-extensions.rst.

For this patch to work it will need a tor-browser-build counterpart, which unzips https-everywhere xpi in the right place into omni.ja. The idea is that we will have a (quite arbitrary) fixed place (right now resource://torbutton/content/extensions/https-everywhere/) where the browser will look for the builtin extension files (unpacked, so */manifest.json, etc.). So, tor-browser-build can unpack omni.ja, unzip the xpi in the right place, and repack.

In my testing, the settings of the previously installed https-everywhere are preserved, and it's correctly uninstalled (and its xpi removed from the browser profile). The UI is mostly the same in about:addons, with the only changes that the builtin extension cannot be uninstalled nor reported (but can be disabled). I did not add explicit checks to prevent a user from manually installing a https-everywhere-eff xpi: if that happens it will be uninstalled on next browser restart in favour of the builtin one, so I though it was not strictly needed to check this.

Merge request reports

Loading