Commit e29c2b2c authored by Mike Perry's avatar Mike Perry Committed by Alex Catarineu
Browse files

TB4: Tor Browser's Firefox preference overrides.

This hack directly includes our preference changes in omni.ja.

Bug 18292: Staged updates fail on Windows

Temporarily disable staged updates on Windows.

Bug 18297: Use separate Noto JP,KR,SC,TC fonts

Bug 23404: Add Noto Sans Buginese to the macOS whitelist

Bug 23745: Set dom.indexedDB.enabled = true

Bug 13575: Disable randomised Firefox HTTP cache decay user tests.
(Fernando Fernandez Mancera <>)

Bug 17252: Enable session identifiers with FPI

Session tickets and session identifiers were isolated
by OriginAttributes, so we can re-enable them by
allowing the default value (true) of

The pref "security.enable_tls_session_tickets" is obsolete
(removed in

Bug 14952: Enable http/2 and AltSvc

In Firefox, SPDY/HTTP2 now uses Origin Attributes for
isolation of connections, push streams, origin frames, etc.
That means we get first-party isolation provided
"privacy.firstparty.isolate" is true. So in this patch, we
stop overriding "network.http.spdy.enabled" and

Alternate Services also use Origin Attributes for isolation.
So we stop overriding
"network.http.altsvc.enabled" and "network.http.altsvc.oe"
as well.

(All 4 of the abovementioned "network.http.*" prefs adopt
Firefox 60ESR's default value of true.)

However, we want to disable HTTP/2 push for now, so we
set "network.http.spdy.allow-push" to false.

"network.http.spdy.enabled.http2draft" was removed in Bug 1132357.
"network.http.sped.enabled.v2" was removed in Bug 912550.
"network.http.sped.enabled.v3" was removed in Bug 1097944.
"network.http.sped.enabled.v3-1" was removed in Bug 1248197.

Bug 26114: is not special
* Don't expose navigator.mozAddonManager on any site
* Don't block NoScript from modifying or other sites

Enable ReaderView mode again (#27281).

Bug 29916: Make sure enterprise policies are disabled

Bug 2874: Block Components.interfaces from content

Bug 26146: Spoof HTTP User-Agent header for desktop platforms

In Tor Browser 8.0, the OS was revealed in both the HTTP User-Agent
header and to JavaScript code via navigator.userAgent. To avoid
leaking the OS inside each HTTP request (which many web servers
log), always use the Windows 7 OS value in the desktop User-Agent
header. We continue to allow access to the actual OS via JavaScript,
since doing so improves compatibility with web applications such
as GitHub and Google Docs.

Bug 12885: Windows Jump Lists fail for Tor Browser

Jumplist entries are stored in a binary file in:
and has a name in the form

The hex at the front is unique per app, and is ultimately derived from
something called the 'App User Model ID' (AUMID) via some unknown
hashing method. The AUMID is provided as a key when programmatically
creating, updating, and deleting a jumplist. The default behaviour in
firefox is for the installer to define an AUMID for an app, and save it
in the registry so that the jumplist data can be removed by the

However, the Tor Browser does not set this (or any other) regkey during
installation, so this codepath fails and the app's AUMID is left
undefined. As a result the app's AUMID ends up being defined by
windows, but unknowable by Tor Browser. This unknown AUMID is used to
create and modify the jumplist, but the delete API requires that we
provide the app's AUMID explicitly. Since we don't know what the AUMID
is (since the expected regkey where it is normally stored does not
exist) jumplist deletion will fail and we will leave behind a mostly
empty customDestinations-ms file. The name of the file is derived from
the binary path, so an enterprising person could reverse engineer how
that hex name is calculated, and generate the name for Tor Browser's
default Desktop installation path to determine whether a person had
used Tor Browser in the past.

The 'taskbar.grouping.useprofile' option that is enabled by this patch
works around this AUMID problem by having firefox.exe create it's own
AUMID based on the profile path (rather than looking for a regkey). This
way, if a user goes in and enables and disables jumplist entries, the
backing store is properly deleted.

Unfortunately, all windows users currently have this file lurking in
the above mentioned directory and this patch will not remove it since it
was created with an unknown AUMID. However, another patch could be
written which goes to that directory and deletes any item containing the
'Tor Browser' string.  See bug 28996.

Bug 31396: Disable indexedDB WebExtension storage backend.

Bug 30845: Make sure default themes and other internal extensions are enabled

Bug 28896: Enable extensions in private browsing by default

Bug 31065: Explicitly allow proxying localhost

Bug 31598: Enable letterboxing

Disable Presentation API everywhere

Bug 21549 - Use Firefox's WASM default pref. It is disabled at safer
security levels.

Bug 32321: Disable Mozilla's MitM pings

Bug 19890: Disable installation of system addons

By setting the URL to "" we make sure that already installed system
addons get deleted as well.

Bug 22548: Firefox downgrades VP9 videos to VP8.

On systems where H.264 is not available or no HWA, VP9 is preferred. But in Tor
Browser 7.0 all youtube videos are degraded to VP8.

This behaviour can be turned off by setting media.benchmark.vp9.threshold to 0.
All clients will get better experience and lower traffic, beause TBB doesn't
use "Use hardware acceleration when available".

Bug 25741 - TBA: Add mobile-override of 000-tor-browser prefs

Bug 16441: Suppress "Reset Tor Browser" prompt.

Bug 29120: Use the in-memory media cache and increase its maximum size.

Bug 33697: use old search config based on list.json

Bug 33855: Ensure that site-specific browser mode is disabled.

Bug 30682: Disable Intermediate CA Preloading.

Bug 40061: Omit the Windows default browser agent from the build
parent b688682d
......@@ -144,6 +144,9 @@ js/src/Y.js
# Fuzzing code for testing only, targeting the JS shell
# uses `#include`
# Uses `#filter substitution`
This diff is collapsed.
......@@ -53,9 +53,9 @@ pref("extensions.recommendations.themeRecommendationUrl", "https://color.firefox
pref("extensions.update.autoUpdateDefault", true);
// Check AUS for system add-on updates.
pref("extensions.systemAddon.update.url", "");
pref("extensions.systemAddon.update.enabled", true);
// No AUS check for system add-on updates for Tor Browser users.
pref("extensions.systemAddon.update.url", "");
pref("extensions.systemAddon.update.enabled", false);
// Disable add-ons that are not installed by the user in all scopes by default.
// See the SCOPE constants in AddonManager.jsm for values to use here.
......@@ -296,6 +296,7 @@
; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
; Technically this is an app pref file, but we are keeping it in the original
......@@ -50,6 +50,7 @@ if CONFIG['MOZ_GPSD']:
# These files are specified in this to pick up DIST_SUBDIR as set in
# this directory, which is un-set in browser/app.
FINAL_TARGET_FILES.defaults += ['app/permissions']
// Import all prefs from the canonical file
// We override mobile-specific prefs below
// Tor Browser for Android
// Do not edit this file.
#include ../../../browser/app/profile/000-tor-browser.js
// Space separated list of URLs that are allowed to send objects (instead of
// only strings) through webchannels. This list is duplicated in browser/app/profile/firefox.js
pref("webchannel.allowObject.urlWhitelist", "");
// Disable browser auto updaters
pref("", false);
pref("browser.startup.homepage_override.mstone", "ignore");
// Clear data on quit
pref("privacy.clearOnShutdown.cache", true);
// controls if we want camera support
pref("media.realtime_decoder.enabled", false);
// Enable touch events on Android (highlighting text, etc)
pref("dom.w3c_touch_events.enabled", 2);
// Ensure that pointer events are disabled
pref("", false);
// No HLS support for now due to browser freezing, see: #29859.
pref("media.hls.enabled", false);
// Inherit locale from the OS, used for multi-locale builds
pref("intl.locale.requested", "");
// Disable WebAuthn. It requires Google Play Services, so it isn't
// available, but avoid any potential problems.
pref("security.webauth.webauthn_enable_android_fido2", false);
// Disable the External App Blocker on Android
pref("extensions.torbutton.launch_warning", false);
......@@ -89,3 +89,5 @@ pref("toolkit.autocomplete.delegate", true);
// Android doesn't support the new sync storage yet, we will have our own in
// Bug 1625257.
pref("", true);
#include 000-tor-browser-android.js
......@@ -373,7 +373,11 @@ pref("app.update.timerMinimumDelay", 30); // seconds
// used by update service to decide whether or not to
// automatically download an update
pref("app.update.autodownload", "wifi");
pref("", "");
pref("", "");
/* prefs used specifically for updating the app */
......@@ -17,6 +17,7 @@ if CONFIG['MOZ_PKG_SPECIAL']:
......@@ -163,7 +163,9 @@ lintpref:
- 'modules/libpref/init/all.js'
- 'modules/libpref/init/StaticPrefList.yaml'
- 'browser/app/profile/000-tor-browser.js'
- 'browser/app/profile/firefox.js'
- 'mobile/android/app/000-tor-browser-android.js'
- 'mobile/android/app/mobile.js'
- 'devtools/client/preferences/debugger.js'
- 'mobile/android/app/geckoview-prefs.js'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment