|
| 1 | + |
| 2 | +// |
| 3 | + |
| 4 | +// |
| 5 | +// Copyright (C) 2024-2026 celenity |
| 6 | +// |
| 7 | +// This file is part of Phoenix. |
| 8 | +// |
| 9 | +// Phoenix is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. |
| 10 | +// |
| 11 | +// Phoenix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
| 12 | +// |
| 13 | +// You should have received a copy of the GNU General Public License along with Phoenix. If not, see https://www.gnu.org/licenses/. |
| 14 | +// |
| 15 | + |
| 16 | +// This file contains preferences shared across Phoenix 'Extended' configs. |
| 17 | + |
| 18 | +/* INDEX |
| 19 | + |
| 20 | +001: FINGERPRINTING PROTECTION |
| 21 | +002: WEBRTC |
| 22 | +003: ATTACK SURFACE REDUCTION |
| 23 | +004: MISC. PRIVACY + SECURITY (ANDROID ONLY) |
| 24 | +005: MISC. PRIVACY |
| 25 | + |
| 26 | +*/ |
| 27 | + |
| 28 | +/* KEY |
| 29 | + |
| 30 | +Unspecified = This preference should be set EVERYWHERE |
| 31 | + |
| 32 | +[ANDROID-ONLY] = This preference should ONLY be set for Android |
| 33 | + |
| 34 | +[NO-FLATPAK-LINUX] = This preference should be set everywhere, EXCEPT for GNU/Linux (Flatpak) |
| 35 | +[NO-LINUX] = This preference should be set everywhere, EXCEPT for GNU/Linux |
| 36 | +[NO-NON-FLATPAK-LINUX] = This preference should be set everywhere, EXCEPT for GNU/Linux (non-Flatpak) |
| 37 | +[NO-MAIL] = This preference should be set everywhere, EXCEPT for Thunderbird (Useful for ex. Dove) |
| 38 | +[NO-OSX] = This preference should be set everywhere, EXCEPT for macOS |
| 39 | +[NO-INTEL-OSX] = This preference should be set everywhere, EXCEPT for macOS on Intel |
| 40 | +[NO-SILICON-OSX] = This preference should be set everywhere, EXCEPT for macOS on Apple Silicon |
| 41 | +[NO-WINDOWS] = This preference should be set everywhere, EXCEPT for Windows |
| 42 | + |
| 43 | +*/ |
| 44 | + |
| 45 | +/// Add custom branding at `about:support` |
| 46 | +defaultPref("app.support.vendor", "Phoenix - Extended: 2026.02.16.1"); // [NO-MAIL] [HIDDEN] |
| 47 | + |
| 48 | + |
| 49 | +/*** 001 FINGERPRINTING PROTECTION ***/ |
| 50 | + |
| 51 | + |
| 52 | +/// Further harden FPP... |
| 53 | +// As explained here: https://codeberg.org/celenity/Phoenix/wiki/Extended#fingerprinting |
| 54 | +// Compared to standard, this just removes '-JSDateTimeUTC' - meaning timezone is spoofed to UTC-0 |
| 55 | +defaultPref("privacy.fingerprintingProtection.overrides", "+AllTargets,-CanvasExtractionBeforeUserInputIsBlocked,-CSSPrefersColorScheme,-EfficientCanvasRandomization,-FrameRate,-CanvasImageExtractionPrompt"); // [ANDROID-ONLY] |
| 56 | +defaultPref("browser.phoenix.status.extended", "001"); |
| 57 | + |
| 58 | +/*** 002 WEBRTC ***/ |
| 59 | +// This will likely break WebRTC... |
| 60 | + |
| 61 | +/// Always exclude local IP addresses, even in trusted scenarios |
| 62 | +defaultPref("media.peerconnection.ice.no_host", true); |
| 63 | + |
| 64 | +/// Force a single candidate for ICE generation |
| 65 | +defaultPref("media.peerconnection.ice.default_address_only", true); |
| 66 | + |
| 67 | +/// Only use TURN servers/relays |
| 68 | +// No P2P |
| 69 | +// https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/issues/40#note_2884663 |
| 70 | +defaultPref("media.peerconnection.ice.relay_only", true); |
| 71 | + |
| 72 | +defaultPref("browser.phoenix.status.extended", "002"); |
| 73 | + |
| 74 | +/*** 003 ATTACK SURFACE REDUCTION ***/ |
| 75 | + |
| 76 | +/// Disable WebAssembly (WASM) |
| 77 | +// https://spectrum.ieee.org/more-worries-over-the-security-of-web-assembly |
| 78 | +defaultPref("javascript.options.wasm", false); |
| 79 | + |
| 80 | +defaultPref("browser.phoenix.status.extended", "003"); |
| 81 | + |
| 82 | +/*** 004 MISC. PRIVACY + SECURITY ***/ |
| 83 | + |
| 84 | +/// Disable WebGL [ANDROID-ONLY] |
| 85 | +// PRIVACY: Fingerprinting concerns [ANDROID-ONLY] |
| 86 | +// SECURITY: Attack Surface Reduction [ANDROID-ONLY] |
| 87 | +// https://blog.browserscan.net/docs/webgl-fingerprinting [ANDROID-ONLY] |
| 88 | +// https://security.stackexchange.com/questions/13799/is-webgl-a-security-concern [ANDROID-ONLY] |
| 89 | +// On desktop we're no longer setting/recommending this in favor of the built-in `Block WebGL` filterlist in uBlock Origin, but on Android, we can't necessarily control uBlock Origin/set policies, so let's just make sure this is disabled. [ANDROID-ONLY] |
| 90 | +defaultPref("webgl.disabled", true); // [ANDROID-ONLY] |
| 91 | +
|
| 92 | +defaultPref("browser.phoenix.status.extended", "004"); |
| 93 | +
|
| 94 | +/*** 005 MISC. PRIVACY ***/ |
| 95 | +
|
| 96 | +/// Only send cross-origin referers if hosts match |
| 97 | +// https://wiki.mozilla.org/Security/Referrer |
| 98 | +defaultPref("network.http.referer.XOriginPolicy", 2); |
| 99 | +
|
| 100 | +defaultPref("browser.phoenix.status.extended", "005"); |
| 101 | +
|
| 102 | +lockPref("browser.phoenix.status.extended", "successfully applied :D"); |
0 commit comments