-
-
Save df-a/16d5cca48791b3c6381b7552b2cf6dd2 to your computer and use it in GitHub Desktop.
user.js - brainfucksec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************* | |
* | |
* Mozilla Firefox configuration file: `user.js` | |
* | |
* date: 2022-01-08 | |
* version: 0.8.2 | |
* maintainer: brainf+ck | |
* | |
* info: Set preferences for the selected profile when Firefox start. | |
* Copy this file on Firefox Profile folder. You should create a | |
* new profile to insert this file: | |
* | |
* `$HOME/.mozilla/firefox/<profile-ID.name>` | |
* | |
* For more information how to use this file see: | |
* https://kb.mozillazine.org/User.js_file | |
* | |
* https://github.com/arkenfox/user.js/wiki/1.1-Overview | |
* | |
* For "about:config" entries see: | |
* https://searchfox.org/mozilla-release/source/modules/libpref/init/all.js | |
* | |
* OPTIONS FORMAT: | |
* user_pref("<entry>", <boolean> || <number> || "<string>"); | |
* | |
* NOTE: Commented preferences are those disabled by default, some | |
* conflict with others if enabled, and some disable some basic | |
* features like audio/video libraries or other things you need. | |
* So be careful and check what you enable/disable. | |
* | |
**********************************************************************/ | |
/********************************************************************* | |
* | |
* SECTIONS: | |
* - StartUp Settings | |
* - Geolocation | |
* - Language / Locale | |
* - Auto-updates / Recommendations | |
* - Telemetry | |
* - Studies | |
* - Crash Reports | |
* - Captive Portal Detection / Network Checks | |
* - Safe Browsing | |
* - Network: DNS / Proxy / IPv6 | |
* - Search Bar: Suggestions / Autofill | |
* - Disk Cache / Memory | |
* - Headers / Referers | |
* - Audio/Video (WebRTC, WebGL) | |
* - Downloads | |
* - Cookies | |
* - Shutdown Settings | |
* - HTTPS | |
* - Fingerprinting | |
* | |
*********************************************************************/ | |
/********************************************************************* | |
* StartUp Settings | |
*********************************************************************/ | |
// disable about:config warning | |
user_pref("browser.aboutConfig.showWarning", false); | |
// disable check if Firefox is your default browser | |
//user_pref("browser.shell.checkDefaultBrowser", false); | |
// set startup page | |
// 0=blank, 1=home, 2=last visited page, 3=resume previous session | |
user_pref("browser.startup.page", 1); | |
user_pref("browser.startup.homepage", "start.duckduckgo.com"); | |
// if you want only a home blank page | |
//user_pref("browser.startup.page", 0); | |
//user_pref("browser.startup.homepage", "about:blank"); | |
// disable activity stream on new windows and tab pages | |
user_pref("browser.newtabpage.enabled", false); | |
user_pref("browser.newtab.preload", false); | |
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false); | |
user_pref("browser.newtabpage.activity-stream.telemetry", false); | |
user_pref("browser.newtabpage.activity-stream.feeds.snippets", false); | |
user_pref("browser.newtabpage.activity-stream.section.topstories", false); | |
user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false); | |
user_pref("browser.newtabpage.activity-stream.showSponsored", false); | |
user_pref("browser.newtabpage.activity-stream.feeds.discoverystreamfeed", false); | |
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); | |
user_pref("browser.newtabpage.activity-stream.default.sites", ""); | |
/********************************************************************* | |
* Geolocation | |
*********************************************************************/ | |
// use Mozilla geolocation service instead of Google if permission is granted | |
user_pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); | |
// disable using the OS’s geolocation service | |
//user_pref("geo.provider.ms-windows-location", false); //Windows | |
//user_pref("geo.provider.use_corelocation", false); //macOS | |
user_pref("geo.provider.use_gpsd", false); //Linux | |
// disable region updates | |
user_pref("browser.region.network.url", ""); | |
user_pref("browser.region.update.enabled", false); | |
/********************************************************************* | |
* Language / Locale | |
*********************************************************************/ | |
// set language for displaying web pages | |
user_pref("intl.accept_languages", "en-US, en"); | |
user_pref("javascript.use_us_english_locale", true); //Hidden pref | |
/********************************************************************* | |
* Auto-updates / Recommendations | |
*********************************************************************/ | |
// disable auto-installing Firefox updates | |
//user_pref("app.update.background.scheduling.enabled", false); //Windows | |
user_pref("app.update.auto", false); //Non-Windows | |
// disable addons recommendations (use Google Analytics) | |
user_pref("extensions.getAddons.showPane", false); //Hidden pref | |
user_pref("extensions.htmlaboutaddons.recommendations.enabled", false); | |
/********************************************************************* | |
* Telemetry | |
*********************************************************************/ | |
// disable telemetry | |
user_pref("datareporting.policy.dataSubmissionEnabled", false); | |
user_pref("datareporting.healthreport.uploadEnabled", false); | |
user_pref("toolkit.telemetry.enabled", false); //Default: false | |
user_pref("toolkit.telemetry.unified", false); | |
user_pref("toolkit.telemetry.server", "data:,"); | |
user_pref("toolkit.telemetry.archive.enabled", false); | |
user_pref("toolkit.telemetry.newProfilePing.enabled", false); | |
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false); | |
user_pref("toolkit.telemetry.updatePing.enabled", false); | |
user_pref("toolkit.telemetry.bhrPing.enabled", false); | |
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false); | |
user_pref("toolkit.telemetry.coverage.opt-out", true); //Hidden pref | |
user_pref("toolkit.coverage.opt-out", true); //Hidden pref | |
user_pref("toolkit.coverage.endpoint.base.", ""); | |
user_pref("browser.ping-centre.telemetry", false); | |
user_pref("beacon.enabled", false); | |
/********************************************************************* | |
* Studies | |
*********************************************************************/ | |
// disable studies | |
user_pref("app.shield.optoutstudies.enabled", false); | |
// disable normandy/shield | |
user_pref("app.normandy.enabled", false); | |
user_pref("app.normandy.api_url", ""); | |
/********************************************************************* | |
* Crash Reports | |
*********************************************************************/ | |
// disable crash reports | |
user_pref("breakpad.reportURL", ""); | |
user_pref("browser.tabs.crashReporting.sendReport", false); | |
/********************************************************************* | |
* Captive Portal Detection / Network Checks | |
*********************************************************************/ | |
// disable captive portal detection | |
user_pref("captivedetect.canonicalURL", "") | |
user_pref("network.captive-portal-service.enabled", false); | |
// disable network connections checks | |
user_pref("network.connectivity-service.enabled", false); | |
/********************************************************************* | |
* Safe Browsing | |
*********************************************************************/ | |
// disable safe browsing service | |
user_pref("browser.safebrowsing.downloads.remote.enabled", false); | |
user_pref("browser.safebrowsing.downloads.remote.url", ""); | |
/********************************************************************* | |
* Network: DNS / Proxy / IPv6 | |
*********************************************************************/ | |
// disable link prefetching | |
user_pref("network.prefetch-next", false); | |
// disable DNS prefetching | |
user_pref("network.dns.disablePrefetch", true); | |
// disable predictor | |
user_pref("network.predictor.enabled", false); | |
// disable IPv6 | |
user_pref("network.dns.disableIPv6", true); | |
// disable "GIO" protocols as a potential proxy bypass vectors | |
user_pref("network.gio.supported-protocols", ""); //Hidden pref | |
// use Punycode in Internationalized Domain Names to eliminate possible spoofing | |
user_pref("network.IDN_show_punycode", true); | |
/********************************************************************* | |
* Search Bar: Suggestions / Autofill | |
*********************************************************************/ | |
// display all parts of the url in the bar | |
user_pref("browser.urlbar.trimURLs", false); | |
// disable form autofill | |
user_pref("browser.formfill.enable", false); | |
user_pref("extensions.formautofill.addresses.enabled", false); | |
user_pref("extensions.formautofill.available", "off"); | |
user_pref("extensions.formautofill.creditCards.available", false); | |
user_pref("extensions.formautofill.creditCards.enabled", false); | |
user_pref("extensions.formautofill.heuristics.enabled", false); | |
user_pref("signon.autofillForms", false); //login and passwords | |
// disable location bar contextual suggestions | |
user_pref("browser.urlbar.suggest.quicksuggest.nonsponsored", false); | |
user_pref("browser.urlbar.suggest.quicksuggest.sponsored", false); | |
/********************************************************************* | |
* Disk Cache / Memory | |
*********************************************************************/ | |
// disable disk cache | |
user_pref("browser.cache.disk.enable", false); | |
/* | |
* disable storing extra session data: | |
* 0 = everywhere | |
* 1 = unencrypted sites | |
* 2 = nowhere | |
*/ | |
user_pref("browser.sessionstore.privacy_level", 2); | |
// disable resuming session from crash | |
user_pref("browser.sessionstore.resume_from_crash", false); | |
/********************************************************************* | |
* Headers / Referers | |
*********************************************************************/ | |
/* | |
* control when to send a referer: | |
* 0 = always (default) | |
* 1 = only if base domains match | |
* 2 = only if hosts match | |
*/ | |
user_pref("network.http.referer.XOriginPolicy", 2); | |
/* | |
* control amount of information to send: | |
* 0 = send full URI (default) | |
* 1 = scheme+host+port+path | |
* 2 = scheme+host+port | |
*/ | |
user_pref("network.http.referer.XOriginTrimmingPolicy ", 2); | |
/********************************************************************* | |
* Audio/Video (WebRTC, WebGL) | |
*********************************************************************/ | |
// disable WebRTC | |
user_pref("media.peerconnection.enabled", false); | |
// limit WebRTC IP leaks if using it | |
user_pref("media.peerconnection.ice.default_address_only", true); | |
user_pref("media.peerconnection.ice.no_host", true); | |
user_pref("media.peerconnection.ice.proxy_only_if_behind_proxy", true); | |
// disable Web Audio API | |
//user_pref("dom.webaudio.enabled", false); | |
// disable WebGL (Web Graphics Library): | |
user_pref("webgl.disabled", true); | |
// disable autoplay of HTML5 media | |
//user_pref("media.autoplay.blocking_policy", 2); | |
/********************************************************************* | |
* Downloads | |
*********************************************************************/ | |
// always ask you where to save files | |
user_pref("browser.download.useDownloadDir", false); | |
// disable adding downloads to system's "recent documents" list | |
user_pref("browser.download.manager.addToRecentDocs", false); | |
/********************************************************************* | |
* Cookies | |
*********************************************************************/ | |
/* | |
* enable ETP (Enhanced Tracking Protection) | |
* ETP strict mode enables Total Cookie Protection (TCP) | |
*/ | |
user_pref("browser.contentblocking.category", "strict"); | |
//user_pref("privacy.partition.serviceWorkers", true); //FF 96+ | |
// delete cookies and site data on exit | |
user_pref("network.cookie.lifetimePolicy", 2); | |
/********************************************************************* | |
* Shutdown Settings | |
*********************************************************************/ | |
// clear history when Firefox closes | |
user_pref("privacy.sanitize.sanitizeOnShutdown", true); | |
user_pref("privacy.clearOnShutdown.cache", true); | |
user_pref("privacy.clearOnShutdown.cookies", true); | |
user_pref("privacy.clearOnShutdown.downloads", true); | |
user_pref("privacy.clearOnShutdown.formdata", true); | |
user_pref("privacy.clearOnShutdown.history", true); | |
user_pref("privacy.clearOnShutdown.offlineApps", true); | |
user_pref("privacy.clearOnShutdown.sessions", true); | |
user_pref("privacy.clearOnShutdown.sitesettings", true); | |
user_pref("privacy.sanitize.timeSpan", 0); | |
/********************************************************************* | |
* HTTPS | |
*********************************************************************/ | |
// enable HTTPS-Only mode in all windows | |
user_pref("dom.security.https_only_mode", true); | |
// disable sending HTTP request for checking HTTPS support by the server | |
user_pref("dom.security.https_only_mode_send_http_background_request", false); | |
/********************************************************************* | |
* Fingerprinting | |
*********************************************************************/ | |
/* | |
* RFP (Resist Fingerptinting): | |
* | |
* can cause some website breakage: mainly canvas, use a site | |
* exception via the urlbar. | |
* | |
* RFP also has a few side effects: mainly timezone is UTC0, and | |
* websites will prefer light theme. | |
* [1] https://bugzilla.mozilla.org/418986 | |
* | |
* See: https://support.mozilla.org/en-US/kb/firefox-protection-against-fingerprinting | |
*/ | |
//user_pref("privacy.resistFingerprinting", true); | |
// set new window size rounding max values | |
//user_pref("privacy.window.maxInnerWidth", 1600); | |
//user_pref("privacy.window.maxInnerHeight", 900); | |
// disable mozAddonManager Web API | |
//user_pref("privacy.resistFingerprinting.block_mozAddonManager", true); //Hidden pref | |
// disable using system colors | |
//user_pref("browser.display.use_system_colors", false); //Default: false (Non-Windows) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment