Skip to content

Commit

Permalink
Merge pull request #373 from dantol29/slombard/web-283-prevent-firefo…
Browse files Browse the repository at this point in the history
…x-to-send-background-request-to-services

Prevent firefox to send background requests to services
  • Loading branch information
552020 authored May 21, 2024
2 parents c0b7786 + f81a2c7 commit fccf637
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
!**/*.jpg
!**/*.yml
!**/*.csv
!**/*.cfg
!**/*.js

# Specific files and directories to include
!Makefile
Expand Down
49 changes: 49 additions & 0 deletions docs/firefox/firefox.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Disable Captive Portal Detection
pref("network.captive-portal-service.enabled", false);

// Disable Firefox Health Report
pref("datareporting.healthreport.uploadEnabled", false);

// Disable Telemetry
pref("toolkit.telemetry.enabled", false);
pref("toolkit.telemetry.unified", false);
pref("toolkit.telemetry.archive.enabled", false);

// Disable Prefetching
pref("network.prefetch-next", false);

// Disable DNS Prefetching
pref("network.dns.disablePrefetch", true);
pref("network.dns.disablePrefetchFromHTTPS", true);

// Disable Speculative Connections
pref("network.http.speculative-parallel-limit", 0);

// Disable Browser Safebrowsing
pref("browser.safebrowsing.enabled", false);
pref("browser.safebrowsing.malware.enabled", false);

// Disable Firefox Studies
pref("app.shield.optoutstudies.enabled", false);

// Disable Extension Recommendations
pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr", false);

// Disable Pocket
pref("extensions.pocket.enabled", false);

// Additional Settings from the Article
pref("browser.aboutHomeSnippets.updateUrl", ""); // Disable Snippets
pref("app.update.auto", false); // Disable Automatic Browser Updates
pref("app.update.enabled", false);
pref("browser.search.update", false);
pref("extensions.update.enabled", false); // Disable Automatic Add-on Updates
pref("extensions.blocklist.enabled", false); // Disable Blocklist Updates
pref("browser.safebrowsing.downloads.remote.enabled", false); // Disable Malware Protection
pref("privacy.trackingprotection.enabled", false); // Disable Tracking Protection
pref("security.OCSP.enabled", 0); // Disable TLS/SSL Certificate Revocation Check
pref("browser.search.geoip.url", ""); // Disable GeoIP Lookup
pref("browser.startup.homepage_override.mstone", "ignore"); // Disable "What's New" Page
pref("extensions.getAddons.cache.enabled", false); // Disable Add-on Recommendations
pref("datareporting.policy.dataSubmissionEnabled", false); // Disable Firefox Diagnostic Data
pref("browser.selfsupport.enabled", false); // Disable Survey Sampling
33 changes: 33 additions & 0 deletions docs/firefox/firefox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Firefox Shut up Configuration

To apply custom preferences in Firefox and minimize unwanted background requests, follow these steps:

## Step 1: Create the Configuration File

1. Create a JavaScript file named `firefox.cfg`.
2. Add your desired configuration settings to this file. (See the provided `firefox.cfg` file content for reference.)

## Step 2: Create a Local Configuration File

1. Create another JavaScript file named `local-settings.js`.
2. Add the following content to `local-settings.js` to specify the configuration file:

```javascript
// local-settings.js
pref("general.config.filename", "firefox.cfg");
pref("general.config.obscure_value", 0); // Use 0 to disable byte-shifting
```

## Step 3: Place the Files in the Correct Directories

1. Locate the root directory of your Firefox installation. On Windows, this is typically `C:\Program Files\Mozilla Firefox`. On macOS and Linux, it may vary.
2. Place `firefox.cfg` in the root directory of the Firefox installation.
3. Place `local-settings.js` in the `defaults/pref` directory within the Firefox installation directory.

- **Windows Example:**
- `firefox.cfg` -> `C:\Program Files\Mozilla Firefox\firefox.cfg`
- `local-settings.js` -> `C:\Program Files\Mozilla Firefox\defaults\pref\local-settings.js`

## Step 4: Restart Firefox

After placing these files in the correct directories, restart Firefox. It should now load the preferences specified in your `firefox.cfg` file.
3 changes: 3 additions & 0 deletions docs/firefox/local-settings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// local-settings.js
pref("general.config.filename", "firefox.cfg");
pref("general.config.obscure_value", 0); // Use 0 to disable byte-shifting

0 comments on commit fccf637

Please sign in to comment.