Commits:
-
b861f2e0
by Pier Angelo Vendrame at 2026-09-08T14:48:02+02:00
fixup! MB 419: Mullvad Browser migration procedures.
BB 45039: Make it easier to test ProfileDataUpgrader customization.
-
1ce322f2
by Pier Angelo Vendrame at 2026-09-08T14:48:02+02:00
fixup! MB 38: Mullvad Browser configuration
MB 537: Migrate from Mullvad to Quad9 DoH.
-
d1954a60
by Pier Angelo Vendrame at 2026-09-08T14:48:58+02:00
fixup! MB 419: Mullvad Browser migration procedures.
MB 537: Implement DoH migration.
-
ae13e203
by Henry Wilkes at 2026-09-08T14:49:02+02:00
MB 538: Mullvad DoH discontinued notification.
-
a9478885
by Henry Wilkes at 2026-09-08T14:49:02+02:00
fixup! Mullvad Browser strings
MB 538: Strings for the DoH notification.
-
ab6a2587
by Pier Angelo Vendrame at 2026-09-08T14:49:03+02:00
MB 549: Customize the DoH preferences UI.
-
a16dc06a
by Pier Angelo Vendrame at 2026-09-08T14:49:03+02:00
fixup! Mullvad Browser strings
MB 549: Customize the DoH preferences UI.
10 changed files:
Changes:
browser/app/profile/000-mullvad-browser.js
| ... |
... |
@@ -11,12 +11,14 @@ pref("browser.base-browser-support-url", "https://mullvad.net/en/help/"); |
|
11
|
11
|
pref("browser.toolbars.bookmarks.visibility", "never");
|
|
12
|
12
|
|
|
13
|
13
|
// mullvad-browser#19: Enable Mullvad's DOH
|
|
14
|
|
-pref("network.trr.uri", "https://dns.mullvad.net/dns-query");
|
|
15
|
|
-pref("network.trr.default_provider_uri", "https://dns.mullvad.net/dns-query");
|
|
|
14
|
+pref("network.trr.uri", "https://doh-mullvad.quad9.net/dns-query");
|
|
|
15
|
+pref("network.trr.default_provider_uri", "https://doh-mullvad.quad9.net/dns-query");
|
|
16
|
16
|
pref("network.trr.mode", 3);
|
|
17
|
|
-pref("doh-rollout.provider-list", "[{\"UIName\":\"Mullvad\",\"autoDefault\":true,\"canonicalName\":\"\",\"id\":\"mullvad\",\"last_modified\":0,\"schema\":0,\"uri\":\"https://dns.mullvad.net/dns-query\"},{\"UIName\":\"Mullvad (Ad-blocking)\",\"autoDefault\":false,\"canonicalName\":\"\",\"id\":\"mullvad\",\"last_modified\":0,\"schema\":0,\"uri\":\"https://adblock.dns.mullvad.net/dns-query\"}]");
|
|
|
17
|
+pref("doh-rollout.provider-list", "[{\"uri\":\"https://doh-mullvad.quad9.net/dns-query\",\"UIName\":\"Quad9 - no threat blocking\",\"schema\":0,\"autoDefault\":false,\"canonicalName\":\"\",\"id\":\"quad9-no-threat-blocking\",\"last_modified\":0},{\"uri\":\"https://dns.quad9.net/dns-query\",\"UIName\":\"Quad9 - secure: threat blocking\",\"schema\":0,\"autoDefault\":true,\"canonicalName\":\"\",\"id\":\"quad9-threat-blocking\",\"last_modified\":0}]");
|
|
18
|
18
|
// mullvad-browser#122: Audit DoH heuristics
|
|
19
|
19
|
pref("doh-rollout.disable-heuristics", true);
|
|
|
20
|
+// mullvad-browser#537: migrate users from Mullvad DoH service.
|
|
|
21
|
+pref("mullvadbrowser.migration.show_doh_notification", false);
|
|
20
|
22
|
|
|
21
|
23
|
// mullvad-browser#87: Windows and Linux need additional work to make the
|
|
22
|
24
|
// default browser choice working.
|
browser/base/content/browser-main.js
| ... |
... |
@@ -30,6 +30,7 @@ |
|
30
|
30
|
Services.scriptloader.loadSubScript("chrome://browser/content/places/places-menupopup.js", this);
|
|
31
|
31
|
Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
|
|
32
|
32
|
Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
|
|
|
33
|
+ Services.scriptloader.loadSubScript("chrome://browser/content/mullvadDoHNotification.js", this);
|
|
33
|
34
|
Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this);
|
|
34
|
35
|
if (AIWindow.isOpeningAIWindow(window)) {
|
|
35
|
36
|
ChromeUtils.importESModule("chrome://browser/content/urlbar/SmartbarInput.mjs", { global: "current" });
|
browser/base/content/browser.xhtml
| ... |
... |
@@ -93,6 +93,7 @@ |
|
93
|
93
|
<link rel="localization" href="">"browser/syncedTabs.ftl"/>
|
|
94
|
94
|
<link rel="localization" href="">"browser/profiles.ftl"/>
|
|
95
|
95
|
<link rel="localization" href="">"toolkit/global/base-browser.ftl"/>
|
|
|
96
|
+ <link rel="localization" href="">"toolkit/global/mullvad-browser.ftl"/>
|
|
96
|
97
|
<!-- Untranslated FTL files -->
|
|
97
|
98
|
<link rel="localization" href="">"preview/credentialChooser.ftl" />
|
|
98
|
99
|
<link rel="localization" href="">"preview/enUS-searchFeatures.ftl" />
|
browser/base/content/mullvadDoHNotification.js
|
|
1
|
+"use strict";
|
|
|
2
|
+
|
|
|
3
|
+window.addEventListener("load", () => {
|
|
|
4
|
+ // A notification to let users known that their DNS over HTTPS settings have
|
|
|
5
|
+ // changed because the mullvad DoH services has been discontinued and
|
|
|
6
|
+ // replaced. tor-browser#538.
|
|
|
7
|
+ const notification = {
|
|
|
8
|
+ // ProfileDataUpgrader.upgradeMB migration will set the `showPref`
|
|
|
9
|
+ // preference conditionally on whether the user is effected. We wait for
|
|
|
10
|
+ // this preference for confirmation.
|
|
|
11
|
+ showPref: "mullvadbrowser.migration.show_doh_notification",
|
|
|
12
|
+ shown: false,
|
|
|
13
|
+
|
|
|
14
|
+ init() {
|
|
|
15
|
+ Services.prefs.addObserver(this.showPref, this);
|
|
|
16
|
+ this.maybeShow();
|
|
|
17
|
+ },
|
|
|
18
|
+
|
|
|
19
|
+ observe() {
|
|
|
20
|
+ this.maybeShow();
|
|
|
21
|
+ },
|
|
|
22
|
+
|
|
|
23
|
+ async maybeShow() {
|
|
|
24
|
+ if (this.shown || !Services.prefs.getBoolPref(this.showPref, false)) {
|
|
|
25
|
+ return;
|
|
|
26
|
+ }
|
|
|
27
|
+ this.shown = true;
|
|
|
28
|
+ Services.prefs.removeObserver(this.showPref, this);
|
|
|
29
|
+
|
|
|
30
|
+ gNotificationBox.appendNotification(
|
|
|
31
|
+ "mullvad-doh-notification",
|
|
|
32
|
+ {
|
|
|
33
|
+ label: { "l10n-id": "mullvad-doh-notification-body" },
|
|
|
34
|
+ priority: gNotificationBox.PRIORITY_INFO_HIGH,
|
|
|
35
|
+ eventCallback: name => {
|
|
|
36
|
+ if (name === "dismissed") {
|
|
|
37
|
+ Services.prefs.clearUserPref(this.showPref);
|
|
|
38
|
+ }
|
|
|
39
|
+ },
|
|
|
40
|
+ },
|
|
|
41
|
+ [
|
|
|
42
|
+ {
|
|
|
43
|
+ "l10n-id": "moz-support-link-text",
|
|
|
44
|
+ link: "https://mullvad.net/en/blog/shutting-down-our-public-encrypted-dns-servers-and-sponsoring-quad9-instead",
|
|
|
45
|
+ },
|
|
|
46
|
+ {
|
|
|
47
|
+ "l10n-id": "mullvad-doh-notification-settings-button",
|
|
|
48
|
+ primary: true,
|
|
|
49
|
+ callback: () => {
|
|
|
50
|
+ window.openPreferences("privacy-doh");
|
|
|
51
|
+ Services.prefs.clearUserPref(this.showPref);
|
|
|
52
|
+ // Keep the notification open in case the user wants to click
|
|
|
53
|
+ // "Learn more".
|
|
|
54
|
+ return true;
|
|
|
55
|
+ },
|
|
|
56
|
+ },
|
|
|
57
|
+ ]
|
|
|
58
|
+ );
|
|
|
59
|
+ },
|
|
|
60
|
+ };
|
|
|
61
|
+ notification.init();
|
|
|
62
|
+}); |
browser/base/jar.mn
| ... |
... |
@@ -101,4 +101,5 @@ browser.jar: |
|
101
|
101
|
content/browser/spotlight.js (content/spotlight.js)
|
|
102
|
102
|
* content/browser/default-bookmarks.html (content/default-bookmarks.html)
|
|
103
|
103
|
|
|
|
104
|
+ content/browser/mullvadDoHNotification.js (content/mullvadDoHNotification.js)
|
|
104
|
105
|
content/browser/languageNotification.js (content/languageNotification.js) |
browser/components/ProfileDataUpgrader.sys.mjs
| ... |
... |
@@ -1191,12 +1191,21 @@ export let ProfileDataUpgrader = { |
|
1191
|
1191
|
Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
|
|
1192
|
1192
|
},
|
|
1193
|
1193
|
|
|
1194
|
|
- async upgradeMB(isNewProfile) {
|
|
|
1194
|
+ /**
|
|
|
1195
|
+ * Run the profile data migration for Tor Browser if needed.
|
|
|
1196
|
+ *
|
|
|
1197
|
+ * @param {boolean} isNewProfile When true, just set the migration version
|
|
|
1198
|
+ * without actually changing anything.
|
|
|
1199
|
+ * @param {number} [currentVersion] The version to migrating from. To be used
|
|
|
1200
|
+ * only by tests.
|
|
|
1201
|
+ */
|
|
|
1202
|
+ async upgradeMB(isNewProfile, currentVersion) {
|
|
1195
|
1203
|
// Version 1: Mullvad Browser 14.5a6: Clear home page update url preference
|
|
1196
|
1204
|
// (mullvad-browser#411).
|
|
1197
|
1205
|
// Version 2: Mullvad Browser 15.0a2: Remove legacy search addons
|
|
1198
|
1206
|
// (tor-browser#43111).
|
|
1199
|
|
- const MB_MIGRATION_VERSION = 2;
|
|
|
1207
|
+ // Version 3: Mullvad Browser 16.0a12: DoH migration (mullvad-browser#537).
|
|
|
1208
|
+ const MB_MIGRATION_VERSION = 3;
|
|
1200
|
1209
|
const MIGRATION_PREF = "mullvadbrowser.migration.version";
|
|
1201
|
1210
|
|
|
1202
|
1211
|
if (isNewProfile) {
|
| ... |
... |
@@ -1209,11 +1218,14 @@ export let ProfileDataUpgrader = { |
|
1209
|
1218
|
console.error("upgradeTB: isNewProfile is undefined.");
|
|
1210
|
1219
|
}
|
|
1211
|
1220
|
|
|
1212
|
|
- const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
|
|
|
1221
|
+ if (currentVersion === undefined) {
|
|
|
1222
|
+ currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
|
|
|
1223
|
+ }
|
|
1213
|
1224
|
|
|
1214
|
1225
|
if (currentVersion < 1) {
|
|
1215
|
1226
|
Services.prefs.clearUserPref("mullvadbrowser.post_update.url");
|
|
1216
|
1227
|
}
|
|
|
1228
|
+
|
|
1217
|
1229
|
const dropAddons = async list => {
|
|
1218
|
1230
|
for (const id of list) {
|
|
1219
|
1231
|
try {
|
| ... |
... |
@@ -1222,6 +1234,7 @@ export let ProfileDataUpgrader = { |
|
1222
|
1234
|
} catch {}
|
|
1223
|
1235
|
}
|
|
1224
|
1236
|
};
|
|
|
1237
|
+
|
|
1225
|
1238
|
if (currentVersion < 2) {
|
|
1226
|
1239
|
await dropAddons([
|
|
1227
|
1240
|
"brave@xxxxxxxxxxxxxxxxxx",
|
| ... |
... |
@@ -1234,6 +1247,36 @@ export let ProfileDataUpgrader = { |
|
1234
|
1247
|
]);
|
|
1235
|
1248
|
}
|
|
1236
|
1249
|
|
|
|
1250
|
+ if (currentVersion < 3) {
|
|
|
1251
|
+ this.upgradeDoH();
|
|
|
1252
|
+ }
|
|
|
1253
|
+
|
|
1237
|
1254
|
Services.prefs.setIntPref(MIGRATION_PREF, MB_MIGRATION_VERSION);
|
|
1238
|
1255
|
},
|
|
|
1256
|
+
|
|
|
1257
|
+ upgradeDoH() {
|
|
|
1258
|
+ const DOH_NOTIFICATION_PREF =
|
|
|
1259
|
+ "mullvadbrowser.migration.show_doh_notification";
|
|
|
1260
|
+ const DOH_URI_PREF = "network.trr.uri";
|
|
|
1261
|
+ const DOH_MODE_PREF = "network.trr.mode";
|
|
|
1262
|
+ const MULLVAD_ADBLOCK_URL = "https://adblock.dns.mullvad.net/dns-query";
|
|
|
1263
|
+
|
|
|
1264
|
+ const dohMode = Services.prefs.getIntPref(DOH_MODE_PREF, -1);
|
|
|
1265
|
+ const usesAdBlock =
|
|
|
1266
|
+ Services.prefs.getStringPref(DOH_URI_PREF, "") === MULLVAD_ADBLOCK_URL;
|
|
|
1267
|
+ const usesCustomUri =
|
|
|
1268
|
+ Services.prefs.prefHasUserValue(DOH_URI_PREF) && !usesAdBlock;
|
|
|
1269
|
+ if (
|
|
|
1270
|
+ dohMode === Ci.nsIDNSService.MODE_TRROFF ||
|
|
|
1271
|
+ (dohMode === Ci.nsIDNSService.MODE_TRRONLY && usesCustomUri)
|
|
|
1272
|
+ ) {
|
|
|
1273
|
+ return;
|
|
|
1274
|
+ }
|
|
|
1275
|
+
|
|
|
1276
|
+ Services.prefs.setIntPref(DOH_MODE_PREF, Ci.nsIDNSService.MODE_TRRONLY);
|
|
|
1277
|
+ if (usesAdBlock) {
|
|
|
1278
|
+ Services.prefs.clearUserPref(DOH_URI_PREF);
|
|
|
1279
|
+ }
|
|
|
1280
|
+ Services.prefs.setBoolPref(DOH_NOTIFICATION_PREF, true);
|
|
|
1281
|
+ },
|
|
1239
|
1282
|
}; |
browser/components/preferences/config/privacy.mjs
| ... |
... |
@@ -1103,15 +1103,10 @@ SettingGroupManager.registerGroups({ |
|
1103
|
1103
|
id: "dohRadioGroup",
|
|
1104
|
1104
|
control: "moz-radio-group",
|
|
1105
|
1105
|
options: [
|
|
1106
|
|
- {
|
|
1107
|
|
- id: "dohRadioDefault",
|
|
1108
|
|
- value: "default",
|
|
1109
|
|
- l10nId: "preferences-doh-radio-default",
|
|
1110
|
|
- },
|
|
1111
|
1106
|
{
|
|
1112
|
1107
|
id: "dohRadioCustom",
|
|
1113
|
1108
|
value: "custom",
|
|
1114
|
|
- l10nId: "preferences-doh-radio-custom",
|
|
|
1109
|
+ l10nId: "mullvad-preferences-doh-radio-always-on",
|
|
1115
|
1110
|
items: [
|
|
1116
|
1111
|
{
|
|
1117
|
1112
|
id: "dohFallbackIfCustom",
|
| ... |
... |
@@ -1132,7 +1127,7 @@ SettingGroupManager.registerGroups({ |
|
1132
|
1127
|
{
|
|
1133
|
1128
|
id: "dohRadioOff",
|
|
1134
|
1129
|
value: "off",
|
|
1135
|
|
- l10nId: "preferences-doh-radio-off",
|
|
|
1130
|
+ l10nId: "mullvad-preferences-doh-radio-off",
|
|
1136
|
1131
|
},
|
|
1137
|
1132
|
],
|
|
1138
|
1133
|
},
|
| ... |
... |
@@ -3210,14 +3205,13 @@ Preferences.addSetting({ |
|
3210
|
3205
|
id: "dohModeBoxItem",
|
|
3211
|
3206
|
deps: ["dohMode"],
|
|
3212
|
3207
|
getControlConfig: (config, deps) => {
|
|
3213
|
|
- let l10nId = "preferences-doh-overview-off";
|
|
|
3208
|
+ let l10nId = "mullvad-preferences-doh-overview-off";
|
|
3214
|
3209
|
if (deps.dohMode.value == Ci.nsIDNSService.MODE_NATIVEONLY) {
|
|
3215
|
3210
|
l10nId = "preferences-doh-overview-default";
|
|
3216
|
|
- } else if (
|
|
3217
|
|
- deps.dohMode.value == Ci.nsIDNSService.MODE_TRRFIRST ||
|
|
3218
|
|
- deps.dohMode.value == Ci.nsIDNSService.MODE_TRRONLY
|
|
3219
|
|
- ) {
|
|
|
3211
|
+ } else if (deps.dohMode.value == Ci.nsIDNSService.MODE_TRRFIRST) {
|
|
3220
|
3212
|
l10nId = "preferences-doh-overview-custom";
|
|
|
3213
|
+ } else if (deps.dohMode.value == Ci.nsIDNSService.MODE_TRRONLY) {
|
|
|
3214
|
+ l10nId = "mullvad-preferences-doh-overview-always-on";
|
|
3221
|
3215
|
}
|
|
3222
|
3216
|
return {
|
|
3223
|
3217
|
...config,
|
| ... |
... |
@@ -3428,6 +3422,7 @@ Preferences.addSetting({ |
|
3428
|
3422
|
// for the mismatch of control-to-pref.
|
|
3429
|
3423
|
deps: ["dohMode"],
|
|
3430
|
3424
|
disabled: ({ dohMode }) => dohMode.locked,
|
|
|
3425
|
+ visible: () => false,
|
|
3431
|
3426
|
onUserChange: val => {
|
|
3432
|
3427
|
if (val) {
|
|
3433
|
3428
|
Glean.securityDohSettings.modeChangedButton.record({
|
browser/components/tests/unit/test_profileDataUpgrade_mullvad_doh.js
|
|
1
|
+/* Any copyright is dedicated to the Public Domain.
|
|
|
2
|
+https://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
3
|
+
|
|
|
4
|
+"use strict";
|
|
|
5
|
+
|
|
|
6
|
+const { ProfileDataUpgrader } = ChromeUtils.importESModule(
|
|
|
7
|
+ "moz-src:///browser/components/ProfileDataUpgrader.sys.mjs"
|
|
|
8
|
+);
|
|
|
9
|
+
|
|
|
10
|
+const DOH_NOTIFICATION_PREF = "mullvadbrowser.migration.show_doh_notification";
|
|
|
11
|
+const DOH_URI_PREF = "network.trr.uri";
|
|
|
12
|
+const DOH_MODE_PREF = "network.trr.mode";
|
|
|
13
|
+const MULLVAD_ADBLOCK_URL = "https://adblock.dns.mullvad.net/dns-query";
|
|
|
14
|
+
|
|
|
15
|
+/**
|
|
|
16
|
+ * Run a test case.
|
|
|
17
|
+ *
|
|
|
18
|
+ * The test takes for granted the final mode can be either off (only if it was
|
|
|
19
|
+ * already) or TRR-only in all other cases.
|
|
|
20
|
+ * The caller need to supply the expected outcomes for the other prefs.
|
|
|
21
|
+ *
|
|
|
22
|
+ * @param {number} mode The mode to set before the migration
|
|
|
23
|
+ * @param {string?} oldUri The URI to set before the migration, or null to clear
|
|
|
24
|
+ * the related preference.
|
|
|
25
|
+ * @param {string?} newUri The expected new value for the preference, or null if
|
|
|
26
|
+ * the preference should have its default value.
|
|
|
27
|
+ * @param {boolean} showNotification The expected value for the preference that
|
|
|
28
|
+ * signals that the change notification should be shown to the UI.
|
|
|
29
|
+ */
|
|
|
30
|
+async function runTest(mode, oldUri, newUri, showNotification) {
|
|
|
31
|
+ info(`Running test for mode ${mode} and old uri ${oldUri}.`);
|
|
|
32
|
+
|
|
|
33
|
+ Services.prefs.setIntPref(DOH_MODE_PREF, mode);
|
|
|
34
|
+ if (oldUri !== null) {
|
|
|
35
|
+ Services.prefs.setStringPref(DOH_URI_PREF, oldUri);
|
|
|
36
|
+ } else {
|
|
|
37
|
+ Services.prefs.clearUserPref(DOH_URI_PREF);
|
|
|
38
|
+ }
|
|
|
39
|
+ Services.prefs.clearUserPref(DOH_NOTIFICATION_PREF);
|
|
|
40
|
+
|
|
|
41
|
+ await ProfileDataUpgrader.upgradeMB(false, 2);
|
|
|
42
|
+
|
|
|
43
|
+ if (newUri) {
|
|
|
44
|
+ Assert.equal(Services.prefs.getStringPref(DOH_URI_PREF), newUri);
|
|
|
45
|
+ } else {
|
|
|
46
|
+ Assert.ok(
|
|
|
47
|
+ !Services.prefs.prefHasUserValue(DOH_URI_PREF),
|
|
|
48
|
+ "The migration was supposed to clear the custom URI and so it did."
|
|
|
49
|
+ );
|
|
|
50
|
+ }
|
|
|
51
|
+
|
|
|
52
|
+ if (mode === Ci.nsIDNSService.MODE_TRROFF) {
|
|
|
53
|
+ Assert.equal(
|
|
|
54
|
+ Services.prefs.getIntPref(DOH_MODE_PREF, -1),
|
|
|
55
|
+ Ci.nsIDNSService.MODE_TRROFF,
|
|
|
56
|
+ "The migration did not turn on DoH."
|
|
|
57
|
+ );
|
|
|
58
|
+ } else {
|
|
|
59
|
+ Assert.equal(
|
|
|
60
|
+ Services.prefs.getIntPref(DOH_MODE_PREF, -1),
|
|
|
61
|
+ Ci.nsIDNSService.MODE_TRRONLY,
|
|
|
62
|
+ "Regardless of the starting mode, after the migration we are on TRR-only."
|
|
|
63
|
+ );
|
|
|
64
|
+ }
|
|
|
65
|
+
|
|
|
66
|
+ Assert.equal(
|
|
|
67
|
+ Services.prefs.getBoolPref(DOH_NOTIFICATION_PREF, false),
|
|
|
68
|
+ showNotification,
|
|
|
69
|
+ `The value for ${DOH_NOTIFICATION_PREF} is correct after the migration`
|
|
|
70
|
+ );
|
|
|
71
|
+}
|
|
|
72
|
+
|
|
|
73
|
+add_task(async function test_default_uri() {
|
|
|
74
|
+ // Max protection (our default): inherits the URI change, so we need to show
|
|
|
75
|
+ // the notification.
|
|
|
76
|
+ await runTest(Ci.nsIDNSService.MODE_TRRONLY, null, null, true);
|
|
|
77
|
+ // We move default and increased protection to maximum protection, and they
|
|
|
78
|
+ // inherit the default URI: show the notification.
|
|
|
79
|
+ await runTest(Ci.nsIDNSService.MODE_NATIVEONLY, null, null, true);
|
|
|
80
|
+ await runTest(Ci.nsIDNSService.MODE_TRRFIRST, null, null, true);
|
|
|
81
|
+});
|
|
|
82
|
+
|
|
|
83
|
+add_task(async function test_mullvad_adblock() {
|
|
|
84
|
+ // Mullvad Adblock was retired, so move to the default URI with maximum
|
|
|
85
|
+ // protection. Show the notification.
|
|
|
86
|
+ // This option could be set only with TRR first and TRR only, so test only
|
|
|
87
|
+ // those.
|
|
|
88
|
+ await runTest(
|
|
|
89
|
+ Ci.nsIDNSService.MODE_TRRFIRST,
|
|
|
90
|
+ MULLVAD_ADBLOCK_URL,
|
|
|
91
|
+ null,
|
|
|
92
|
+ true
|
|
|
93
|
+ );
|
|
|
94
|
+ await runTest(Ci.nsIDNSService.MODE_TRRONLY, MULLVAD_ADBLOCK_URL, null, true);
|
|
|
95
|
+});
|
|
|
96
|
+
|
|
|
97
|
+add_task(async function test_custom_provider() {
|
|
|
98
|
+ const CUSTOM_URL = "https://example.org/dns";
|
|
|
99
|
+ // Custom provider + TRR-only: nothing should change, do not show the
|
|
|
100
|
+ // notification.
|
|
|
101
|
+ await runTest(Ci.nsIDNSService.MODE_TRRONLY, CUSTOM_URL, CUSTOM_URL, false);
|
|
|
102
|
+ // Custom provider but TRR-first: we change it to TRR-only, so we should show
|
|
|
103
|
+ // a notification.
|
|
|
104
|
+ await runTest(Ci.nsIDNSService.MODE_TRRFIRST, CUSTOM_URL, CUSTOM_URL, true);
|
|
|
105
|
+ // Firefox's "default" mode and off automatically reset the provider URI, so
|
|
|
106
|
+ // we do not test them here.
|
|
|
107
|
+});
|
|
|
108
|
+
|
|
|
109
|
+add_task(async function test_update_doh_disabled() {
|
|
|
110
|
+ // No DoH: the migration should not turn it on. I.e., no changes, therefore no
|
|
|
111
|
+ // notification as well.
|
|
|
112
|
+ // Firefox resets the URL to the default one from the UI, so test only the
|
|
|
113
|
+ // default URI case.
|
|
|
114
|
+ await runTest(Ci.nsIDNSService.MODE_TRROFF, null, null, false);
|
|
|
115
|
+}); |
browser/components/tests/unit/xpcshell.toml
| ... |
... |
@@ -37,6 +37,9 @@ skip-if = [ |
|
37
|
37
|
|
|
38
|
38
|
["test_distribution_observer.js"]
|
|
39
|
39
|
|
|
|
40
|
+["test_profileDataUpgrade_mullvad_doh.js"]
|
|
|
41
|
+tags = "mullvad-browser"
|
|
|
42
|
+
|
|
40
|
43
|
["test_profileDataUpgrade_smartwindow.js"]
|
|
41
|
44
|
|
|
42
|
45
|
["test_profileDataUpgrade_smartwindow_semanticHistory.js"]
|
toolkit/locales/en-US/toolkit/global/mullvad-browser.ftl
| ... |
... |
@@ -32,3 +32,26 @@ home-mode-choice-mullvad = |
|
32
|
32
|
|
|
33
|
33
|
telemetry-title = Telemetry Information
|
|
34
|
34
|
telemetry-description = Telemetry is disabled in { -brand-short-name }.
|
|
|
35
|
+
|
|
|
36
|
+## DNS over HTTPS settings customization.
|
|
|
37
|
+
|
|
|
38
|
+mullvad-preferences-doh-overview-always-on =
|
|
|
39
|
+ .label = Always on
|
|
|
40
|
+ .description = Always use secure DNS.
|
|
|
41
|
+mullvad-preferences-doh-overview-off =
|
|
|
42
|
+ .label = Off
|
|
|
43
|
+ .description = Use your default DNS resolver.
|
|
|
44
|
+mullvad-preferences-doh-radio-always-on =
|
|
|
45
|
+ .label = Always on
|
|
|
46
|
+ .description = Always use secure DNS
|
|
|
47
|
+mullvad-preferences-doh-radio-off =
|
|
|
48
|
+ .label = Off (recommended when using a VPN)
|
|
|
49
|
+ .description = Use your default DNS resolver
|
|
|
50
|
+
|
|
|
51
|
+## DNS over HTTPS provider changed notification.
|
|
|
52
|
+
|
|
|
53
|
+# The first sentence should be wrapped in '<strong>' and '</strong>'.
|
|
|
54
|
+# "Mullvad" is an organization name.
|
|
|
55
|
+mullvad-doh-notification-body = <strong>You default DNS Over HTTPS settings have been changed.</strong> Mullvad secure DNS service is being discontinued.
|
|
|
56
|
+mullvad-doh-notification-settings-button =
|
|
|
57
|
+ .label = Review settings |
|