Commit f7f4bcb5 authored by intrigeri's avatar intrigeri

Move our Tor Browser prefs to user.js (refs: #15023)

I can't manage to have them be taken into account. Presumably
this would be doable by adding them to omni.ja but let's not bother:
I see little downside to simplify things here.
parent 1f735b32
// As suggested in TBB's start-tor-browser script for system-wide Tor
// instances
pref("extensions.torbutton.banned_ports", "631,6136,4444,4445,6668,7656,7657,7658,7659,7660,8998,9040,9050,9062,9150,9051");
pref("extensions.torbutton.custom.socks_host", "127.0.0.1");
pref("extensions.torbutton.custom.socks_port", 9150);
pref("extensions.torbutton.launch_warning", false);
pref("extensions.torbutton.settings_method", "custom");
pref("extensions.torbutton.socks_port", 9150);
pref("extensions.torbutton.use_privoxy", false);
user_pref("extensions.torbutton.banned_ports", "631,6136,4444,4445,6668,7656,7657,7658,7659,7660,8998,9040,9050,9062,9150,9051");
user_pref("extensions.torbutton.custom.socks_host", "127.0.0.1");
user_pref("extensions.torbutton.custom.socks_port", 9150);
user_pref("extensions.torbutton.launch_warning", false);
user_pref("extensions.torbutton.settings_method", "custom");
user_pref("extensions.torbutton.socks_port", 9150);
user_pref("extensions.torbutton.use_privoxy", false);
// Tails-specific configuration below
// Since the slider notification will be shown everytime at each Tails
// boot, which is bad (nagging) UX, we disable it.
pref("extensions.torbutton.show_slider_notification", false);
user_pref("extensions.torbutton.show_slider_notification", false);
// Disable the Tor Browser's automatic update checking
pref("app.update.enabled", false);
user_pref("app.update.enabled", false);
// Suppress prompt and always spoof useragent as English
pref("extensions.torbutton.spoof_english", true);
pref("extensions.torbutton.prompted_language", true);
user_pref("extensions.torbutton.spoof_english", true);
user_pref("extensions.torbutton.prompted_language", true);
// Block read and write access to the history in non-Tor mode
pref("extensions.torbutton.block_nthread", true);
pref("extensions.torbutton.block_nthwrite", true);
user_pref("extensions.torbutton.block_nthread", true);
user_pref("extensions.torbutton.block_nthwrite", true);
// Tails-specific Torbutton preferences
pref("extensions.torbutton.block_tforms", false);
pref("extensions.torbutton.display_panel", false);
pref("extensions.torbutton.lastUpdateCheck", "9999999999.999");
pref("extensions.torbutton.no_updates", true);
pref("extensions.torbutton.nonontor_sessionstore", true);
pref("extensions.torbutton.nontor_memory_jar", true);
pref("extensions.torbutton.startup", true);
pref("extensions.torbutton.startup_state", 1);
pref("extensions.torbutton.test_enabled", false); // Tails-specific
pref("extensions.torbutton.tor_memory_jar", true);
pref("extensions.torbutton.control_port", 9051);
user_pref("extensions.torbutton.block_tforms", false);
user_pref("extensions.torbutton.display_panel", false);
user_pref("extensions.torbutton.lastUpdateCheck", "9999999999.999");
user_pref("extensions.torbutton.no_updates", true);
user_pref("extensions.torbutton.nonontor_sessionstore", true);
user_pref("extensions.torbutton.nontor_memory_jar", true);
user_pref("extensions.torbutton.startup", true);
user_pref("extensions.torbutton.startup_state", 1);
user_pref("extensions.torbutton.test_enabled", false); // Tails-specific
user_pref("extensions.torbutton.tor_memory_jar", true);
user_pref("extensions.torbutton.control_port", 9051);
// Not setting this prevents some add-on GUI elements from appearing
// on the first run of the browser, e.g. uBlock Origin's button.
pref("extensions.torbutton.inserted_button", true);
user_pref("extensions.torbutton.inserted_button", true);
// These must be set to the same value to prevent Torbutton from
// flashing its upgrade notification.
pref("extensions.torbutton.lastBrowserVersion", "Tails");
pref("torbrowser.version", "Tails");
user_pref("extensions.torbutton.lastBrowserVersion", "Tails");
user_pref("torbrowser.version", "Tails");
// Quoting TBB: "Now handled by plugins.click_to_play"
// Tails: we don't support these plugins, so letting NoScript block it seems
// to be potentially useful defense-in-depth.
pref("noscript.forbidFlash", true);
pref("noscript.forbidSilverlight", true);
pref("noscript.forbidJava", true);
pref("noscript.forbidPlugins", true);
user_pref("noscript.forbidFlash", true);
user_pref("noscript.forbidSilverlight", true);
user_pref("noscript.forbidJava", true);
user_pref("noscript.forbidPlugins", true);
// Other Tails-specific NoScript preferences
pref("noscript.untrusted", "google-analytics.com");
user_pref("noscript.untrusted", "google-analytics.com");
// Other non-Torbutton, Tails-specific prefs
pref("browser.download.dir", "/home/amnesia/Tor Browser");
pref("dom.input.fallbackUploadDir", "/home/amnesia/Tor Browser");
pref("print.print_to_filename", "/home/amnesia/Tor Browser/output.pdf");
pref("browser.download.folderList", 2);
pref("browser.download.manager.closeWhenDone", true);
pref("extensions.update.enabled", false);
pref("layout.spellcheckDefault", 0);
pref("network.dns.disableIPv6", true);
pref("security.warn_submit_insecure", true);
user_pref("browser.download.dir", "/home/amnesia/Tor Browser");
user_pref("dom.input.fallbackUploadDir", "/home/amnesia/Tor Browser");
user_pref("print.print_to_filename", "/home/amnesia/Tor Browser/output.pdf");
user_pref("browser.download.folderList", 2);
user_pref("browser.download.manager.closeWhenDone", true);
user_pref("extensions.update.enabled", false);
user_pref("layout.spellcheckDefault", 0);
user_pref("network.dns.disableIPv6", true);
user_pref("security.warn_submit_insecure", true);
// Disable fetching of the new tab page's Tiles links/ads. Ads are
// generally unwanted, and also the fetching is a "phone home" type of
// feature that generates traffic at least the first time the browser
// is started.
pref("browser.newtabpage.directory.source", "");
pref("browser.newtabpage.directory.ping", "");
user_pref("browser.newtabpage.directory.source", "");
user_pref("browser.newtabpage.directory.ping", "");
// ... and disable the explanation shown the first time
pref("browser.newtabpage.introShown", true);
user_pref("browser.newtabpage.introShown", true);
// Without setting this, the Download Management page will not update
// the progress being made.
pref("browser.download.panel.shown", true);
user_pref("browser.download.panel.shown", true);
// Given our AppArmor sandboxing, Tor Browser will not be allowed to
// open external applications, so let's not offer the option to the user,
// and instead only propose them to save downloaded files.
pref("browser.download.forbid_open_with", true);
user_pref("browser.download.forbid_open_with", true);
......@@ -1032,7 +1032,7 @@ the Internet:
The remaining configuration differences can be found in:
- [[!tails_gitweb_dir config/chroot_local-includes/etc/tor-browser/preferences/0000tails.js]]
- [[!tails_gitweb_dir config/chroot_local-includes/etc/tor-browser/user.js]]
- [[!tails_gitweb config/chroot_local-hooks/14-generate-tor-browser-profile]]
- [[!tails_gitweb config/chroot_local-hooks/15-symlink-places.sqlite]]
......
......@@ -161,7 +161,7 @@ So, in a nutshell we give Tor Browser access to:
* `~/Tor Browser/`, which is amnesiac, as everything else in Tails by
default; this is set to be the default download directory
([[!tails_gitweb config/chroot_local-includes/etc/tor-browser/profile/preferences/0000tails.js]]);
([[!tails_gitweb config/chroot_local-includes/etc/tor-browser/profile/user.js]]);
* `~/Persistent/Tor Browser/`, that is persistent, and only created
when `~/Persistent/` is itself persistent and read-write.
......
......@@ -79,7 +79,7 @@ in [[!tails_gitweb config/chroot_local-includes/etc/tor/torrc]]:
Applications are configured to use the right SOCKS port:
- [[!tails_gitweb config/chroot_local-includes/etc/tor-browser/profile/preferences/0000tails.js]]
- [[!tails_gitweb config/chroot_local-includes/etc/tor-browser/profile/user.js]]
- [[!tails_gitweb config/chroot_local-includes/lib/systemd/system/htpdate.service]]
- [[!tails_gitweb config/chroot_local-includes/usr/local/bin/tails-security-check]]
- [[!tails_gitweb config/chroot_local-includes/usr/local/bin/thunderbird]]
Markdown is supported
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