commit b547f9234b20970669cc9535cf6a12530324a73d
parent 5711883b66f95b25c86d26a0ab97354721c073d3
Author: Andrea Marchesini <amarchesini@mozilla.com>
Date: Mon, 3 Nov 2025 13:13:13 +0000
Bug 1997873 - IP Protection - store the server list in the cache (and docs updated) r=ip-protection-reviewers,sstreich
Differential Revision: https://phabricator.services.mozilla.com/D271036
Diffstat:
2 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/browser/components/ipprotection/IPProtectionServerlist.sys.mjs b/browser/components/ipprotection/IPProtectionServerlist.sys.mjs
@@ -162,6 +162,8 @@ class IPProtectionServerlistSingleton {
this.#list = IPProtectionServerlistSingleton.#dataToList(
await bucket.get()
);
+
+ lazy.IPPStartupCache.storeLocationList(this.#list);
};
this.#runningPromise = fetchList().finally(
diff --git a/browser/components/ipprotection/docs/Preferences.rst b/browser/components/ipprotection/docs/Preferences.rst
@@ -5,14 +5,28 @@ This document describes preferences affecting Firefox's IP Protection.
These preferences are normally hidden and should not be used unless you really
know what you are doing.
+Feature enablement and experiments
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
``browser.ipProtection.enabled`` (boolean, default: ``false``)
- Controls the entire feature.
+ Master feature toggle controlled by Nimbus and testing harnesses.
-``browser.ipProtection.autoStartEnabled`` (boolean, default: ``false``)
- Enables the auto‑start feature.
+``browser.ipProtection.userEnabled`` (boolean, default: ``false``)
+ For testing; simulates user‑enabled state.
-``browser.ipProtection.log`` (boolean, default: ``false``)
- Enable/disable logging.
+``browser.ipProtection.variant`` (string, default: ``""``)
+ Stores the current UI experiment variant. The value is passed to
+ ``IPProtectionPanel`` to render variant-specific strings and layouts.
+
+``browser.ipProtection.added`` (boolean, default: ``false``)
+ Tracks whether the toolbar button was auto-placed next to the FxA button.
+ Once true, the widget is not reinserted automatically after manual removal.
+
+Startup and caching
+~~~~~~~~~~~~~~~~~~~
+
+``browser.ipProtection.autoStartEnabled`` (boolean, default: ``false``)
+ Enables the auto-start helper so the proxy connects during browser startup.
``browser.ipProtection.stateCache`` (string, default: ``""``)
Caches the latest ``IPProtectionStates`` value for use during startup.
@@ -20,17 +34,32 @@ know what you are doing.
``browser.ipProtection.entitlementCache`` (string, default: ``""``)
Cached entitlement JSON string used during startup to avoid network requests.
+``browser.ipProtection.locationListCache`` (string, default: ``""``)
+ Cached Guardian location list shared between ``IPProtectionService`` and
+ ``GuardianClient``.
+
``browser.ipProtection.cacheDisabled`` (boolean, default: ``false``)
- For testing; disables caching of the entitlement and the state.
+ Turns off all startup caches. Used primarily by xpcshell tests.
+
+Networking and routing
+~~~~~~~~~~~~~~~~~~~~~~
``browser.ipProtection.guardian.endpoint`` (string, default: ``"https://vpn.mozilla.org/"``)
Endpoint for the server‑side infrastructure.
+``browser.ipProtection.mode`` (integer, default: ``0``)
+ Selects which requests are proxied by ``IPPChannelFilter``:
+ ``0`` routes all traffic (``MODE_FULL``), ``1`` only private browsing windows
+ (``MODE_PB``), ``2`` only requests classified as tracking (``MODE_TRACKER``).
+
``browser.ipProtection.exceptionsMode`` (string, default: ``"all"``)
Defines which network requests are processed. Default: all.
``browser.ipProtection.domainExclusions`` (string)
Comma‑separated list of domains to exclude from the proxy.
-``browser.ipProtection.userEnabled`` (boolean, default: ``false``)
- For testing; simulates user‑enabled state.
+Diagnostics
+~~~~~~~~~~~
+
+``browser.ipProtection.log`` (boolean, default: ``false``)
+ Enable/disable logging.