tbb-commits
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 1 participants
- 18610 discussions

[Git][tpo/applications/tor-browser][tor-browser-115.9.0esr-13.5-1] fixup! Adding issue and merge request templates
by richard (@richard) 09 Apr '24
by richard (@richard) 09 Apr '24
09 Apr '24
richard pushed to branch tor-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
00c2adf5 by Richard Pospesel at 2024-04-09T20:50:01+00:00
fixup! Adding issue and merge request templates
add an issue template to guide emergency bug fixes
- - - - -
1 changed file:
- + .gitlab/issue_templates/Emergency Security Issue.md
Changes:
=====================================
.gitlab/issue_templates/Emergency Security Issue.md
=====================================
@@ -0,0 +1,90 @@
+**NOTE** This is an issue template to standardise our process for responding to and fixing critical security and privacy vulnerabilities, exploits, etc.
+
+## Information
+
+### Related Issue
+- tor-browser#AAAAA
+- mullvad-browser#BBBBB
+- tor-browser-build#CCCCC
+
+#### Affected Platforms
+
+- [ ] Android
+- [ ] Desktop
+ - [ ] Windows
+ - [ ] macOS
+ - [ ] Linux
+
+### Type of Issue: What are we dealing with?
+
+- [ ] Security (sandbox escape, remote code execution, etc)
+- [ ] Proxy Bypass (traffic contents becoming MITM'able)
+- [ ] De-Anonymization (otherwise identifying which website a user is visiting)
+- [ ] Cross-Site Linkability (correlating sessions across circuits and websites)
+- [ ] Disk Leak (persisting session information to disk)
+- [ ] Other (please explain)
+
+### Involvement: Who needs to be consulted and or involved to fix this?
+
+- [ ] Applications Developers
+ - [ ] **boklm** : build, packaging, signing, release
+ - [ ] **clairehurst** : Android, macOS
+ - [ ] **dan** : Android, macOS
+ - [ ] **henry** : accessibility, frontend, localisation
+ - [ ] **ma1** : firefox internals
+ - [ ] **pierov** : updater, fonts, localisation, general
+ - [ ] **richard** : signing, release
+ - [ ] **thorin** : fingerprinting
+- [ ] Other Engineering Teams
+ - [ ] Networking (**ahf**, **dgoulet**)
+ - [ ] Anti-Censorship (**meskio**, **cohosh**)
+ - [ ] UX (**donuts**)
+ - [ ] TPA (**anarcat**, **lavamind**)
+- [ ] External Tor Partners
+ - [ ] Mozilla
+ - [ ] Mullvad
+ - [ ] Brave
+ - [ ] Guardian Project (Orbot, Onion Browser)
+ - [ ] Tails
+ - [ ] Other (please list)
+
+### Urgency: When do we need to act?
+
+- [ ] **ASAP** :rotating_light: Emergency release :rotating_light:
+- [ ] Next scheduled stable
+- [ ] Next scheduled alpha, then backport to stable
+- [ ] Next major release
+- [ ] Other (please explain)
+
+#### Justification
+
+<!-- Provide some paragraph here justifying the logic behind our estimated urgency -->
+
+### Side-Effects: Who will be affected by a fix for this?
+Sometimes fixes have side-effects: users lose their data, roadmaps need to be adjusted, services have to be upgraded, etc. Please enumerate the known downstream consequences a fix to this issue will likely incur.
+- [ ] End-Users (please list)
+- [ ] Internal Partners (please list)
+- [ ] External Partners (please list)
+
+## Todo:
+
+### Communications
+
+- [ ] Start an initial email thread with the following people:
+ - [ ] **bella**
+ - [ ] Relevant Applications Developers
+ - [ ] **(Optional)** **micah**
+ - if there are considerations or asks outside the Applications Team
+ - [ ] **(Optional)** Other Team Leads
+ - if there are considerations or asks outside the Applications Team
+ - [ ] **(Optional)** **gazebook**
+ - if there are consequences to the organisation or partners beyond a browser update, then a communication plan may be needed
+
+/cc @bella
+/cc @ma1
+/cc @micah
+/cc @richard
+
+/confidential
+
+Godspeed! :pray:
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/00c2adf…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/00c2adf…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/tor-browser][tor-browser-115.9.0esr-13.5-1] 4 commits: fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in...
by richard (@richard) 09 Apr '24
by richard (@richard) 09 Apr '24
09 Apr '24
richard pushed to branch tor-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
d4a4b72b by Henry Wilkes at 2024-04-09T19:54:28+00:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 42207: Migrate preferences strings to Fluent.
- - - - -
6b080bf1 by Henry Wilkes at 2024-04-09T19:54:28+00:00
fixup! Tor Browser strings
Bug 42207: Migrate preferences strings to Fluent.
- - - - -
7ff82efa by Henry Wilkes at 2024-04-09T19:54:28+00:00
fixup! Add TorStrings module for localization
Bug 42207: Migrate preferences strings to Fluent.
- - - - -
446e78a5 by Henry Wilkes at 2024-04-09T19:54:28+00:00
fixup! Tor Browser localization migration scripts.
Bug 42207: Migrate preferences to Fluent.
- - - - -
19 changed files:
- browser/components/torpreferences/content/bridgeQrDialog.js
- browser/components/torpreferences/content/bridgeQrDialog.xhtml
- browser/components/torpreferences/content/builtinBridgeDialog.js
- browser/components/torpreferences/content/builtinBridgeDialog.xhtml
- browser/components/torpreferences/content/connectionCategory.inc.xhtml
- browser/components/torpreferences/content/connectionPane.js
- browser/components/torpreferences/content/connectionPane.xhtml
- browser/components/torpreferences/content/connectionSettingsDialog.js
- browser/components/torpreferences/content/connectionSettingsDialog.xhtml
- browser/components/torpreferences/content/provideBridgeDialog.js
- browser/components/torpreferences/content/requestBridgeDialog.js
- browser/components/torpreferences/content/requestBridgeDialog.xhtml
- browser/components/torpreferences/content/torLogDialog.js
- browser/components/torpreferences/content/torLogDialog.xhtml
- browser/components/torpreferences/content/torPreferences.css
- browser/locales/en-US/browser/tor-browser.ftl
- toolkit/modules/TorStrings.sys.mjs
- toolkit/torbutton/chrome/locale/en-US/settings.properties
- + tools/torbrowser/l10n/migrations/bug-42207-settings.py
Changes:
=====================================
browser/components/torpreferences/content/bridgeQrDialog.js
=====================================
@@ -4,19 +4,11 @@ const { QRCode } = ChromeUtils.importESModule(
"resource://gre/modules/QRCode.sys.mjs"
);
-const { TorStrings } = ChromeUtils.importESModule(
- "resource://gre/modules/TorStrings.sys.mjs"
-);
-
window.addEventListener(
"DOMContentLoaded",
() => {
const bridgeString = window.arguments[0];
- document.documentElement.setAttribute(
- "title",
- TorStrings.settings.scanQrTitle
- );
const target = document.getElementById("bridgeQr-target");
const style = window.getComputedStyle(target);
// We are assuming that the style width and height have "px" units.
=====================================
browser/components/torpreferences/content/bridgeQrDialog.xhtml
=====================================
@@ -7,8 +7,13 @@
type="child"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
+ data-l10n-id="bridge-qr-dialog-title"
>
<dialog id="bridgeQr-dialog" buttons="accept">
+ <linkset>
+ <html:link rel="localization" href="browser/tor-browser.ftl" />
+ </linkset>
+
<script src="chrome://browser/content/torpreferences/bridgeQrDialog.js" />
<html:div id="bridgeQr">
=====================================
browser/components/torpreferences/content/builtinBridgeDialog.js
=====================================
@@ -1,9 +1,5 @@
"use strict";
-const { TorStrings } = ChromeUtils.importESModule(
- "resource://gre/modules/TorStrings.sys.mjs"
-);
-
const { TorSettings, TorBridgeSource } = ChromeUtils.importESModule(
"resource://gre/modules/TorSettings.sys.mjs"
);
@@ -16,34 +12,10 @@ const gBuiltinBridgeDialog = {
init() {
this._result = window.arguments[0];
- document.documentElement.setAttribute(
- "title",
- TorStrings.settings.builtinBridgeHeader
- );
-
- document.getElementById(
- "torPreferences-builtinBridge-description"
- ).textContent = TorStrings.settings.builtinBridgeDescription2;
-
this._radioGroup = document.getElementById(
"torPreferences-builtinBridge-typeSelection"
);
- const typeStrings = {
- obfs4: {
- label: TorStrings.settings.builtinBridgeObfs4Title,
- descr: TorStrings.settings.builtinBridgeObfs4Description2,
- },
- snowflake: {
- label: TorStrings.settings.builtinBridgeSnowflake,
- descr: TorStrings.settings.builtinBridgeSnowflakeDescription2,
- },
- "meek-azure": {
- label: TorStrings.settings.builtinBridgeMeekAzure,
- descr: TorStrings.settings.builtinBridgeMeekAzureDescription2,
- },
- };
-
const currentBuiltinType =
TorSettings.bridges.enabled &&
TorSettings.bridges.source == TorBridgeSource.BuiltIn
@@ -56,16 +28,18 @@ const gBuiltinBridgeDialog = {
const radio = optionEl.querySelector("radio");
const type = radio.value;
optionEl.hidden = !TorSettings.builtinBridgeTypes.includes(type);
- radio.label = typeStrings[type].label;
+
const descriptionEl = optionEl.querySelector(
".builtin-bridges-option-description"
);
- descriptionEl.textContent = typeStrings[type].descr;
+ // Set an id to be used for the aria-describedby.
+ descriptionEl.id = `builtin-bridges-description-${type}`;
const currentBadge = optionEl.querySelector(".bridge-status-badge");
if (type === currentBuiltinType) {
const currentLabelEl = optionEl.querySelector(
".torPreferences-current-bridge-label"
);
+ currentLabelEl.id = `builtin-bridges-current-${type}`;
// Described by both the current badge and the full description.
// These will be concatenated together in the screen reader output.
radio.setAttribute(
@@ -77,6 +51,7 @@ const gBuiltinBridgeDialog = {
} else {
// No visible badge.
radio.setAttribute("aria-describedby", descriptionEl.id);
+ currentBadge.classList.remove("bridge-status-current-built-in");
}
}
@@ -117,10 +92,8 @@ const gBuiltinBridgeDialog = {
const connect = TorConnect.canBeginBootstrap;
this._result.connect = connect;
this._acceptButton.setAttribute(
- "label",
- connect
- ? TorStrings.settings.bridgeButtonConnect
- : TorStrings.settings.bridgeButtonAccept
+ "data-l10n-id",
+ connect ? "bridge-dialog-button-connect" : "bridge-dialog-button-accept"
);
},
=====================================
browser/components/torpreferences/content/builtinBridgeDialog.xhtml
=====================================
@@ -7,26 +7,30 @@
type="child"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
+ data-l10n-id="built-in-dialog-title"
>
<dialog id="torPreferences-builtinBridge-dialog" buttons="accept,cancel">
<linkset>
+ <html:link rel="localization" href="branding/brand.ftl" />
<html:link rel="localization" href="browser/tor-browser.ftl" />
</linkset>
<script src="chrome://browser/content/torpreferences/builtinBridgeDialog.js" />
- <description id="torPreferences-builtinBridge-description"> </description>
+ <description data-l10n-id="built-in-dialog-introduction"></description>
<radiogroup id="torPreferences-builtinBridge-typeSelection">
<vbox class="builtin-bridges-option">
<hbox>
<!-- The radio option is described by both the "Current bridge" label
- and the full description. If the "Connected" label is hidden, then
- only the latter description should contribute. -->
- <radio value="obfs4" />
+ <radio
+ value="obfs4"
+ data-l10n-id="built-in-dialog-obfs4-radio-option"
+ />
<html:span class="bridge-status-badge">
<html:div class="bridge-status-icon"></html:div>
<html:span
- id="obfs-bridges-current"
class="torPreferences-current-bridge-label"
data-l10n-id="built-in-dialog-current-bridge-label"
>
@@ -34,18 +38,20 @@
</html:span>
</hbox>
<html:div
- id="obfs-bridges-description"
class="indent builtin-bridges-option-description"
+ data-l10n-id="tor-bridges-built-in-obfs4-description"
>
</html:div>
</vbox>
<vbox class="builtin-bridges-option">
<hbox>
- <radio value="snowflake" />
+ <radio
+ value="snowflake"
+ data-l10n-id="built-in-dialog-snowflake-radio-option"
+ />
<html:span class="bridge-status-badge">
<html:div class="bridge-status-icon"></html:div>
<html:span
- id="snowflake-bridges-current"
class="torPreferences-current-bridge-label"
data-l10n-id="built-in-dialog-current-bridge-label"
>
@@ -53,18 +59,20 @@
</html:span>
</hbox>
<html:div
- id="snowflake-bridges-description"
class="indent builtin-bridges-option-description"
+ data-l10n-id="tor-bridges-built-in-snowflake-description"
>
</html:div>
</vbox>
<vbox class="builtin-bridges-option">
<hbox>
- <radio value="meek-azure" />
+ <radio
+ value="meek-azure"
+ data-l10n-id="built-in-dialog-meek-azure-radio-option"
+ />
<html:span class="bridge-status-badge">
<html:div class="bridge-status-icon"></html:div>
<html:span
- id="meek-bridges-current"
class="torPreferences-current-bridge-label"
data-l10n-id="built-in-dialog-current-bridge-label"
>
@@ -72,8 +80,8 @@
</html:span>
</hbox>
<html:div
- id="meek-bridges-description"
class="indent builtin-bridges-option-description"
+ data-l10n-id="tor-bridges-built-in-meek-azure-description"
>
</html:div>
</vbox>
=====================================
browser/components/torpreferences/content/connectionCategory.inc.xhtml
=====================================
@@ -5,5 +5,5 @@
align="center"
hidden="true">
<image class="category-icon"/>
- <label id="torPreferences-labelCategory" class="category-name" flex="1" value="Connection"/>
+ <label class="category-name" flex="1" data-l10n-id="tor-connection-settings-heading"></label>
</richlistitem>
=====================================
browser/components/torpreferences/content/connectionPane.js
=====================================
@@ -1088,18 +1088,17 @@ const gBuiltinBridgesArea = {
* @type {Object<string,object>}
*/
_bridgeTypeStrings: {
- // TODO: Change to Fluent ids.
obfs4: {
- name: TorStrings.settings.builtinBridgeObfs4Title,
- description: TorStrings.settings.builtinBridgeObfs4Description2,
+ name: "tor-bridges-built-in-obfs4-name",
+ description: "tor-bridges-built-in-obfs4-description",
},
snowflake: {
- name: TorStrings.settings.builtinBridgeSnowflake,
- description: TorStrings.settings.builtinBridgeSnowflakeDescription2,
+ name: "tor-bridges-built-in-snowflake-name",
+ description: "tor-bridges-built-in-snowflake-description",
},
"meek-azure": {
- name: TorStrings.settings.builtinBridgeMeekAzure,
- description: TorStrings.settings.builtinBridgeMeekAzureDescription2,
+ name: "tor-bridges-built-in-meek-azure-name",
+ description: "tor-bridges-built-in-meek-azure-description",
},
},
@@ -1151,15 +1150,11 @@ const gBuiltinBridgesArea = {
const bridgeStrings = this._bridgeTypeStrings[bridgeType];
if (bridgeStrings) {
- /*
document.l10n.setAttributes(this._nameEl, bridgeStrings.name);
document.l10n.setAttributes(
this._descriptionEl,
bridgeStrings.description
);
- */
- this._nameEl.textContent = bridgeStrings.name;
- this._descriptionEl.textContent = bridgeStrings.description;
} else {
// Unknown type, or no type.
this._nameEl.removeAttribute("data-l10n-id");
@@ -2075,7 +2070,7 @@ const gBridgeSettings = {
// "Remove all bridges"?
document
.getElementById("tor-bridges-options-remove-all-menu-item")
- .addEventListener("click", () => {
+ .addEventListener("click", async () => {
// TODO: Should we only have a warning when not built-in?
const parentWindow =
Services.wm.getMostRecentWindow("navigator:browser");
@@ -2085,13 +2080,20 @@ const gBridgeSettings = {
Services.prompt.BUTTON_POS_0_DEFAULT +
Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL;
+ const [titleString, bodyString, removeString] =
+ await document.l10n.formatValues([
+ { id: "remove-all-bridges-warning-title" },
+ { id: "remove-all-bridges-warning-description" },
+ { id: "remove-all-bridges-warning-remove-button" },
+ ]);
+
// TODO: Update the text, and remove old strings.
const buttonIndex = Services.prompt.confirmEx(
parentWindow,
- TorStrings.settings.bridgeRemoveAllDialogTitle,
- TorStrings.settings.bridgeRemoveAllDialogDescription,
+ titleString,
+ bodyString,
flags,
- TorStrings.settings.remove,
+ removeString,
null,
null,
null,
@@ -2289,36 +2291,13 @@ const gBridgeSettings = {
const gConnectionPane = (function () {
/* CSS selectors for all of the Tor Network DOM elements we need to access */
const selectors = {
- category: {
- title: "label#torPreferences-labelCategory",
- },
- torPreferences: {
- header: "h1#torPreferences-header",
- description: "span#torPreferences-description",
- learnMore: "label#torPreferences-learnMore",
- },
- quickstart: {
- header: "h2#torPreferences-quickstart-header",
- description: "span#torPreferences-quickstart-description",
- enableQuickstartCheckbox: "checkbox#torPreferences-quickstart-toggle",
- },
bridges: {
- header: "h1#torPreferences-bridges-header",
- description: "span#torPreferences-bridges-description",
- learnMore: "label#torPreferences-bridges-learnMore",
locationGroup: "#torPreferences-bridges-locationGroup",
locationLabel: "#torPreferences-bridges-locationLabel",
location: "#torPreferences-bridges-location",
locationEntries: "#torPreferences-bridges-locationEntries",
chooseForMe: "#torPreferences-bridges-buttonChooseBridgeForMe",
},
- advanced: {
- header: "h1#torPreferences-advanced-header",
- label: "#torPreferences-advanced-label",
- button: "#torPreferences-advanced-button",
- torLogsLabel: "label#torPreferences-torLogs",
- torLogsButton: "button#torPreferences-buttonTorLogs",
- },
}; /* selectors */
const retval = {
@@ -2342,96 +2321,62 @@ const gConnectionPane = (function () {
}
});
- document
- .querySelector(selectors.category.title)
- .setAttribute("value", TorStrings.settings.categoryTitle);
-
- const prefpane = document.getElementById("mainPrefPane");
-
- // Heading
- prefpane.querySelector(selectors.torPreferences.header).innerText =
- TorStrings.settings.categoryTitle;
- prefpane.querySelector(selectors.torPreferences.description).textContent =
- TorStrings.settings.torPreferencesDescription;
- {
- const learnMore = prefpane.querySelector(
- selectors.torPreferences.learnMore
- );
- learnMore.setAttribute("value", TorStrings.settings.learnMore);
- learnMore.setAttribute(
- "href",
- TorStrings.settings.learnMoreTorBrowserURL
- );
- if (TorStrings.settings.learnMoreTorBrowserURL.startsWith("about:")) {
- learnMore.setAttribute("useoriginprincipal", "true");
- }
- }
-
// Internet and Tor status
const internetStatus = document.getElementById(
"torPreferences-status-internet"
);
- internetStatus.querySelector(".torPreferences-status-name").textContent =
- TorStrings.settings.statusInternetLabel;
const internetResult = internetStatus.querySelector(
".torPreferences-status-result"
);
const internetTest = document.getElementById(
"torPreferences-status-internet-test"
);
- internetTest.setAttribute(
- "label",
- TorStrings.settings.statusInternetTest
- );
- internetTest.addEventListener("command", () => {
+ internetTest.addEventListener("click", () => {
this.onInternetTest();
});
const torConnectStatus = document.getElementById(
"torPreferences-status-tor-connect"
);
- torConnectStatus.querySelector(
- ".torPreferences-status-name"
- ).textContent = TorStrings.settings.statusTorLabel;
const torConnectResult = torConnectStatus.querySelector(
".torPreferences-status-result"
);
const torConnectButton = document.getElementById(
"torPreferences-status-tor-connect-button"
);
- torConnectButton.setAttribute(
- "label",
- TorStrings.torConnect.torConnectButton
- );
- torConnectButton.addEventListener("command", () => {
+ torConnectButton.addEventListener("click", () => {
TorConnect.openTorConnect({ beginBootstrap: true });
});
this._populateStatus = () => {
+ let internetId;
switch (this._internetStatus) {
case InternetStatus.Online:
internetStatus.classList.remove("offline");
- internetResult.textContent =
- TorStrings.settings.statusInternetOnline;
- internetResult.hidden = false;
+ internetId = "tor-connection-internet-status-online";
break;
case InternetStatus.Offline:
internetStatus.classList.add("offline");
- internetResult.textContent =
- TorStrings.settings.statusInternetOffline;
- internetResult.hidden = false;
+ internetId = "tor-connection-internet-status-offline";
break;
case InternetStatus.Unknown:
default:
internetStatus.classList.remove("offline");
- internetResult.hidden = true;
break;
}
+ if (internetId) {
+ document.l10n.setAttributes(internetResult, internetId);
+ internetResult.hidden = false;
+ } else {
+ internetResult.hidden = true;
+ }
+
+ let connectId;
// FIXME: What about the TorConnectState.Disabled state?
if (TorConnect.state === TorConnectState.Bootstrapped) {
torConnectStatus.classList.add("connected");
torConnectStatus.classList.remove("blocked");
- torConnectResult.textContent = TorStrings.settings.statusTorConnected;
+ connectId = "tor-connection-network-status-connected";
// NOTE: If the button is focused when we hide it, the focus may be
// lost. But we don't have an obvious place to put the focus instead.
torConnectButton.hidden = true;
@@ -2441,26 +2386,18 @@ const gConnectionPane = (function () {
"blocked",
TorConnect.potentiallyBlocked
);
- torConnectResult.textContent = TorConnect.potentiallyBlocked
- ? TorStrings.settings.statusTorBlocked
- : TorStrings.settings.statusTorNotConnected;
+ connectId = TorConnect.potentiallyBlocked
+ ? "tor-connection-network-status-blocked"
+ : "tor-connection-network-status-not-connected";
torConnectButton.hidden = false;
}
+ document.l10n.setAttributes(torConnectResult, connectId);
};
this._populateStatus();
// Quickstart
- prefpane.querySelector(selectors.quickstart.header).innerText =
- TorStrings.settings.quickstartHeading;
- prefpane.querySelector(selectors.quickstart.description).textContent =
- TorStrings.settings.quickstartDescription;
-
- this._enableQuickstartCheckbox = prefpane.querySelector(
- selectors.quickstart.enableQuickstartCheckbox
- );
- this._enableQuickstartCheckbox.setAttribute(
- "label",
- TorStrings.settings.quickstartCheckbox
+ this._enableQuickstartCheckbox = document.getElementById(
+ "torPreferences-quickstart-toggle"
);
this._enableQuickstartCheckbox.addEventListener("command", e => {
const checked = this._enableQuickstartCheckbox.checked;
@@ -2470,22 +2407,10 @@ const gConnectionPane = (function () {
this._enableQuickstartCheckbox.checked = TorSettings.quickstart.enabled;
Services.obs.addObserver(this, TorSettingsTopics.SettingsChanged);
- // Bridge setup
- prefpane.querySelector(selectors.bridges.header).innerText =
- TorStrings.settings.bridgesHeading;
- prefpane.querySelector(selectors.bridges.description).textContent =
- TorStrings.settings.bridgesDescription2;
- {
- const learnMore = prefpane.querySelector(selectors.bridges.learnMore);
- learnMore.setAttribute("value", TorStrings.settings.learnMore);
- learnMore.setAttribute("href", TorStrings.settings.learnMoreBridgesURL);
- if (TorStrings.settings.learnMoreBridgesURL.startsWith("about:")) {
- learnMore.setAttribute("useoriginprincipal", "true");
- }
- }
-
// Location
{
+ const prefpane = document.getElementById("mainPrefPane");
+
const locationGroup = prefpane.querySelector(
selectors.bridges.locationGroup
);
@@ -2571,33 +2496,18 @@ const gConnectionPane = (function () {
}
// Advanced setup
- prefpane.querySelector(selectors.advanced.header).innerText =
- TorStrings.settings.advancedHeading;
- prefpane.querySelector(selectors.advanced.label).textContent =
- TorStrings.settings.advancedLabel;
- {
- const settingsButton = prefpane.querySelector(
- selectors.advanced.button
- );
- settingsButton.setAttribute(
- "label",
- TorStrings.settings.advancedButton
- );
- settingsButton.addEventListener("command", () => {
+ document
+ .getElementById("torPreferences-advanced-button")
+ .addEventListener("click", () => {
this.onAdvancedSettings();
});
- }
// Tor logs
- prefpane.querySelector(selectors.advanced.torLogsLabel).textContent =
- TorStrings.settings.showTorDaemonLogs;
- const torLogsButton = prefpane.querySelector(
- selectors.advanced.torLogsButton
- );
- torLogsButton.setAttribute("label", TorStrings.settings.showLogs);
- torLogsButton.addEventListener("command", () => {
- this.onViewTorLogs();
- });
+ document
+ .getElementById("torPreferences-buttonTorLogs")
+ .addEventListener("click", () => {
+ this.onViewTorLogs();
+ });
Services.obs.addObserver(this, TorConnectTopics.StateChange);
},
=====================================
browser/components/torpreferences/content/connectionPane.xhtml
=====================================
@@ -11,16 +11,21 @@
data-category="paneConnection"
hidden="true"
>
- <html:h1 id="torPreferences-header" />
+ <html:h1 data-l10n-id="tor-connection-settings-heading"></html:h1>
</hbox>
<groupbox data-category="paneConnection" hidden="true">
<description flex="1">
- <html:span id="torPreferences-description" class="tail-with-learn-more" />
+ <html:span
+ data-l10n-id="tor-connection-overview"
+ class="tail-with-learn-more"
+ ></html:span>
<label
- id="torPreferences-learnMore"
class="learnMore text-link"
is="text-link"
+ href="about:manual#about"
+ useoriginprincipal="true"
+ data-l10n-id="tor-connection-browser-learn-more-link"
/>
</description>
</groupbox>
@@ -36,33 +41,45 @@
class="torPreferences-status-grouping"
>
<image class="torPreferences-status-icon" />
- <html:span class="torPreferences-status-name"></html:span>
+ <html:span
+ class="torPreferences-status-name"
+ data-l10n-id="tor-connection-internet-status-label"
+ ></html:span>
<html:span class="torPreferences-status-result"></html:span>
- <button id="torPreferences-status-internet-test" />
+ <html:button
+ id="torPreferences-status-internet-test"
+ data-l10n-id="tor-connection-internet-status-test-button"
+ ></html:button>
</hbox>
<hbox
id="torPreferences-status-tor-connect"
class="torPreferences-status-grouping"
>
<image class="torPreferences-status-icon" />
- <html:span class="torPreferences-status-name"></html:span>
+ <html:span
+ class="torPreferences-status-name"
+ data-l10n-id="tor-connection-network-status-label"
+ ></html:span>
<html:span class="torPreferences-status-result"></html:span>
- <button id="torPreferences-status-tor-connect-button" />
+ <html:button
+ id="torPreferences-status-tor-connect-button"
+ data-l10n-id="tor-connection-network-status-connect-button"
+ ></html:button>
</hbox>
</hbox>
</groupbox>
<!-- Quickstart -->
- <groupbox
- id="torPreferences-quickstart-group"
- data-category="paneConnection"
- hidden="true"
- >
- <html:h2 id="torPreferences-quickstart-header" />
- <description flex="1">
- <html:span id="torPreferences-quickstart-description" />
+ <groupbox data-category="paneConnection" hidden="true">
+ <label>
+ <html:h2 data-l10n-id="tor-connection-quickstart-heading"></html:h2>
+ </label>
+ <description flex="1" data-l10n-id="tor-connection-quickstart-description">
</description>
- <checkbox id="torPreferences-quickstart-toggle" />
+ <checkbox
+ id="torPreferences-quickstart-toggle"
+ data-l10n-id="tor-connection-quickstart-checkbox"
+ />
</groupbox>
<!-- Bridges -->
@@ -71,6 +88,7 @@
id="torPreferences-bridges-header"
class="tor-focusable-heading"
tabindex="-1"
+ data-l10n-id="tor-bridges-heading"
></html:h1>
</hbox>
<groupbox
@@ -80,13 +98,15 @@
>
<description flex="1">
<html:span
- id="torPreferences-bridges-description"
class="tail-with-learn-more"
+ data-l10n-id="tor-bridges-overview"
/>
<label
- id="torPreferences-bridges-learnMore"
class="learnMore text-link"
is="text-link"
+ href="about:manual#bridges"
+ useoriginprincipal="true"
+ data-l10n-id="tor-bridges-learn-more-link"
/>
</description>
<hbox
@@ -479,7 +499,7 @@
<!-- Advanced -->
<hbox class="subcategory" data-category="paneConnection" hidden="true">
- <html:h1 id="torPreferences-advanced-header" />
+ <html:h1 data-l10n-id="tor-advanced-settings-heading"></html:h1>
</hbox>
<groupbox
id="torPreferences-advanced-group"
@@ -487,14 +507,20 @@
hidden="true"
>
<hbox align="center">
- <label id="torPreferences-advanced-label" flex="1" />
- <button id="torPreferences-advanced-button" class="accessory-button" />
+ <label data-l10n-id="tor-advanced-settings-description" flex="1" />
+ <html:button
+ id="torPreferences-advanced-button"
+ class="accessory-button"
+ data-l10n-id="tor-advanced-settings-button"
+ ></html:button>
</hbox>
<hbox align="center" data-subcategory="viewlogs">
- <label id="torPreferences-torLogs" flex="1" />
- <vbox>
- <button id="torPreferences-buttonTorLogs" class="accessory-button" />
- </vbox>
+ <label data-l10n-id="tor-view-log-description" flex="1" />
+ <html:button
+ id="torPreferences-buttonTorLogs"
+ class="accessory-button"
+ data-l10n-id="tor-view-log-button"
+ ></html:button>
</hbox>
</groupbox>
</html:template>
=====================================
browser/components/torpreferences/content/connectionSettingsDialog.js
=====================================
@@ -4,10 +4,6 @@ const { TorSettings, TorProxyType } = ChromeUtils.importESModule(
"resource://gre/modules/TorSettings.sys.mjs"
);
-const { TorStrings } = ChromeUtils.importESModule(
- "resource://gre/modules/TorStrings.sys.mjs"
-);
-
const gConnectionSettingsDialog = {
_useProxyCheckbox: null,
_proxyTypeLabel: null,
@@ -25,7 +21,6 @@ const gConnectionSettingsDialog = {
_allowedPortsTextbox: null,
selectors: {
- header: "#torPreferences-connection-header",
useProxyCheckbox: "checkbox#torPreferences-connection-toggleProxy",
proxyTypeLabel: "label#torPreferences-localProxy-type",
proxyTypeList: "menulist#torPreferences-localProxy-builtinList",
@@ -53,36 +48,27 @@ const gConnectionSettingsDialog = {
init() {
const selectors = this.selectors;
- document.documentElement.setAttribute(
- "title",
- TorStrings.settings.connectionSettingsDialogTitle
- );
- document.querySelector(selectors.header).textContent =
- TorStrings.settings.connectionSettingsDialogHeader;
-
// Local Proxy
this._useProxyCheckbox = document.querySelector(selectors.useProxyCheckbox);
- this._useProxyCheckbox.setAttribute(
- "label",
- TorStrings.settings.useLocalProxy
- );
this._useProxyCheckbox.addEventListener("command", e => {
const checked = this._useProxyCheckbox.checked;
this.onToggleProxy(checked);
});
this._proxyTypeLabel = document.querySelector(selectors.proxyTypeLabel);
- this._proxyTypeLabel.setAttribute("value", TorStrings.settings.proxyType);
let mockProxies = [
{
value: TorProxyType.Socks4,
- label: TorStrings.settings.proxyTypeSOCKS4,
+ l10nId: "tor-advanced-dialog-proxy-socks4-menuitem",
},
{
value: TorProxyType.Socks5,
- label: TorStrings.settings.proxyTypeSOCKS5,
+ l10nId: "tor-advanced-dialog-proxy-socks5-menuitem",
+ },
+ {
+ value: TorProxyType.HTTPS,
+ l10nId: "tor-advanced-dialog-proxy-http-menuitem",
},
- { value: TorProxyType.HTTPS, label: TorStrings.settings.proxyTypeHTTP },
];
this._proxyTypeMenulist = document.querySelector(selectors.proxyTypeList);
this._proxyTypeMenulist.addEventListener("command", e => {
@@ -92,24 +78,16 @@ const gConnectionSettingsDialog = {
for (let currentProxy of mockProxies) {
let menuEntry = window.document.createXULElement("menuitem");
menuEntry.setAttribute("value", currentProxy.value);
- menuEntry.setAttribute("label", currentProxy.label);
+ menuEntry.setAttribute("data-l10n-id", currentProxy.l10nId);
this._proxyTypeMenulist.querySelector("menupopup").appendChild(menuEntry);
}
this._proxyAddressLabel = document.querySelector(
selectors.proxyAddressLabel
);
- this._proxyAddressLabel.setAttribute(
- "value",
- TorStrings.settings.proxyAddress
- );
this._proxyAddressTextbox = document.querySelector(
selectors.proxyAddressTextbox
);
- this._proxyAddressTextbox.setAttribute(
- "placeholder",
- TorStrings.settings.proxyAddressPlaceholder
- );
this._proxyAddressTextbox.addEventListener("blur", e => {
let value = this._proxyAddressTextbox.value.trim();
let colon = value.lastIndexOf(":");
@@ -122,36 +100,19 @@ const gConnectionSettingsDialog = {
}
});
this._proxyPortLabel = document.querySelector(selectors.proxyPortLabel);
- this._proxyPortLabel.setAttribute("value", TorStrings.settings.proxyPort);
this._proxyPortTextbox = document.querySelector(selectors.proxyPortTextbox);
this._proxyUsernameLabel = document.querySelector(
selectors.proxyUsernameLabel
);
- this._proxyUsernameLabel.setAttribute(
- "value",
- TorStrings.settings.proxyUsername
- );
this._proxyUsernameTextbox = document.querySelector(
selectors.proxyUsernameTextbox
);
- this._proxyUsernameTextbox.setAttribute(
- "placeholder",
- TorStrings.settings.proxyUsernamePasswordPlaceholder
- );
this._proxyPasswordLabel = document.querySelector(
selectors.proxyPasswordLabel
);
- this._proxyPasswordLabel.setAttribute(
- "value",
- TorStrings.settings.proxyPassword
- );
this._proxyPasswordTextbox = document.querySelector(
selectors.proxyPasswordTextbox
);
- this._proxyPasswordTextbox.setAttribute(
- "placeholder",
- TorStrings.settings.proxyUsernamePasswordPlaceholder
- );
this.onToggleProxy(false);
if (TorSettings.proxy.enabled) {
@@ -167,10 +128,6 @@ const gConnectionSettingsDialog = {
this._useFirewallCheckbox = document.querySelector(
selectors.useFirewallCheckbox
);
- this._useFirewallCheckbox.setAttribute(
- "label",
- TorStrings.settings.useFirewall
- );
this._useFirewallCheckbox.addEventListener("command", e => {
const checked = this._useFirewallCheckbox.checked;
this.onToggleFirewall(checked);
@@ -178,17 +135,9 @@ const gConnectionSettingsDialog = {
this._allowedPortsLabel = document.querySelector(
selectors.firewallAllowedPortsLabel
);
- this._allowedPortsLabel.setAttribute(
- "value",
- TorStrings.settings.allowedPorts
- );
this._allowedPortsTextbox = document.querySelector(
selectors.firewallAllowedPortsTextbox
);
- this._allowedPortsTextbox.setAttribute(
- "placeholder",
- TorStrings.settings.allowedPortsPlaceholder
- );
this.onToggleFirewall(false);
if (TorSettings.firewall.enabled) {
=====================================
browser/components/torpreferences/content/connectionSettingsDialog.xhtml
=====================================
@@ -7,16 +7,31 @@
type="child"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
+ data-l10n-id="tor-advanced-dialog-title"
>
<dialog id="torPreferences-connection-dialog" buttons="accept,cancel">
+ <linkset>
+ <html:link rel="localization" href="branding/brand.ftl" />
+ <html:link rel="localization" href="browser/tor-browser.ftl" />
+ </linkset>
+
<script src="chrome://browser/content/torpreferences/connectionSettingsDialog.js" />
- <html:h3 id="torPreferences-connection-header">​</html:h3>
+ <html:h3
+ id="torPreferences-connection-header"
+ data-l10n-id="tor-advanced-dialog-introduction"
+ ></html:h3>
<!-- Local Proxy -->
- <checkbox id="torPreferences-connection-toggleProxy" label="​" />
+ <checkbox
+ id="torPreferences-connection-toggleProxy"
+ data-l10n-id="tor-advanced-dialog-proxy-checkbox"
+ />
<box id="torPreferences-connection-grid">
<hbox class="indent" align="center">
- <label id="torPreferences-localProxy-type" />
+ <label
+ id="torPreferences-localProxy-type"
+ data-l10n-id="tor-advanced-dialog-proxy-type-selector-label"
+ />
</hbox>
<hbox align="center">
<spacer flex="1" />
@@ -28,15 +43,22 @@
</menulist>
</hbox>
<hbox class="indent" align="center">
- <label id="torPreferences-localProxy-address" />
+ <label
+ id="torPreferences-localProxy-address"
+ data-l10n-id="tor-advanced-dialog-proxy-address-input-label"
+ />
</hbox>
<hbox align="center">
<html:input
id="torPreferences-localProxy-textboxAddress"
type="text"
class="torMarginFix"
+ data-l10n-id="tor-advanced-dialog-proxy-address-input"
+ />
+ <label
+ id="torPreferences-localProxy-port"
+ data-l10n-id="tor-advanced-dialog-proxy-port-input-label"
/>
- <label id="torPreferences-localProxy-port" />
<!-- proxy-port-input class style pulled from preferences.css and used in the vanilla proxy setup menu -->
<html:input
id="torPreferences-localProxy-textboxPort"
@@ -49,27 +71,41 @@
/>
</hbox>
<hbox class="indent" align="center">
- <label id="torPreferences-localProxy-username" />
+ <label
+ id="torPreferences-localProxy-username"
+ data-l10n-id="tor-advanced-dialog-proxy-username-input-label"
+ />
</hbox>
<hbox align="center">
<html:input
id="torPreferences-localProxy-textboxUsername"
type="text"
class="torMarginFix"
+ data-l10n-id="tor-advanced-dialog-proxy-username-input"
+ />
+ <label
+ id="torPreferences-localProxy-password"
+ data-l10n-id="tor-advanced-dialog-proxy-password-input-label"
/>
- <label id="torPreferences-localProxy-password" />
<html:input
id="torPreferences-localProxy-textboxPassword"
class="torMarginFix"
type="password"
+ data-l10n-id="tor-advanced-dialog-proxy-password-input"
/>
</hbox>
</box>
<!-- Firewall -->
- <checkbox id="torPreferences-connection-toggleFirewall" label="​" />
+ <checkbox
+ id="torPreferences-connection-toggleFirewall"
+ data-l10n-id="tor-advanced-dialog-firewall-checkbox"
+ />
<box id="torPreferences-connection-firewall">
<hbox class="indent" align="center">
- <label id="torPreferences-connection-allowedPorts" />
+ <label
+ id="torPreferences-connection-allowedPorts"
+ data-l10n-id="tor-advanced-dialog-firewall-ports-input-label"
+ />
</hbox>
<hbox id="torPreferences-connection-hboxAllowedPorts" align="center">
<html:input
@@ -77,6 +113,7 @@
type="text"
class="torMarginFix"
value="80,443"
+ data-l10n-id="tor-advanced-dialog-firewall-ports-input"
/>
</hbox>
</box>
=====================================
browser/components/torpreferences/content/provideBridgeDialog.js
=====================================
@@ -1,9 +1,5 @@
"use strict";
-const { TorStrings } = ChromeUtils.importESModule(
- "resource://gre/modules/TorStrings.sys.mjs"
-);
-
const { TorSettings, TorBridgeSource, validateBridgeLines } =
ChromeUtils.importESModule("resource://gre/modules/TorSettings.sys.mjs");
@@ -191,10 +187,8 @@ const gProvideBridgeDialog = {
this._result.connect = connect;
this._acceptButton.setAttribute(
- "label",
- connect
- ? TorStrings.settings.bridgeButtonConnect
- : TorStrings.settings.bridgeButtonAccept
+ "data-l10n-id",
+ connect ? "bridge-dialog-button-connect" : "bridge-dialog-button-accept"
);
}
},
=====================================
browser/components/torpreferences/content/requestBridgeDialog.js
=====================================
@@ -3,9 +3,6 @@
const { BridgeDB } = ChromeUtils.importESModule(
"resource://gre/modules/BridgeDB.sys.mjs"
);
-const { TorStrings } = ChromeUtils.importESModule(
- "resource://gre/modules/TorStrings.sys.mjs"
-);
const { TorConnect, TorConnectTopics } = ChromeUtils.importESModule(
"resource://gre/modules/TorConnect.sys.mjs"
@@ -20,8 +17,6 @@ const gRequestBridgeDialog = {
"button#torPreferences-requestBridge-refreshCaptchaButton",
incorrectCaptchaHbox:
"hbox#torPreferences-requestBridge-incorrectCaptchaHbox",
- incorrectCaptchaLabel:
- "label#torPreferences-requestBridge-incorrectCaptchaError",
},
init() {
@@ -33,10 +28,6 @@ const gRequestBridgeDialog = {
"torPreferences-requestBridge-dialog"
);
- document.documentElement.setAttribute(
- "title",
- TorStrings.settings.requestBridgeDialogTitle
- );
// user may have opened a Request Bridge dialog in another tab, so update the
// CAPTCHA image or close out the dialog if we have a bridge list
this._dialog.addEventListener("focusin", () => {
@@ -59,7 +50,6 @@ const gRequestBridgeDialog = {
});
this._dialogHeader = this._dialog.querySelector(selectors.dialogHeader);
- this._dialogHeader.textContent = TorStrings.settings.contactingBridgeDB;
this._captchaImage = this._dialog.querySelector(selectors.captchaImage);
@@ -71,10 +61,6 @@ const gRequestBridgeDialog = {
this._captchaEntryTextbox = this._dialog.querySelector(
selectors.captchaEntryTextbox
);
- this._captchaEntryTextbox.setAttribute(
- "placeholder",
- TorStrings.settings.captchaTextboxPlaceholder
- );
this._captchaEntryTextbox.disabled = true;
// disable submit if entry textbox is empty
this._captchaEntryTextbox.oninput = () => {
@@ -89,13 +75,6 @@ const gRequestBridgeDialog = {
this._incorrectCaptchaHbox = this._dialog.querySelector(
selectors.incorrectCaptchaHbox
);
- this._incorrectCaptchaLabel = this._dialog.querySelector(
- selectors.incorrectCaptchaLabel
- );
- this._incorrectCaptchaLabel.setAttribute(
- "value",
- TorStrings.settings.incorrectCaptcha
- );
Services.obs.addObserver(this, TorConnectTopics.StateChange);
this.onAcceptStateChange();
@@ -111,10 +90,8 @@ const gRequestBridgeDialog = {
const connect = TorConnect.canBeginBootstrap;
this._result.connect = connect;
this._submitButton.setAttribute(
- "label",
- connect
- ? TorStrings.settings.bridgeButtonConnect
- : TorStrings.settings.submitCaptcha
+ "data-l10n-id",
+ connect ? "bridge-dialog-button-connect" : "bridge-dialog-button-submit"
);
},
@@ -129,7 +106,10 @@ const gRequestBridgeDialog = {
_setcaptchaImage(uri) {
if (uri != this._captchaImage.src) {
this._captchaImage.src = uri;
- this._dialogHeader.textContent = TorStrings.settings.solveTheCaptcha;
+ this._dialogHeader.setAttribute(
+ "data-l10n-id",
+ "request-bridge-dialog-top-solve"
+ );
this._setUIDisabled(false);
this._captchaEntryTextbox.focus();
this._captchaEntryTextbox.select();
@@ -185,7 +165,10 @@ const gRequestBridgeDialog = {
onRefreshCaptcha() {
this._setUIDisabled(true);
this._captchaImage.src = "";
- this._dialogHeader.textContent = TorStrings.settings.contactingBridgeDB;
+ this._dialogHeader.setAttribute(
+ "data-l10n-id",
+ "request-bridge-dialog-top-wait"
+ );
this._captchaEntryTextbox.value = "";
this._incorrectCaptchaHbox.style.visibility = "hidden";
=====================================
browser/components/torpreferences/content/requestBridgeDialog.xhtml
=====================================
@@ -7,20 +7,26 @@
type="child"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
+ data-l10n-id="request-bridge-dialog-title"
>
<dialog id="torPreferences-requestBridge-dialog" buttons="accept,cancel">
+ <linkset>
+ <html:link rel="localization" href="browser/tor-browser.ftl" />
+ </linkset>
+
<script src="chrome://browser/content/torpreferences/requestBridgeDialog.js" />
- <!-- ok, so ​ is a zero-width space. We need to have *something* in the innerText so that XUL knows how tall the
- title node is so that it can determine how large to make the dialog element's inner draw area. If we have nothing
- in the innerText, then it collapse to 0 height, and the contents of the dialog ends up partially hidden >:( -->
- <html:h3 id="torPreferences-requestBridge-header">​</html:h3>
+ <html:h3
+ id="torPreferences-requestBridge-header"
+ data-l10n-id="request-bridge-dialog-top-solve"
+ ></html:h3>
<!-- init to transparent 400x125 png -->
<image id="torPreferences-requestBridge-captchaImage" flex="1" />
<hbox id="torPreferences-requestBridge-inputHbox">
<html:input
id="torPreferences-requestBridge-captchaTextbox"
type="text"
+ data-l10n-id="request-bridge-dialog-captcha-input"
/>
<button
id="torPreferences-requestBridge-refreshCaptchaButton"
@@ -30,7 +36,7 @@
</hbox>
<hbox id="torPreferences-requestBridge-incorrectCaptchaHbox" align="center">
<image id="torPreferences-requestBridge-errorIcon" />
- <label id="torPreferences-requestBridge-incorrectCaptchaError" flex="1" />
+ <label data-l10n-id="request-bridge-dialog-captcha-failed" flex="1" />
</hbox>
</dialog>
</window>
=====================================
browser/components/torpreferences/content/torLogDialog.js
=====================================
@@ -7,21 +7,13 @@ const { setTimeout, clearTimeout } = ChromeUtils.importESModule(
const { TorProviderBuilder } = ChromeUtils.importESModule(
"resource://gre/modules/TorProviderBuilder.sys.mjs"
);
-const { TorStrings } = ChromeUtils.importESModule(
- "resource://gre/modules/TorStrings.sys.mjs"
-);
window.addEventListener(
"DOMContentLoaded",
() => {
- document.documentElement.setAttribute(
- "title",
- TorStrings.settings.torLogDialogTitle
- );
-
const dialog = document.getElementById("torPreferences-torLog-dialog");
const copyLogButton = dialog.getButton("extra1");
- copyLogButton.setAttribute("label", TorStrings.settings.copyLog);
+ copyLogButton.setAttribute("data-l10n-id", "tor-log-dialog-copy-button");
const logText = document.getElementById(
"torPreferences-torDialog-textarea"
@@ -35,8 +27,10 @@ window.addEventListener(
);
clipboard.copyString(logText.value);
- const label = copyLogButton.querySelector("label");
- label.setAttribute("value", TorStrings.settings.copied);
+ copyLogButton.setAttribute(
+ "data-l10n-id",
+ "tor-log-dialog-copy-button-copied"
+ );
copyLogButton.classList.add("primary");
const RESTORE_TIME = 1200;
@@ -44,7 +38,10 @@ window.addEventListener(
clearTimeout(restoreButtonTimeout);
}
restoreButtonTimeout = setTimeout(() => {
- label.setAttribute("value", TorStrings.settings.copyLog);
+ copyLogButton.setAttribute(
+ "data-l10n-id",
+ "tor-log-dialog-copy-button"
+ );
copyLogButton.classList.remove("primary");
restoreButtonTimeout = null;
}, RESTORE_TIME);
=====================================
browser/components/torpreferences/content/torLogDialog.xhtml
=====================================
@@ -7,8 +7,13 @@
type="child"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
+ data-l10n-id="tor-log-dialog-title"
>
<dialog id="torPreferences-torLog-dialog" buttons="accept,extra1">
+ <linkset>
+ <html:link rel="localization" href="browser/tor-browser.ftl" />
+ </linkset>
+
<script src="chrome://browser/content/torpreferences/torLogDialog.js" />
<html:textarea
=====================================
browser/components/torpreferences/content/torPreferences.css
=====================================
@@ -1023,6 +1023,11 @@ groupbox#torPreferences-bridges-group textarea {
}
/* Connection settings dialog */
+#torPreferences-connection-dialog label {
+ /* Do not wrap the labels. */
+ white-space: nowrap;
+}
+
#torPreferences-connection-header {
margin: 4px 0 14px 0;
}
=====================================
browser/locales/en-US/browser/tor-browser.ftl
=====================================
@@ -45,7 +45,55 @@ tor-browser-home-message-testing = This is an unstable version of Tor Browser fo
home-mode-choice-tor =
.label = Tor Browser Home
-## Tor Bridges Settings
+## Tor connection settings.
+
+# "Connection" refers to the Tor Browser's connection to the Tor network.
+tor-connection-settings-heading = Connection
+# -brand-short-name refers to 'Tor Browser', localized.
+tor-connection-overview = { -brand-short-name } routes your traffic over the Tor Network, run by thousands of volunteers around the world.
+tor-connection-browser-learn-more-link = Learn more
+tor-connection-quickstart-heading = Quickstart
+# -brand-short-name refers to 'Tor Browser', localized.
+tor-connection-quickstart-description = Quickstart connects { -brand-short-name } to the Tor Network automatically when launched, based on your last used connection settings.
+tor-connection-quickstart-checkbox =
+ .label = Always connect automatically
+
+# Prefix before the internet connection status.
+# "Internet" is not a proper noun, but is capitalized because it is the start of a sentence.
+tor-connection-internet-status-label = Internet:
+# Button to test the internet connection.
+# Here "Test" is a verb, as in "test the internet connection".
+# Uses sentence case in English (US).
+tor-connection-internet-status-test-button = Test
+# Shown when the user is connected to the internet.
+# Uses sentence case in English (US).
+tor-connection-internet-status-online = Online
+# Shown when the user is not connected to the internet.
+# Uses sentence case in English (US).
+tor-connection-internet-status-offline = Offline
+
+# Prefix before the Tor network connection status.
+# Uses sentence case in English (US).
+tor-connection-network-status-label = Tor network:
+# Shown when the user is connected to the Tor network.
+# Uses sentence case in English (US).
+tor-connection-network-status-connected = Connected
+# Shown when the user is not connected to the Tor network.
+# Uses sentence case in English (US).
+tor-connection-network-status-not-connected = Not connected
+# Shown when the user's Tor connection may be blocked.
+# Uses sentence case in English (US).
+tor-connection-network-status-blocked = Potentially blocked
+# Button shown when we are not yet connected to the Tor network.
+# It will open a page to start connecting to the Tor network.
+# Uses sentence case in English (US).
+tor-connection-network-status-connect-button = Connect
+
+## Tor Bridges Settings.
+
+tor-bridges-heading = Bridges
+tor-bridges-overview = Bridges help you securely access the Tor Network in places where Tor is blocked. Depending on where you are, one bridge may work better than another.
+tor-bridges-learn-more-link = Learn more
# Toggle button for enabling and disabling the use of bridges.
tor-bridges-use-bridges =
@@ -78,6 +126,16 @@ tor-bridges-menu-item-remove-all-bridges = Remove all bridges
# Shown when one of the built-in bridges is in use.
tor-bridges-built-in-status-connected = Connected
+# "obfs4" is a technical name, and likely should not be translated.
+tor-bridges-built-in-obfs4-name = obfs4
+tor-bridges-built-in-obfs4-description = Makes your Tor traffic look like random data. May not work in heavily censored regions.
+# "Snowflake" is a proper noun for a type of Tor bridge, and likely should not be translated.
+tor-bridges-built-in-snowflake-name = Snowflake
+# "Snowflake" is a proper noun for a type of Tor bridge, and likely should not be translated.
+tor-bridges-built-in-snowflake-description = Routes your connection through Snowflake proxies to make it look like you’re placing a video call, for example.
+# "meek-azure" is a technical name, and likely should not be translated.
+tor-bridges-built-in-meek-azure-name = meek-azure
+tor-bridges-built-in-meek-azure-description = Makes it look like you’re connected to a Microsoft website, instead of using Tor. May work in heavily censored regions, but is usually very slow.
# Shown at the start of a Tor bridge line.
# $type (String) - The Tor bridge type ("snowflake", "obfs4", "meek-azure").
@@ -195,6 +253,7 @@ tor-bridges-add-bridges-heading = Add bridges
# Shown as a heading when the user has existing bridges that can be replaced.
tor-bridges-replace-bridges-heading = Replace your bridges
+# -brand-short-name refers to 'Tor Browser', localized.
tor-bridges-select-built-in-description = Choose from one of { -brand-short-name }’s built-in bridges
tor-bridges-select-built-in-button = Select a built-in bridge…
@@ -233,6 +292,23 @@ tor-bridges-provider-email-instruction = Email { $address }
tor-bridges-request-from-browser = You can also get bridges from the bridge bot without leaving { -brand-short-name }.
tor-bridges-request-button = Request bridges…
+## Warning dialog when removing all bridges.
+
+remove-all-bridges-warning-title = Remove all bridges?
+remove-all-bridges-warning-description = If these bridges were received from torproject.org or added manually, this action cannot be undone
+remove-all-bridges-warning-remove-button = Remove
+
+## Bridge QR code dialog.
+
+bridge-qr-dialog-title =
+ .title = Scan the QR code
+
+## Common button used in bridge dialogs.
+
+bridge-dialog-button-connect = Connect
+bridge-dialog-button-accept = OK
+bridge-dialog-button-submit = Submit
+
## User provided bridge dialog.
# Used when the user is editing their existing bridge addresses.
@@ -300,11 +376,92 @@ user-provide-bridge-dialog-next-button =
## Built-in bridges dialog.
+built-in-dialog-title =
+ .title = Select a Built-In Bridge
+# -brand-short-name refers to 'Tor Browser', localized.
+built-in-dialog-introduction = { -brand-short-name } includes some specific types of bridges known as “pluggable transports”, which can help conceal the fact you’re using Tor.
+# "obfs4" is a technical name, and likely should not be translated.
+built-in-dialog-obfs4-radio-option =
+ .label = obfs4
+# "Snowflake" is a proper noun for a type of Tor bridge, and likely should not be translated.
+built-in-dialog-snowflake-radio-option =
+ .label = Snowflake
+# "meek-azure" is a technical name, and likely should not be translated.
+built-in-dialog-meek-azure-radio-option =
+ .label = meek-azure
# Label attached to the built-in bridge option that is already in use.
# The "aria-label" should use the same text, but include some ending punctuation to separate it from the sentence that follows. This is used for screen reader users.
built-in-dialog-current-bridge-label = Current bridge
.aria-label = Current bridge.
+request-bridge-dialog-title =
+ .title = Request Bridge
+request-bridge-dialog-top-wait = Contacting BridgeDB. Please Wait.
+request-bridge-dialog-top-solve = Solve the CAPTCHA to request a bridge.
+request-bridge-dialog-captcha-input =
+ .placeholder = Enter the characters from the image
+request-bridge-dialog-captcha-failed = The solution is not correct. Please try again.
+
+## Tor advanced settings.
+
+tor-advanced-settings-heading = Advanced
+tor-advanced-settings-description = Configure how { -brand-short-name } connects to the internet.
+# Button that opens the advanced connection settings dialog.
+# Uses sentence case in English (US).
+tor-advanced-settings-button = Settings…
+# "log" is a noun, referring to the recorded text output of the Tor process.
+tor-view-log-description = View the Tor log.
+# "log" is a noun, referring to the recorded text output of the Tor process.
+# Uses sentence case in English (US).
+tor-view-log-button = View log…
+
+## Tor log dialog.
+
+# "log" is a noun, referring to the recorded text output of the Tor process.
+tor-log-dialog-title =
+ .title = Tor log
+# "log" is a noun, referring to the recorded text output of the Tor process.
+tor-log-dialog-copy-button =
+ .label = Copy Tor log to clipboard
+# Button text changes for a short time after activating the button.
+tor-log-dialog-copy-button-copied =
+ .label = Copied!
+
+## Tor advanced connection settings dialog.
+
+tor-advanced-dialog-title =
+ .title = Connection settings
+tor-advanced-dialog-introduction = Configure how { -brand-short-name } connects to the internet.
+tor-advanced-dialog-proxy-checkbox =
+ .label = I use a proxy to connect to the internet
+tor-advanced-dialog-proxy-type-selector-label = Proxy type
+# SOCKS4 is a technical name, and should likely not be translated.
+tor-advanced-dialog-proxy-socks4-menuitem =
+ .label = SOCKS4
+# SOCKS5 is a technical name, and should likely not be translated.
+tor-advanced-dialog-proxy-socks5-menuitem =
+ .label = SOCKS5
+# HTTP and HTTPS are technical names, and should likely not be translated.
+# The "/" refers to "HTTP or HTTPS" and can be translated.
+tor-advanced-dialog-proxy-http-menuitem =
+ .label = HTTP/HTTPS
+# "address" is a noun, referring to an network IP address.
+tor-advanced-dialog-proxy-address-input-label = Address
+tor-advanced-dialog-proxy-address-input =
+ .placeholder = IP address or hostname
+tor-advanced-dialog-proxy-port-input-label = Port
+tor-advanced-dialog-proxy-username-input-label = Username
+tor-advanced-dialog-proxy-username-input =
+ .placeholder = Optional
+tor-advanced-dialog-proxy-password-input-label = Password
+tor-advanced-dialog-proxy-password-input =
+ .placeholder = Optional
+tor-advanced-dialog-firewall-checkbox =
+ .label = This computer goes through a firewall that only allows connections to certain ports
+tor-advanced-dialog-firewall-ports-input-label = Allowed ports
+tor-advanced-dialog-firewall-ports-input =
+ .placeholder = Comma-separated values
+
## About Tor Browser dialog.
# '<label data-l10n-name="project-link">' and '</label>' should wrap the link text for the Tor Project, and will link to the Tor Project web page.
=====================================
toolkit/modules/TorStrings.sys.mjs
=====================================
@@ -67,107 +67,23 @@ const Loader = {
*/
settings() {
const strings = {
- categoryTitle: "Connection",
// Message box
torPreferencesDescription:
"Tor Browser routes your traffic over the Tor Network, run by thousands of volunteers around the world.",
- // Status
- statusInternetLabel: "Internet:",
- statusInternetTest: "Test",
- statusInternetOnline: "Online",
- statusInternetOffline: "Offline",
- statusTorLabel: "Tor Network:",
- statusTorConnected: "Connected",
- statusTorNotConnected: "Not Connected",
- statusTorBlocked: "Potentially Blocked",
- learnMore: "Learn more",
// Quickstart
- quickstartHeading: "Quickstart",
- quickstartDescription:
- "Quickstart connects Tor Browser to the Tor Network automatically when launched, based on your last used connection settings.",
quickstartCheckbox: "Always connect automatically",
- // Bridge settings
- bridgesHeading: "Bridges",
- bridgesDescription2:
- "Bridges help you securely access the Tor Network in places where Tor is blocked. Depending on where you are, one bridge may work better than another.",
bridgeLocation: "Your location",
bridgeLocationAutomatic: "Automatic",
bridgeLocationFrequent: "Frequently selected locations",
bridgeLocationOther: "Other locations",
bridgeChooseForMe: "Choose a Bridge For Me…",
- remove: "Remove",
- bridgeDisableBuiltIn: "Disable built-in bridges",
- copied: "Copied!",
- bridgeRemoveAllDialogTitle: "Remove all bridges?",
- bridgeRemoveAllDialogDescription:
- "If these bridges were received from torproject.org or added manually, this action cannot be undone",
- // Advanced settings
- advancedHeading: "Advanced",
- advancedLabel: "Configure how Tor Browser connects to the internet",
- advancedButton: "Settings…",
- showTorDaemonLogs: "View the Tor logs",
- showLogs: "View Logs…",
- // Remove all bridges dialog
- removeBridgesQuestion: "Remove all the bridges?",
- removeBridgesWarning: "This action cannot be undone.",
- cancel: "Cancel",
- // Scan bridge QR dialog
- scanQrTitle: "Scan the QR code",
- // Builtin bridges dialog
- builtinBridgeHeader: "Select a Built-In Bridge",
- builtinBridgeDescription2:
- "Tor Browser includes some specific types of bridges known as “pluggable transports”, which can help conceal the fact you’re using Tor.",
- builtinBridgeObfs4Title: "obfs4 (Built-in)",
- builtinBridgeObfs4Description2:
- "Makes your Tor traffic look like random data. May not work in heavily censored regions.",
- builtinBridgeSnowflake: "Snowflake",
- builtinBridgeSnowflakeDescription2:
- "Routes your connection through Snowflake proxies to make it look like you’re placing a video call, for example.",
- builtinBridgeMeekAzure: "meek-azure",
- builtinBridgeMeekAzureDescription2:
- "Makes it look like you’re connected to a Microsoft website, instead of using Tor. May work in heavily censored regions, but is usually very slow.",
- bridgeButtonConnect: "Connect",
- bridgeButtonAccept: "OK",
- // Request bridges dialog
- requestBridgeDialogTitle: "Request Bridge",
- submitCaptcha: "Submit",
- contactingBridgeDB: "Contacting BridgeDB. Please Wait.",
- solveTheCaptcha: "Solve the CAPTCHA to request a bridge.",
- captchaTextboxPlaceholder: "Enter the characters from the image",
- incorrectCaptcha: "The solution is not correct. Please try again.",
- // Connection settings dialog
- connectionSettingsDialogTitle: "Connection Settings",
- connectionSettingsDialogHeader:
- "Configure how Tor Browser connects to the Internet",
- useLocalProxy: "I use a proxy to connect to the Internet",
- proxyType: "Proxy Type",
- proxyTypeSOCKS4: "SOCKS4",
- proxyTypeSOCKS5: "SOCKS5",
- proxyTypeHTTP: "HTTP/HTTPS",
- proxyAddress: "Address",
- proxyAddressPlaceholder: "IP address or hostname",
- proxyPort: "Port",
- proxyUsername: "Username",
- proxyPassword: "Password",
- proxyUsernamePasswordPlaceholder: "Optional",
- useFirewall:
- "This computer goes through a firewall that only allows connections to certain ports",
- allowedPorts: "Allowed Ports",
- allowedPortsPlaceholder: "Comma-seperated values",
- // Log dialog
- torLogDialogTitle: "Tor Logs",
- copyLog: "Copy Tor Log to Clipboard",
};
const tsb = new TorPropertyStringBundle(
"chrome://torbutton/locale/settings.properties",
"settings."
);
- return {
- ...tsb.getStrings(strings),
- learnMoreTorBrowserURL: "about:manual#about",
- learnMoreBridgesURL: "about:manual#bridges",
- };
+ return tsb.getStrings(strings);
} /* Tor Network Settings Strings */,
torConnect() {
=====================================
toolkit/torbutton/chrome/locale/en-US/settings.properties
=====================================
@@ -3,95 +3,17 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-settings.categoryTitle=Connection
+# Still used in TorConnect.
# Message box
settings.torPreferencesDescription=Tor Browser routes your traffic over the Tor Network, run by thousands of volunteers around the world.
-# Status
-settings.statusInternetLabel=Internet:
-settings.statusInternetTest=Test
-settings.statusInternetOnline=Online
-settings.statusInternetOffline=Offline
-settings.statusTorLabel=Tor Network:
-settings.statusTorConnected=Connected
-settings.statusTorNotConnected=Not Connected
-settings.statusTorBlocked=Potentially Blocked
-settings.learnMore=Learn more
-
-# Quickstart
-settings.quickstartHeading=Quickstart
-settings.quickstartDescription=Quickstart connects Tor Browser to the Tor Network automatically when launched, based on your last used connection settings.
settings.quickstartCheckbox=Always connect automatically
-# Bridge settings
-settings.bridgesHeading=Bridges
-settings.bridgesDescription2=Bridges help you securely access the Tor Network in places where Tor is blocked. Depending on where you are, one bridge may work better than another.
+# Might be removed in tor-browser#42477
+
settings.bridgeLocation=Your location
settings.bridgeLocationAutomatic=Automatic
settings.bridgeLocationFrequent=Frequently selected locations
settings.bridgeLocationOther=Other locations
settings.bridgeChooseForMe=Choose a Bridge For Me…
-
-settings.remove=Remove
-settings.bridgeDisableBuiltIn=Disable built-in bridges
-settings.copied=Copied!
-settings.bridgeRemoveAllDialogTitle=Remove all bridges?
-settings.bridgeRemoveAllDialogDescription=If these bridges were received from torproject.org or added manually, this action cannot be undone
-
-# Advanced settings
-settings.advancedHeading=Advanced
-settings.advancedLabel=Configure how Tor Browser connects to the internet
-settings.advancedButton=Settings…
-settings.showTorDaemonLogs=View the Tor logs
-settings.showLogs=View Logs…
-
-# Remove all bridges dialog
-settings.removeBridgesQuestion=Remove all the bridges?
-settings.removeBridgesWarning=This action cannot be undone.
-settings.cancel=Cancel
-
-# Scan bridge QR dialog
-settings.scanQrTitle=Scan the QR code
-
-# Builtin bridges dialog
-settings.builtinBridgeHeader=Select a Built-In Bridge
-settings.builtinBridgeDescription2=Tor Browser includes some specific types of bridges known as “pluggable transports”, which can help conceal the fact you’re using Tor.
-settings.builtinBridgeObfs4Title=obfs4 (Built-in)
-settings.builtinBridgeObfs4Description2=Makes your Tor traffic look like random data. May not work in heavily censored regions.
-settings.builtinBridgeSnowflake=Snowflake
-settings.builtinBridgeSnowflakeDescription2=Routes your connection through Snowflake proxies to make it look like you’re placing a video call, for example.
-settings.builtinBridgeMeekAzure=meek-azure
-settings.builtinBridgeMeekAzureDescription2=Makes it look like you’re connected to a Microsoft website, instead of using Tor. May work in heavily censored regions, but is usually very slow.
-settings.bridgeButtonConnect=Connect
-settings.bridgeButtonAccept=OK
-
-# Request bridges dialog
-settings.requestBridgeDialogTitle=Request Bridge
-settings.submitCaptcha=Submit
-settings.contactingBridgeDB=Contacting BridgeDB. Please Wait.
-settings.solveTheCaptcha=Solve the CAPTCHA to request a bridge.
-settings.captchaTextboxPlaceholder=Enter the characters from the image
-settings.incorrectCaptcha=The solution is not correct. Please try again.
-
-# Connection settings dialog
-settings.connectionSettingsDialogTitle=Connection Settings
-settings.connectionSettingsDialogHeader=Configure how Tor Browser connects to the Internet
-settings.useLocalProxy=I use a proxy to connect to the Internet
-settings.proxyType=Proxy Type
-settings.proxyTypeSOCKS4=SOCKS4
-settings.proxyTypeSOCKS5=SOCKS5
-settings.proxyTypeHTTP=HTTP/HTTPS
-settings.proxyAddress=Address
-settings.proxyAddressPlaceholder=IP address or hostname
-settings.proxyPort=Port
-settings.proxyUsername=Username
-settings.proxyPassword=Password
-settings.proxyUsernamePasswordPlaceholder=Optional
-settings.useFirewall=This computer goes through a firewall that only allows connections to certain ports
-settings.allowedPorts=Allowed Ports
-settings.allowedPortsPlaceholder=Comma-separated values
-
-# Log dialog
-settings.torLogDialogTitle=Tor Logs
-settings.copyLog=Copy Tor Log to Clipboard
=====================================
tools/torbrowser/l10n/migrations/bug-42207-settings.py
=====================================
@@ -0,0 +1,88 @@
+from fluent.migrate.helpers import transforms_from
+
+
+def migrate(ctx):
+ legacy_path = "settings.properties"
+ ctx.add_transforms(
+ "tor-browser.ftl",
+ "tor-browser.ftl",
+ transforms_from(
+ """
+tor-connection-settings-heading = { COPY(path, "settings.categoryTitle") }
+tor-connection-browser-learn-more-link = { COPY(path, "settings.learnMore") }
+
+tor-connection-quickstart-heading = { COPY(path, "settings.quickstartHeading") }
+tor-connection-quickstart-checkbox =
+ .label = { COPY(path, "settings.quickstartCheckbox") }
+
+tor-connection-internet-status-label = { COPY(path, "settings.statusInternetLabel") }
+tor-connection-internet-status-test-button = { COPY(path, "settings.statusInternetTest") }
+tor-connection-internet-status-online = { COPY(path, "settings.statusInternetOnline") }
+tor-connection-internet-status-offline = { COPY(path, "settings.statusInternetOffline") }
+
+tor-bridges-heading = { COPY(path, "settings.bridgesHeading") }
+tor-bridges-overview = { COPY(path, "settings.bridgesDescription2") }
+tor-bridges-learn-more-link = { COPY(path, "settings.learnMore") }
+
+tor-bridges-built-in-obfs4-description = { COPY(path, "settings.builtinBridgeObfs4Description2") }
+tor-bridges-built-in-snowflake-name = { COPY(path, "settings.builtinBridgeSnowflake") }
+tor-bridges-built-in-snowflake-description = { COPY(path, "settings.builtinBridgeSnowflakeDescription2") }
+tor-bridges-built-in-meek-azure-name = { COPY(path, "settings.builtinBridgeMeekAzure") }
+tor-bridges-built-in-meek-azure-description = { COPY(path, "settings.builtinBridgeMeekAzureDescription2") }
+
+remove-all-bridges-warning-title = { COPY(path, "settings.bridgeRemoveAllDialogTitle") }
+remove-all-bridges-warning-description = { COPY(path, "settings.bridgeRemoveAllDialogDescription") }
+remove-all-bridges-warning-remove-button = { COPY(path, "settings.remove") }
+
+bridge-qr-dialog-title =
+ .title = { COPY(path, "settings.scanQrTitle") }
+
+bridge-dialog-button-connect = { COPY(path, "settings.bridgeButtonConnect") }
+bridge-dialog-button-accept = { COPY(path, "settings.bridgeButtonAccept") }
+bridge-dialog-button-submit = { COPY(path, "settings.submitCaptcha") }
+
+built-in-dialog-title =
+ .title = { COPY(path, "settings.builtinBridgeHeader") }
+built-in-dialog-snowflake-radio-option =
+ .label = { COPY(path, "settings.builtinBridgeSnowflake") }
+built-in-dialog-meek-azure-radio-option =
+ .label = { COPY(path, "settings.builtinBridgeMeekAzure") }
+
+request-bridge-dialog-title =
+ .title = { COPY(path, "settings.requestBridgeDialogTitle") }
+request-bridge-dialog-top-wait = { COPY(path, "settings.contactingBridgeDB") }
+request-bridge-dialog-top-solve = { COPY(path, "settings.solveTheCaptcha") }
+request-bridge-dialog-captcha-input =
+ .placeholder = { COPY(path, "settings.captchaTextboxPlaceholder") }
+request-bridge-dialog-captcha-failed = { COPY(path, "settings.incorrectCaptcha") }
+
+tor-advanced-settings-heading = { COPY(path, "settings.advancedHeading") }
+tor-advanced-settings-button = { COPY(path, "settings.advancedButton") }
+
+tor-log-dialog-copy-button-copied =
+ .label = { COPY(path, "settings.copied") }
+
+tor-advanced-dialog-proxy-socks4-menuitem =
+ .label = { COPY(path, "settings.proxyTypeSOCKS4") }
+tor-advanced-dialog-proxy-socks5-menuitem =
+ .label = { COPY(path, "settings.proxyTypeSOCKS5") }
+tor-advanced-dialog-proxy-http-menuitem =
+ .label = { COPY(path, "settings.proxyTypeHTTP") }
+tor-advanced-dialog-proxy-address-input-label = { COPY(path, "settings.proxyAddress") }
+tor-advanced-dialog-proxy-address-input =
+ .placeholder = { COPY(path, "settings.proxyAddressPlaceholder") }
+tor-advanced-dialog-proxy-port-input-label = { COPY(path, "settings.proxyPort") }
+tor-advanced-dialog-proxy-username-input-label = { COPY(path, "settings.proxyUsername") }
+tor-advanced-dialog-proxy-username-input =
+ .placeholder = { COPY(path, "settings.proxyUsernamePasswordPlaceholder") }
+tor-advanced-dialog-proxy-password-input-label = { COPY(path, "settings.proxyPassword") }
+tor-advanced-dialog-proxy-password-input =
+ .placeholder = { COPY(path, "settings.proxyUsernamePasswordPlaceholder") }
+tor-advanced-dialog-firewall-checkbox =
+ .label = { COPY(path, "settings.useFirewall") }
+tor-advanced-dialog-firewall-ports-input =
+ .placeholder = { COPY(path, "settings.allowedPortsPlaceholder") }
+""",
+ path=legacy_path,
+ ),
+ )
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/3f77b1…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/3f77b1…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/tor-browser][tor-browser-115.9.0esr-13.5-1] 2 commits: fixup! Bug 40933: Add tor-launcher functionality
by richard (@richard) 09 Apr '24
by richard (@richard) 09 Apr '24
09 Apr '24
richard pushed to branch tor-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
2b1f695a by Pier Angelo Vendrame at 2024-04-09T19:50:54+00:00
fixup! Bug 40933: Add tor-launcher functionality
Bug 42510: Do not call SETCONF when we do not own the tor daemon.
- - - - -
3f77b1ff by Pier Angelo Vendrame at 2024-04-09T19:50:54+00:00
fixup! Bug 40597: Implement TorSettings module
Bug 42511: Fixed a typo
TorConnectState.DisabledState -> TorConnectState.Disabled
- - - - -
2 changed files:
- toolkit/components/tor-launcher/TorProvider.sys.mjs
- toolkit/modules/TorConnect.sys.mjs
Changes:
=====================================
toolkit/components/tor-launcher/TorProvider.sys.mjs
=====================================
@@ -226,16 +226,18 @@ export class TorProvider {
throw e;
}
- try {
- await lazy.TorSettings.initializedPromise;
- await this.writeSettings(lazy.TorSettings.getSettings());
- } catch (e) {
- logger.warn(
- "Failed to initialize TorSettings or to write our settings, so uninitializing.",
- e
- );
- this.uninit();
- throw e;
+ if (this.ownsTorDaemon) {
+ try {
+ await lazy.TorSettings.initializedPromise;
+ await this.writeSettings(lazy.TorSettings.getSettings());
+ } catch (e) {
+ logger.warn(
+ "Failed to initialize TorSettings or to write our settings, so uninitializing.",
+ e
+ );
+ this.uninit();
+ throw e;
+ }
}
TorLauncherUtil.setProxyConfiguration(this.#socksSettings);
=====================================
toolkit/modules/TorConnect.sys.mjs
=====================================
@@ -723,7 +723,7 @@ class DisabledState extends StateCallback {
allowedTransitions = Object.freeze([]);
constructor() {
- super(TorConnectState.DisabledState);
+ super(TorConnectState.Disabled);
}
async run() {
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/5dc406…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/5dc406…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/tor-browser-build][main] geckoview tools in tor-browser moved into their own directory (fat-aar)
by Pier Angelo Vendrame (@pierov) 09 Apr '24
by Pier Angelo Vendrame (@pierov) 09 Apr '24
09 Apr '24
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
872cff7c by Dan Ballard at 2024-04-09T11:41:30-07:00
geckoview tools in tor-browser moved into their own directory (fat-aar)
- - - - -
1 changed file:
- projects/geckoview/build
Changes:
=====================================
projects/geckoview/build
=====================================
@@ -89,8 +89,9 @@ export MOZ_SOURCE_CHANGESET=[% c("var/git_commit") %]
MOZCONFIG_EOF
echo "Starting the creation of the fake fat AAR $(date)"
- pushd tools/torbrowser
- make fat-aar ARCHS="[% c('arch') %]"
+ pushd tools/geckoview
+ touch android-env.sh
+ make fataar ARCHS="[% c('arch') %]"
popd
MOZCONFIG=mozconfig-android-all ./mach gradle \
geckoview:publishWithGeckoBinariesDebugPublicationToMavenLocal \
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/8…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/8…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/tor-browser][tor-browser-115.9.0esr-13.5-1] fixup! Bug 41089: Add tor-browser build scripts + Makefile to tor-browser
by Pier Angelo Vendrame (@pierov) 09 Apr '24
by Pier Angelo Vendrame (@pierov) 09 Apr '24
09 Apr '24
Pier Angelo Vendrame pushed to branch tor-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
5dc406d2 by Dan Ballard at 2024-04-09T10:18:53-07:00
fixup! Bug 41089: Add tor-browser build scripts + Makefile to tor-browser
add geckoview tools
- - - - -
11 changed files:
- + tools/geckoview/.gitignore
- + tools/geckoview/Makefile
- + tools/geckoview/android-env-linux-template.sh
- + tools/geckoview/android-env-macos-template.sh
- + tools/geckoview/build.sh
- + tools/geckoview/clobber.sh
- + tools/geckoview/config.sh
- tools/torbrowser/fataar.py → tools/geckoview/fataar.py
- + tools/geckoview/jslint.sh
- + tools/geckoview/package-gradle.sh
- tools/torbrowser/Makefile
Changes:
=====================================
tools/geckoview/.gitignore
=====================================
@@ -0,0 +1 @@
+android-env.sh
=====================================
tools/geckoview/Makefile
=====================================
@@ -0,0 +1,43 @@
+.DEFAULT_GOAL := all
+
+# one of armv7 aarch64 x86 x86_64
+ARCH=aarch64
+
+ARCHS=$(ARCH)
+OS="${shell uname}"
+
+# https://stackoverflow.com/questions/18136918/how-to-get-current-relative-di…
+mkfile_path := "$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))"
+
+DEV_ROOT = "$(mkfile_path)/../.."
+
+clobber: env
+ ./clobber.sh $(DEV_ROOT) $(ARCH)
+
+config: env
+ ./config.sh $(DEV_ROOT) $(ARCH)
+
+build: env
+ ./build.sh $(DEV_ROOT) $(ARCH)
+
+fataar: env
+ bash -c "source android-env.sh && ./fataar.py $(DEV_ROOT) $(ARCHS)"
+
+package: env
+ ./package-gradle.sh $(DEV_ROOT) $(ARCH)
+
+show:
+ ls -lh ~/.m2/repository/org/mozilla/geckoview/geckoview-default-omni/
+ ls -lh ~/.m2/repository/org/mozilla/geckoview/geckoview-default-omni/$(shell ls ~/.m2/repository/org/mozilla/geckoview/geckoview-default-omni | tail -n 2 | head -n 1)
+
+env:
+ test -e android-env.sh || { echo "copy android-env-...-template.sh to android-env.sh and edit appropriatly"; exit 1; }
+
+all: env build package
+
+jslint:
+ ./jslint.sh $(DEV_ROOT) $(JS)
+
+clean:
+ rm -rf $(BUILD_OUTPUT)
+
=====================================
tools/geckoview/android-env-linux-template.sh
=====================================
@@ -0,0 +1,7 @@
+export MOZ_BUILD_DATE=20230710165010 # This should match the data in [firefox-android](https://gitlab.torproject.org/tpo/applications/firefox-and… ~ln 12's def of the variable *version*, the date component
+export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+export ANDROID_HOME=$HOME/.mozbuild/android-sdk-linux/ # or $HOME/Android/Sdk/ # Or .../android-toolchain/android-sdk-linux if you extract android-toolchain from tor-browser-build
+export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/23.2.8568313/ # for 115esr
+export GRADLE_HOME=/FULL/PATH/TO/tor-browser-build/out/gradle/gradle-7.5.1 # Or the version that we currently use
+export LOCAL_DEV_BUILD=1
+export PATH=/FULL/PATH/TO/tor-browser-build/out/clang/clang-16.x.y-arm/bin/:$PATH # prepend our newly built and assembled clang to the path so it gets used to build geckoview
=====================================
tools/geckoview/android-env-macos-template.sh
=====================================
@@ -0,0 +1,7 @@
+export MOZ_BUILD_DATE=20230710165010 # This should match the data in [firefox-android](https://gitlab.torproject.org/tpo/applications/firefox-and… ~ln 12's def of the variable *version*, the date component
+export JAVA_HOME=/opt/homebrew/opt/openjdk(a)11/libexec/openjdk.jdk/Contents/Home/ # for arm64. Or JAVA_HOME=/usr/local/opt/openjdk(a)11/libexec/openjdk.jdk/Contents/Home/ for x86_64.
+export ANDROID_HOME=$HOME/Library/Android/sdk # or $HOME/.mozbuild/android-sdk-macosx/
+export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/23.2.8568313 # will need to download NDK 23.2.8568313 via android studio
+export GRADLE_HOME=/opt/homebrew/Cellar/gradle(a)7/7.6.4 # for arm64 or /usr/local/Cellar/gradle(a)7/7.6.4 for x86_64. Make sure the version is up to date
+export LOCAL_DEV_BUILD=1
+export PATH=$ANDROID_HOME/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/:$PATH # prepend android studios latest ndk to the path so it's clang gets used to build geckoview. NDK 25.2.9519653 uses clang 14.0.7, ideally we'd use clang 16 (to be the same as Linux) but that's not an option yet for android studio. NDK 26.1.10909125 uses clang 17.0.2, which we should evaluate with the esr128 migration
=====================================
tools/geckoview/build.sh
=====================================
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+DEV_ROOT=$1
+ARCH=$2
+
+source android-env.sh
+
+cd $DEV_ROOT
+MOZCONFIG=mozconfig-android-$ARCH ./mach build
=====================================
tools/geckoview/clobber.sh
=====================================
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -e
+DEV_ROOT=$1
+ARCH=$2
+
+source android-env.sh
+
+cd $DEV_ROOT
+MOZCONFIG=mozconfig-android-$ARCH ./mach clobber
+MOZCONFIG=mozconfig-android-all ./mach clobber
=====================================
tools/geckoview/config.sh
=====================================
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+DEV_ROOT=$1
+ARCH=$2
+
+source android-env.sh
+
+cd $DEV_ROOT
+MOZCONFIG=mozconfig-android-$ARCH ./mach configure --without-wasm-sandboxed-libraries
=====================================
tools/torbrowser/fataar.py → tools/geckoview/fataar.py
=====================================
=====================================
tools/geckoview/jslint.sh
=====================================
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+DEV_ROOT=$1
+JS_FILE=$2
+
+source android-env.sh
+
+cd $DEV_ROOT
+./mach lint -l eslint --fix $JS_FILE
=====================================
tools/geckoview/package-gradle.sh
=====================================
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+DEV_ROOT=$1
+ARCH=$2
+
+source android-env.sh
+
+env ARCHS=$ARCH make fat-aar
+
+cd $DEV_ROOT
+MOZCONFIG=mozconfig-android-$ARCH ./mach build binaries
+MOZCONFIG=mozconfig-android-$ARCH ./mach gradle geckoview:publishWithGeckoBinariesDebugPublicationToMavenRepository
+MOZCONFIG=mozconfig-android-all ./mach gradle geckoview:publishWithGeckoBinariesDebugPublicationToMavenLocal exoplayer2:publishDebugPublicationToMavenLocal
+
+
=====================================
tools/torbrowser/Makefile
=====================================
@@ -47,9 +47,6 @@ build:
deploy:
./deploy.sh $(BINARIES) $(BUILD_OUTPUT)
-fat-aar:
- ./fataar.py $(DEV_ROOT) $(ARCHS)
-
all: build deploy
run:
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5dc406d…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5dc406d…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/tor-browser][tor-browser-115.9.0esr-13.5-1] 17 commits: fixup! Lox integration
by Pier Angelo Vendrame (@pierov) 09 Apr '24
by Pier Angelo Vendrame (@pierov) 09 Apr '24
09 Apr '24
Pier Angelo Vendrame pushed to branch tor-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser
Commits:
a2c8eab3 by Henry Wilkes at 2024-04-09T13:35:51+01:00
fixup! Lox integration
Bug 42489: Add a logger for the Lox module.
- - - - -
21115918 by Henry Wilkes at 2024-04-09T13:36:00+01:00
fixup! Lox integration
Bug 42489: Change "loxid" to "loxId".
This follows the camel case convention.
- - - - -
64fd04bf by Henry Wilkes at 2024-04-09T13:36:01+01:00
fixup! Lox integration
Bug 42489: Require a loxId argument for most methods.
This ensures that a method only works on the credentials of the
*expected* loxId, rather than the newest `TorSettings.bridges.lox_id`
value which may change during a session.
We also add `#activeLoxId` to stay in sync with
`TorSettings.brigdes.lox_id`. We merge `clearInvites` into its updater.
- - - - -
2411aa86 by Henry Wilkes at 2024-04-09T13:36:01+01:00
fixup! Lox integration
Bug 42489: Make loading the stored preferences unconditional on
the #credentials value.
Also change the type of `#events` to always be an Array.
- - - - -
2b7376cd by Henry Wilkes at 2024-04-09T13:36:03+01:00
fixup! Lox integration
Bug 42489: Generated loxId is unlikely to clash with existing ones, but
we add some free logic to guarantee this.
- - - - -
4a114a5d by Henry Wilkes at 2024-04-09T13:36:09+01:00
fixup! Lox integration
Bug 42489: Return copies of Lox module internals to ensure they cannot
be edited by a caller.
- - - - -
e7248fe1 by Henry Wilkes at 2024-04-09T13:57:23+01:00
fixup! Lox integration
Bug 42489: Add notifications to the Lox module.
We ensure changes to credentials pass through #changeCredentials to
check whether we should send a notification.
- - - - -
e8846a94 by Henry Wilkes at 2024-04-09T13:57:29+01:00
fixup! Lox integration
Bug 42489: Add #assertInitialized.
- - - - -
b459399f by Henry Wilkes at 2024-04-09T16:17:17+01:00
fixup! Lox integration
Bug 42489: Change LoxError.
Move the LoxErrors types into LoxError. Only set the type if it is
specific.
- - - - -
23921826 by Henry Wilkes at 2024-04-09T16:17:25+01:00
fixup! Lox integration
Bug 42489: Change the Lox Authority URL.
- - - - -
c9db0992 by Henry Wilkes at 2024-04-09T16:17:26+01:00
fixup! Lox integration
Bug 42489: Try and re fetch the pubKey, encTable and constants if they
failed before.
For example, if they fail via a domain front request, we should try
again with `fetch` when we are bootstrapped.
- - - - -
a9522e4e by Henry Wilkes at 2024-04-09T16:17:26+01:00
fixup! Lox integration
Bug 42489: Make sure trust level strings are converted to integers.
- - - - -
63e0f941 by Henry Wilkes at 2024-04-09T16:22:17+01:00
fixup! Lox integration
Bug 42489: Tidy #attemptUpgrade by returning early with a promise.
- - - - -
40ca47e1 by Henry Wilkes at 2024-04-09T16:22:18+01:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 42489: Listen for notifications from Lox module, and pass in loxId
to methods.
- - - - -
23b9aa5b by Henry Wilkes at 2024-04-09T16:22:29+01:00
fixup! Bug 40597: Implement TorSettings module
Bug 42489: Listen for notifications from Lox module.
Also, do not save the bridge_strings to the preferences if they come
from the Lox module.
In DomainFrontedRequests distinguish between reachability errors,
response errors and other errors in DomainFrontedRequest to improve Lox
error messaging.
- - - - -
46ac1528 by Henry Wilkes at 2024-04-09T16:22:53+01:00
fixup! Bug 40933: Add tor-launcher functionality
Bug 42489: Drop getLocalizedStringForError from TorLauncherUtil.
- - - - -
9abd099f by Henry Wilkes at 2024-04-09T16:22:53+01:00
fixup! Add TorStrings module for localization
Bug 42489: Drop nserror strings.
- - - - -
8 changed files:
- browser/components/torpreferences/content/connectionPane.js
- browser/components/torpreferences/content/loxInviteDialog.js
- browser/components/torpreferences/content/provideBridgeDialog.js
- toolkit/components/lox/Lox.sys.mjs
- toolkit/components/tor-launcher/TorLauncherUtil.sys.mjs
- toolkit/modules/DomainFrontedRequests.sys.mjs
- toolkit/modules/TorSettings.sys.mjs
- toolkit/torbutton/chrome/locale/en-US/torlauncher.properties
Changes:
=====================================
browser/components/torpreferences/content/connectionPane.js
=====================================
@@ -36,7 +36,7 @@ const { TorStrings } = ChromeUtils.importESModule(
"resource://gre/modules/TorStrings.sys.mjs"
);
-const { Lox } = ChromeUtils.importESModule(
+const { Lox, LoxTopics } = ChromeUtils.importESModule(
"resource://gre/modules/Lox.sys.mjs"
);
@@ -1319,27 +1319,18 @@ const gLoxStatus = {
this._invitesButton.addEventListener("click", () => {
gSubDialog.open(
"chrome://browser/content/torpreferences/loxInviteDialog.xhtml",
- {
- features: "resizable=yes",
- closedCallback: () => {
- // TODO: Listen for events from Lox, rather than call _updateInvites
- // directly.
- this._updateInvites();
- },
- }
+ { features: "resizable=yes" }
);
});
this._unlockAlertButton.addEventListener("click", () => {
- // TODO: Have a way to ensure that the cleared event data matches the
- // current _loxId
- Lox.clearEventData();
- // TODO: Listen for events from Lox, rather than call _updateUnlocks
- // directly.
- this._updateUnlocks();
+ Lox.clearEventData(this._loxId);
});
Services.obs.addObserver(this, TorSettingsTopics.SettingsChanged);
- // TODO: Listen for new events from Lox, when it is supported.
+ Services.obs.addObserver(this, LoxTopics.UpdateEvents);
+ Services.obs.addObserver(this, LoxTopics.UpdateNextUnlock);
+ Services.obs.addObserver(this, LoxTopics.UpdateRemainingInvites);
+ Services.obs.addObserver(this, LoxTopics.NewInvite);
// NOTE: Before initializedPromise completes, this area is hidden.
TorSettings.initializedPromise.then(() => {
@@ -1352,6 +1343,10 @@ const gLoxStatus = {
*/
uninit() {
Services.obs.removeObserver(this, TorSettingsTopics.SettingsChanged);
+ Services.obs.removeObserver(this, LoxTopics.UpdateEvents);
+ Services.obs.removeObserver(this, LoxTopics.UpdateNextUnlock);
+ Services.obs.removeObserver(this, LoxTopics.UpdateRemainingInvites);
+ Services.obs.removeObserver(this, LoxTopics.NewInvite);
},
observe(subject, topic, data) {
@@ -1365,6 +1360,18 @@ const gLoxStatus = {
this._updateLoxId();
}
break;
+ case LoxTopics.UpdateNextUnlock:
+ this._updateNextUnlock();
+ break;
+ case LoxTopics.UpdateEvents:
+ this._updatePendingEvents();
+ break;
+ case LoxTopics.UpdateRemainingInvites:
+ this._updateRemainingInvites();
+ break;
+ case LoxTopics.NewInvite:
+ this._updateHaveExistingInvites();
+ break;
}
},
@@ -1384,43 +1391,126 @@ const gLoxStatus = {
TorSettings.bridges.source === TorBridgeSource.Lox
? TorSettings.bridges.lox_id
: "";
- if (loxId !== this._loxId) {
- this._loxId = loxId;
- this._updateUnlocks();
- this._updateInvites();
+ if (loxId === this._loxId) {
+ return;
}
+ this._loxId = loxId;
+ // We unset _nextUnlock to ensure the areas no longer use the old value for
+ // the new loxId.
+ this._updateNextUnlock(true);
+ this._updateRemainingInvites();
+ this._updateHaveExistingInvites();
+ this._updatePendingEvents();
},
/**
- * Update the display of the current or next unlock.
+ * The remaining invites shown, or null if uninitialized or no loxId.
+ *
+ * @type {integer?}
*/
- async _updateUnlocks() {
- // Cache the loxId before we await.
- const loxId = this._loxId;
-
- if (!loxId) {
- // NOTE: This area should already be hidden by the change in Lox source,
- // but we clean up for the next non-empty id.
- this._area.classList.remove("show-unlock-alert");
- this._area.classList.remove("show-next-unlock");
+ _remainingInvites: null,
+ /**
+ * Update the shown value.
+ */
+ _updateRemainingInvites() {
+ const numInvites = this._loxId
+ ? Lox.getRemainingInviteCount(this._loxId)
+ : null;
+ if (numInvites === this._remainingInvites) {
return;
}
-
- let pendingEvents;
- let nextUnlock;
- let numInvites;
- // Fetch the latest events or details about the next unlock.
- try {
- nextUnlock = await Lox.getNextUnlock();
- pendingEvents = Lox.getEventData();
- numInvites = Lox.getRemainingInviteCount();
- } catch (e) {
- console.error("Failed get get lox updates", e);
+ this._remainingInvites = numInvites;
+ this._updateUnlockArea();
+ this._updateInvitesArea();
+ },
+ /**
+ * Whether we have existing invites, or null if uninitialized or no loxId.
+ *
+ * @type {boolean?}
+ */
+ _haveExistingInvites: null,
+ /**
+ * Update the shown value.
+ */
+ _updateHaveExistingInvites() {
+ const haveInvites = this._loxId ? !!Lox.getInvites().length : null;
+ if (haveInvites === this._haveExistingInvites) {
+ return;
+ }
+ this._haveExistingInvites = haveInvites;
+ this._updateInvitesArea();
+ },
+ /**
+ * Details about the next unlock, or null if uninitialized or no loxId.
+ *
+ * @type {UnlockData?}
+ */
+ _nextUnlock: null,
+ /**
+ * Tracker id to ensure that the results from later calls to _updateNextUnlock
+ * take priority over earlier calls.
+ *
+ * @type {integer}
+ */
+ _nextUnlockCallId: 0,
+ /**
+ * Update the shown value asynchronously.
+ *
+ * @param {boolean} [unset=false] - Whether to set the _nextUnlock value to
+ * null before waiting for the new value. I.e. ensure that the current value
+ * will not be used.
+ */
+ async _updateNextUnlock(unset = false) {
+ // NOTE: We do not expect the integer to exceed the maximum integer.
+ this._nextUnlockCallId++;
+ const callId = this._nextUnlockCallId;
+ if (unset) {
+ this._nextUnlock = null;
+ }
+ const nextUnlock = this._loxId
+ ? await Lox.getNextUnlock(this._loxId)
+ : null;
+ if (callId !== this._nextUnlockCallId) {
+ // Replaced by another update.
+ // E.g. if the _loxId changed. Or if getNextUnlock triggered
+ // LoxTopics.UpdateNextUnlock.
return;
}
+ // Should be safe to trigger the update, even when the value hasn't changed.
+ this._nextUnlock = nextUnlock;
+ this._updateUnlockArea();
+ },
+ /**
+ * The list of events the user has not yet cleared, or null if uninitialized
+ * or no loxId.
+ *
+ * @type {EventData[]?}
+ */
+ _pendingEvents: null,
+ /**
+ * Update the shown value.
+ */
+ _updatePendingEvents() {
+ // Should be safe to trigger the update, even when the value hasn't changed.
+ this._pendingEvents = this._loxId ? Lox.getEventData(this._loxId) : null;
+ this._updateUnlockArea();
+ },
- if (loxId !== this._loxId) {
- // Replaced during await.
+ /**
+ * Update the display of the current or next unlock.
+ */
+ _updateUnlockArea() {
+ if (
+ !this._loxId ||
+ this._pendingEvents === null ||
+ this._remainingInvites === null ||
+ this._nextUnlock === null
+ ) {
+ // Uninitialized or no Lox source.
+ // NOTE: This area may already be hidden by the change in Lox source,
+ // but we clean up for the next non-empty id.
+ this._area.classList.remove("show-unlock-alert");
+ this._area.classList.remove("show-next-unlock");
return;
}
@@ -1428,6 +1518,7 @@ const gLoxStatus = {
const alertHadFocus = this._unlockAlert.contains(document.activeElement);
const detailsHadFocus = this._detailsArea.contains(document.activeElement);
+ const pendingEvents = this._pendingEvents;
const showAlert = !!pendingEvents.length;
this._area.classList.toggle("show-unlock-alert", showAlert);
this._area.classList.toggle("show-next-unlock", !showAlert);
@@ -1479,7 +1570,7 @@ const gLoxStatus = {
document.l10n.setAttributes(
this._unlockAlertInviteItem,
"tor-bridges-lox-new-invites",
- { numInvites }
+ { numInvites: this._remainingInvites }
);
this._unlockAlert.classList.toggle(
"lox-unlock-upgrade",
@@ -1494,7 +1585,7 @@ const gLoxStatus = {
const numDays = Math.max(
1,
Math.ceil(
- (new Date(nextUnlock.date).getTime() - Date.now()) /
+ (new Date(this._nextUnlock.date).getTime() - Date.now()) /
(24 * 60 * 60 * 1000)
)
);
@@ -1505,9 +1596,9 @@ const gLoxStatus = {
);
// Gain 2 bridges from level 0 to 1. After that gain invites.
- const bridgeGain = nextUnlock.nextLevel === 1;
- const firstInvites = nextUnlock.nextLevel === 2;
- const moreInvites = nextUnlock.nextLevel > 2;
+ const bridgeGain = this._nextUnlock.nextLevel === 1;
+ const firstInvites = this._nextUnlock.nextLevel === 2;
+ const moreInvites = this._nextUnlock.nextLevel > 2;
this._detailsArea.classList.toggle("lox-next-gain-bridges", bridgeGain);
this._detailsArea.classList.toggle(
@@ -1529,24 +1620,19 @@ const gLoxStatus = {
/**
* Update the invites area.
*/
- _updateInvites() {
- if (!this._loxId) {
- return;
- }
-
- let remainingInvites;
- let existingInvites;
- // Fetch the latest events or details about the next unlock.
- try {
- remainingInvites = Lox.getRemainingInviteCount();
- existingInvites = Lox.getInvites().length;
- } catch (e) {
- console.error("Failed get get remaining invites", e);
- return;
+ _updateInvitesArea() {
+ let hasInvites;
+ if (
+ !this._loxId ||
+ this._remainingInvites === null ||
+ this._haveExistingInvites === null
+ ) {
+ // Not initialized yet.
+ hasInvites = false;
+ } else {
+ hasInvites = this._haveExistingInvites || !!this._remainingInvites;
}
- const hasInvites = !!existingInvites || !!remainingInvites;
-
if (!hasInvites) {
if (
this._remainingInvitesEl.contains(document.activeElement) ||
@@ -1563,11 +1649,13 @@ const gLoxStatus = {
// creating new ones.
this._detailsArea.classList.toggle("lox-has-invites", hasInvites);
- document.l10n.setAttributes(
- this._remainingInvitesEl,
- "tor-bridges-lox-remaining-invites",
- { numInvites: remainingInvites }
- );
+ if (hasInvites) {
+ document.l10n.setAttributes(
+ this._remainingInvitesEl,
+ "tor-bridges-lox-remaining-invites",
+ { numInvites: this._remainingInvites }
+ );
+ }
},
};
=====================================
browser/components/torpreferences/content/loxInviteDialog.js
=====================================
@@ -3,14 +3,14 @@
const { TorSettings, TorSettingsTopics, TorBridgeSource } =
ChromeUtils.importESModule("resource://gre/modules/TorSettings.sys.mjs");
-const { Lox, LoxErrors } = ChromeUtils.importESModule(
+const { Lox, LoxError, LoxTopics } = ChromeUtils.importESModule(
"resource://gre/modules/Lox.sys.mjs"
);
/**
* Fake Lox module
-const LoxErrors = {
+const LoxError = {
LoxServerUnreachable: "LoxServerUnreachable",
Other: "Other",
};
@@ -36,7 +36,7 @@ const Lox = {
return;
}
if (!this.remainingInvites) {
- rej({ type: LoxErrors.Other });
+ rej({ type: LoxError.Other });
return;
}
const invite = JSON.stringify({
@@ -104,7 +104,8 @@ const gLoxInvites = {
// NOTE: TorSettings should already be initialized when this dialog is
// opened.
Services.obs.addObserver(this, TorSettingsTopics.SettingsChanged);
- // TODO: Listen for new invites from Lox, when supported.
+ Services.obs.addObserver(this, LoxTopics.UpdateRemainingInvites);
+ Services.obs.addObserver(this, LoxTopics.NewInvite);
// Set initial _loxId value. Can close this dialog.
this._updateLoxId();
@@ -118,6 +119,8 @@ const gLoxInvites = {
*/
uninit() {
Services.obs.removeObserver(this, TorSettingsTopics.SettingsChanged);
+ Services.obs.removeObserver(this, LoxTopics.UpdateRemainingInvites);
+ Services.obs.removeObserver(this, LoxTopics.NewInvite);
},
observe(subject, topic, data) {
@@ -131,6 +134,12 @@ const gLoxInvites = {
this._updateLoxId();
}
break;
+ case LoxTopics.UpdateRemainingInvites:
+ this._updateRemainingInvites();
+ break;
+ case LoxTopics.NewInvite:
+ this._updateExistingInvites();
+ break;
}
},
@@ -204,7 +213,7 @@ const gLoxInvites = {
* Update the display of the remaining invites.
*/
_updateRemainingInvites() {
- this._remainingInvites = Lox.getRemainingInviteCount();
+ this._remainingInvites = Lox.getRemainingInviteCount(this._loxId);
document.l10n.setAttributes(
this._remainingInvitesEl,
@@ -254,7 +263,7 @@ const gLoxInvites = {
this._connectingEl.focus();
let lostFocus = false;
- Lox.generateInvite()
+ Lox.generateInvite(this._loxId)
.finally(() => {
// Fetch whether the connecting label still has focus before we hide it.
lostFocus = this._connectingEl.contains(document.activeElement);
@@ -275,15 +284,11 @@ const gLoxInvites = {
// message.
this._inviteListEl.focus();
}
-
- // TODO: When Lox sends out notifications, let the observer handle the
- // change rather than calling _updateRemainingInvites directly.
- this._updateRemainingInvites();
},
loxError => {
console.error("Failed to generate an invite", loxError);
- switch (loxError.type) {
- case LoxErrors.LoxServerUnreachable:
+ switch (loxError instanceof LoxError ? loxError.code : null) {
+ case LoxError.LoxServerUnreachable:
this._updateGenerateError("no-server");
break;
default:
=====================================
browser/components/torpreferences/content/provideBridgeDialog.js
=====================================
@@ -15,14 +15,14 @@ const { TorParsers } = ChromeUtils.importESModule(
"resource://gre/modules/TorParsers.sys.mjs"
);
-const { Lox, LoxErrors } = ChromeUtils.importESModule(
+const { Lox, LoxError } = ChromeUtils.importESModule(
"resource://gre/modules/Lox.sys.mjs"
);
/*
* Fake Lox module:
-const LoxErrors = {
+const LoxError = {
BadInvite: "BadInvite",
LoxServerUnreachable: "LoxServerUnreachable",
Other: "Other",
@@ -30,9 +30,9 @@ const LoxErrors = {
const Lox = {
failError: null,
- // failError: LoxErrors.BadInvite,
- // failError: LoxErrors.LoxServerUnreachable,
- // failError: LoxErrors.Other,
+ // failError: LoxError.BadInvite,
+ // failError: LoxError.LoxServerUnreachable,
+ // failError: LoxError.Other,
redeemInvite(invite) {
return new Promise((res, rej) => {
setTimeout(() => {
@@ -281,13 +281,13 @@ const gProvideBridgeDialog = {
},
loxError => {
console.error("Redeeming failed", loxError);
- switch (loxError.type) {
- case LoxErrors.BadInvite:
+ switch (loxError instanceof LoxError ? loxError.code : null) {
+ case LoxError.BadInvite:
// TODO: distinguish between a bad invite, an invite that has
// expired, and an invite that has already been redeemed.
this.updateError({ type: "bad-invite" });
break;
- case LoxErrors.LoxServerUnreachable:
+ case LoxError.LoxServerUnreachable:
this.updateError({ type: "no-server" });
break;
default:
=====================================
toolkit/components/lox/Lox.sys.mjs
=====================================
@@ -5,15 +5,32 @@ import {
} from "resource://gre/modules/Timer.sys.mjs";
const lazy = {};
+
+ChromeUtils.defineLazyGetter(lazy, "logger", () => {
+ let { ConsoleAPI } = ChromeUtils.importESModule(
+ "resource://gre/modules/Console.sys.mjs"
+ );
+ return new ConsoleAPI({
+ maxLogLevel: "warn",
+ maxLogLevelPref: "lox.log_level",
+ prefix: "Lox",
+ });
+});
+
ChromeUtils.defineESModuleGetters(lazy, {
DomainFrontRequestBuilder:
"resource://gre/modules/DomainFrontedRequests.sys.mjs",
+ DomainFrontRequestNetworkError:
+ "resource://gre/modules/DomainFrontedRequests.sys.mjs",
+ DomainFrontRequestResponseError:
+ "resource://gre/modules/DomainFrontedRequests.sys.mjs",
TorConnect: "resource://gre/modules/TorConnect.sys.mjs",
TorConnectState: "resource://gre/modules/TorConnect.sys.mjs",
TorSettings: "resource://gre/modules/TorSettings.sys.mjs",
TorSettingsTopics: "resource://gre/modules/TorSettings.sys.mjs",
TorBridgeSource: "resource://gre/modules/TorSettings.sys.mjs",
});
+
XPCOMUtils.defineLazyModuleGetters(lazy, {
init: "resource://gre/modules/lox_wasm.jsm",
open_invite: "resource://gre/modules/lox_wasm.jsm",
@@ -37,13 +54,22 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
handle_blockage_migration: "resource://gre/modules/lox_wasm.jsm",
});
-export const LoxErrors = Object.freeze({
- BadInvite: "BadInvite",
- MissingCredential: "MissingCredential",
- LoxServerUnreachable: "LoxServerUnreachable",
- NoInvitations: "NoInvitations",
- InitError: "InitializationError",
- NotInitialized: "NotInitialized",
+export const LoxTopics = Object.freeze({
+ // Whenever the bridges *might* have changed.
+ // getBridges only uses #credentials, so this will only fire when it changes.
+ UpdateBridges: "lox:update-bridges",
+ // Whenever we gain a new upgrade or blockage event, or clear events.
+ UpdateEvents: "lox:update-events",
+ // Whenever the next unlock *might* have changed.
+ // getNextUnlock uses #credentials and #constants, sow ill fire when either
+ // value changes.
+ UpdateNextUnlock: "lox:update-next-unlock",
+ // Whenever the remaining invites *might* have changed.
+ // getRemainingInviteCount only uses #credentials, so will only fire when it
+ // changes.
+ UpdateRemainingInvites: "lox:update-remaining-invites",
+ // Whenever we generate a new invite.
+ NewInvite: "lox:new-invite",
});
const LoxSettingsPrefs = Object.freeze({
@@ -56,10 +82,21 @@ const LoxSettingsPrefs = Object.freeze({
constants: "lox.settings.constants",
});
-class LoxError extends Error {
- constructor(type) {
- super("");
- this.type = type;
+/**
+ * Error class for Lox.
+ */
+export class LoxError extends Error {
+ static BadInvite = "BadInvite";
+ static LoxServerUnreachable = "LoxServerUnreachable";
+
+ /**
+ * @param {string} message - The error message.
+ * @param {string?} [code] - The specific error type, if any.
+ */
+ constructor(message, code = null) {
+ super(message);
+ this.name = "LoxError";
+ this.code = code;
}
}
@@ -70,14 +107,65 @@ class LoxImpl {
#encTablePromise = null;
#constantsPromise = null;
#domainFrontedRequests = null;
- #invites = null;
+ /**
+ * The list of invites generated.
+ *
+ * @type {string[]}
+ */
+ #invites = [];
#pubKeys = null;
#encTable = null;
#constants = null;
- #credentials = null;
+ /**
+ * The latest credentials for a given lox id.
+ *
+ * @type {Object<string, string>}
+ */
+ #credentials = {};
+ /**
+ * The list of accumulated blockage or upgrade events.
+ *
+ * This can be cleared when the user acknowledges the events.
+ *
+ * @type {EventData[]}
+ */
#events = [];
#backgroundInterval = null;
+ /**
+ * The lox ID that is currently active.
+ *
+ * Stays in sync with TorSettings.bridges.lox_id. null when uninitialized.
+ *
+ * @type {string?}
+ */
+ #activeLoxId = null;
+
+ /**
+ * Update the active lox id.
+ */
+ #updateActiveLoxId() {
+ const loxId = lazy.TorSettings.bridges.lox_id;
+ if (loxId === this.#activeLoxId) {
+ return;
+ }
+ lazy.logger.debug(
+ `#activeLoxId switching from "${this.#activeLoxId}" to "${loxId}"`
+ );
+ if (this.#activeLoxId !== null) {
+ lazy.logger.debug(
+ `Clearing event data and invites for "${this.#activeLoxId}"`
+ );
+ // If not initializing clear the metadata for the old lox ID when it
+ // changes.
+ this.clearEventData(this.#activeLoxId);
+ // TODO: Do we want to keep invites? See tor-browser#42453
+ this.#invites = [];
+ this.#store();
+ }
+ this.#activeLoxId = loxId;
+ }
+
observe(subject, topic, data) {
switch (topic) {
case lazy.TorSettingsTopics.SettingsChanged:
@@ -87,11 +175,8 @@ class LoxImpl {
changes.includes("bridges.source") ||
changes.includes("bridges.lox_id")
) {
- // if lox_id has changed, clear event and invite queues
- if (changes.includes("bridges.lox_id")) {
- this.clearEventData();
- this.clearInvites();
- }
+ // The lox_id may have changed.
+ this.#updateActiveLoxId();
// Only run background tasks if Lox is enabled
if (this.#inuse) {
@@ -108,6 +193,8 @@ class LoxImpl {
}
break;
case lazy.TorSettingsTopics.Ready:
+ // Set the initial #activeLoxId.
+ this.#updateActiveLoxId();
// Run background tasks every 12 hours if Lox is enabled
if (this.#inuse) {
this.#backgroundInterval = setInterval(
@@ -119,36 +206,86 @@ class LoxImpl {
}
}
+ /**
+ * Assert that the module is initialized.
+ */
+ #assertInitialized() {
+ if (!this.#initialized) {
+ throw new LoxError("Not initialized");
+ }
+ }
+
get #inuse() {
return (
+ Boolean(this.#activeLoxId) &&
lazy.TorSettings.bridges.enabled === true &&
- lazy.TorSettings.bridges.source === lazy.TorBridgeSource.Lox &&
- lazy.TorSettings.bridges.lox_id
+ lazy.TorSettings.bridges.source === lazy.TorBridgeSource.Lox
);
}
+ /**
+ * Change some existing credentials for an ID to a new value.
+ *
+ * @param {string} loxId - The ID to change the credentials for.
+ * @param {string} newCredentials - The new credentials to set.
+ */
+ #changeCredentials(loxId, newCredentials) {
+ // FIXME: Several async methods want to update the credentials, but they
+ // might race and conflict with each. tor-browser#42492
+ if (!newCredentials) {
+ // Avoid overwriting and losing our current credentials.
+ throw new LoxError(`Empty credentials being set for ${loxId}`);
+ }
+ if (!this.#credentials[loxId]) {
+ // Unexpected, but we still want to save the value to storage.
+ lazy.logger.warn(`Lox ID ${loxId} is missing existing credentials`);
+ }
+
+ this.#credentials[loxId] = newCredentials;
+ this.#store();
+
+ // NOTE: In principle we could determine within this module whether the
+ // bridges, remaining invites, or next unlock changes in value when
+ // switching credentials.
+ // However, this logic can be done by the topic observers, as needed. In
+ // particular, TorSettings.bridges.bridge_strings has its own logic
+ // determining whether its value has changed.
+
+ // Let TorSettings know about possibly new bridges.
+ Services.obs.notifyObservers(null, LoxTopics.UpdateBridges);
+ // Let UI know about changes.
+ Services.obs.notifyObservers(null, LoxTopics.UpdateRemainingInvites);
+ Services.obs.notifyObservers(null, LoxTopics.UpdateNextUnlock);
+ }
+
+ /**
+ * Fetch the latest credentials.
+ *
+ * @param {string} loxId - The ID to get the credentials for.
+ *
+ * @returns {string} - The credentials.
+ */
+ #getCredentials(loxId) {
+ const cred = loxId ? this.#credentials[loxId] : undefined;
+ if (!cred) {
+ throw new LoxError(`No credentials for ${loxId}`);
+ }
+ return cred;
+ }
+
/**
* Formats and returns bridges from the stored Lox credential.
*
- * @param {string} loxid The id string associated with a lox credential.
+ * @param {string} loxId The id string associated with a lox credential.
*
* @returns {string[]} An array of formatted bridge lines. The array is empty
* if there are no bridges.
*/
- getBridges(loxid) {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
- if (loxid === null) {
- return [];
- }
- if (!this.#credentials[loxid]) {
- // This lox id doesn't correspond to a stored credential
- throw new LoxError(LoxErrors.MissingCredential);
- }
+ getBridges(loxId) {
+ this.#assertInitialized();
// Note: this is messy now but can be mostly removed after we have
// https://gitlab.torproject.org/tpo/anti-censorship/lox/-/issues/46
- let bridgelines = JSON.parse(this.#credentials[loxid]).bridgelines;
+ let bridgelines = JSON.parse(this.#getCredentials(loxId)).bridgelines;
let bridges = [];
for (const bridge of bridgelines) {
let addr = bridge.addr;
@@ -219,18 +356,12 @@ class LoxImpl {
}
#load() {
- if (this.#credentials === null) {
- let cred = Services.prefs.getStringPref(LoxSettingsPrefs.credentials, "");
- this.#credentials = cred !== "" ? JSON.parse(cred) : {};
- let invites = Services.prefs.getStringPref(LoxSettingsPrefs.invites, "");
- if (invites !== "") {
- this.#invites = JSON.parse(invites);
- }
- let events = Services.prefs.getStringPref(LoxSettingsPrefs.events, "");
- if (events !== "") {
- this.#events = JSON.parse(events);
- }
- }
+ const cred = Services.prefs.getStringPref(LoxSettingsPrefs.credentials, "");
+ this.#credentials = cred ? JSON.parse(cred) : {};
+ const invites = Services.prefs.getStringPref(LoxSettingsPrefs.invites, "");
+ this.#invites = invites ? JSON.parse(invites) : [];
+ const events = Services.prefs.getStringPref(LoxSettingsPrefs.events, "");
+ this.#events = events ? JSON.parse(events) : [];
this.#pubKeys = Services.prefs.getStringPref(
LoxSettingsPrefs.pubkeys,
null
@@ -246,16 +377,21 @@ class LoxImpl {
}
async #getPubKeys() {
+ // FIXME: We are always refetching #pubKeys, #encTable and #constants once
+ // per session, but they may change more frequently. tor-browser#42502
if (this.#pubKeyPromise === null) {
this.#pubKeyPromise = this.#makeRequest("pubkeys", [])
.then(pubKeys => {
this.#pubKeys = JSON.stringify(pubKeys);
this.#store();
})
- .catch(() => {
+ .catch(error => {
+ lazy.logger.debug("Failed to get pubkeys", error);
+ // Make the next call try again.
+ this.#pubKeyPromise = null;
// We always try to update, but if that doesn't work fall back to stored data
if (!this.#pubKeys) {
- throw new LoxError(LoxErrors.LoxServerUnreachable);
+ throw error;
}
});
}
@@ -269,10 +405,13 @@ class LoxImpl {
this.#encTable = JSON.stringify(encTable);
this.#store();
})
- .catch(() => {
+ .catch(error => {
+ lazy.logger.debug("Failed to get encTable", error);
+ // Make the next call try again.
+ this.#encTablePromise = null;
// Try to update first, but if that doesn't work fall back to stored data
if (!this.#encTable) {
- throw new LoxError(LoxErrors.LoxServerUnreachable);
+ throw error;
}
});
}
@@ -284,55 +423,96 @@ class LoxImpl {
// Try to update first, but if that doesn't work fall back to stored data
this.#constantsPromise = this.#makeRequest("constants", [])
.then(constants => {
+ const prevValue = this.#constants;
this.#constants = JSON.stringify(constants);
this.#store();
+ if (prevValue !== this.#constants) {
+ Services.obs.notifyObservers(null, LoxTopics.UpdateNextUnlock);
+ }
})
- .catch(() => {
+ .catch(error => {
+ lazy.logger.debug("Failed to get constants", error);
+ // Make the next call try again.
+ this.#constantsPromise = null;
if (!this.#constants) {
- throw new LoxError(LoxErrors.LoxServerUnreachable);
+ throw error;
}
});
}
await this.#constantsPromise;
}
+ /**
+ * Parse a decimal string to a non-negative integer.
+ *
+ * @param {string} str - The string to parse.
+ * @returns {integer} - The integer.
+ */
+ static #parseNonNegativeInteger(str) {
+ if (typeof str !== "string" || !/^[0-9]+$/.test(str)) {
+ throw new LoxError(`Expected a non-negative decimal integer: "${str}"`);
+ }
+ return parseInt(str, 10);
+ }
+
+ /**
+ * Get the current lox trust level.
+ *
+ * @param {string} loxId - The ID to fetch the level for.
+ * @returns {integer} - The trust level.
+ */
+ #getLevel(loxId) {
+ return LoxImpl.#parseNonNegativeInteger(
+ lazy.get_trust_level(this.#getCredentials(loxId))
+ );
+ }
+
/**
* Check for blockages and attempt to perform a levelup
*
* If either blockages or a levelup happened, add an event to the event queue
*/
async #backgroundTasks() {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
+ this.#assertInitialized();
+ let addedEvent = false;
+ // Only run background tasks for the active lox ID.
+ const loxId = this.#activeLoxId;
+ if (!loxId) {
+ lazy.logger.warn("No loxId for the background task");
+ return;
}
- const loxid = lazy.TorSettings.bridges.lox_id;
try {
- const levelup = await this.#attemptUpgrade(loxid);
+ const levelup = await this.#attemptUpgrade(loxId);
if (levelup) {
- const level = lazy.get_trust_level(this.#credentials[loxid]);
+ const level = this.#getLevel(loxId);
const newEvent = {
type: "levelup",
newlevel: level,
};
this.#events.push(newEvent);
this.#store();
+ addedEvent = true;
}
} catch (err) {
- console.log(err);
+ lazy.logger.error(err);
}
try {
- const leveldown = await this.#blockageMigration(loxid);
+ const leveldown = await this.#blockageMigration(loxId);
if (leveldown) {
- let level = lazy.get_trust_level(this.#credentials[loxid]);
+ let level = this.#getLevel(loxId);
const newEvent = {
type: "blockage",
newlevel: level,
};
this.#events.push(newEvent);
this.#store();
+ addedEvent = true;
}
} catch (err) {
- console.log(err);
+ lazy.logger.error(err);
+ }
+ if (addedEvent) {
+ Services.obs.notifyObservers(null, LoxTopics.UpdateEvents);
}
}
@@ -356,10 +536,8 @@ class LoxImpl {
await lazy.init(this.#window);
lazy.set_panic_hook();
if (typeof lazy.open_invite !== "function") {
- throw new LoxError(LoxErrors.InitError);
+ throw new LoxError("Initialization failed");
}
- this.#invites = [];
- this.#events = [];
this.#load();
this.#initialized = true;
}
@@ -376,14 +554,14 @@ class LoxImpl {
}
this.#initialized = false;
this.#window = null;
- this.#invites = null;
+ this.#invites = [];
this.#pubKeys = null;
this.#encTable = null;
this.#constants = null;
this.#pubKeyPromise = null;
this.#encTablePromise = null;
this.#constantsPromise = null;
- this.#credentials = null;
+ this.#credentials = {};
this.#events = [];
if (this.#backgroundInterval) {
clearInterval(this.#backgroundInterval);
@@ -398,13 +576,11 @@ class LoxImpl {
* @returns {bool} Whether the value passed in was a Lox invitation.
*/
validateInvitation(invite) {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
+ this.#assertInitialized();
try {
lazy.invitation_is_trusted(invite);
} catch (err) {
- console.log(err);
+ lazy.logger.error(err);
return false;
}
return true;
@@ -413,11 +589,9 @@ class LoxImpl {
// Note: This is only here for testing purposes. We're going to be using telegram
// to issue open invitations for Lox bridges.
async requestOpenInvite() {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
+ this.#assertInitialized();
let invite = await this.#makeRequest("invite", []);
- console.log(invite);
+ lazy.logger.debug(invite);
return invite;
}
@@ -425,36 +599,37 @@ class LoxImpl {
* Redeems a Lox invitation to obtain a credential and bridges.
*
* @param {string} invite A Lox invitation.
- * @returns {string} The loxid of the associated credential on success.
+ * @returns {string} The loxId of the associated credential on success.
*/
async redeemInvite(invite) {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
+ this.#assertInitialized();
await this.#getPubKeys();
let request = await lazy.open_invite(JSON.parse(invite).invite);
- let id = this.#genLoxId();
- let response;
- try {
- response = await this.#makeRequest(
- "openreq",
- JSON.parse(request).request
- );
- } catch {
- throw new LoxError(LoxErrors.LoxServerUnreachable);
- }
- console.log("openreq response: ", response);
+ let response = await this.#makeRequest(
+ "openreq",
+ JSON.parse(request).request
+ );
+ lazy.logger.debug("openreq response: ", response);
if (response.hasOwnProperty("error")) {
- throw new LoxError(LoxErrors.BadInvite);
+ throw new LoxError(
+ `Error response to "openreq": ${response.error}`,
+ LoxError.BadInvite
+ );
}
let cred = lazy.handle_new_lox_credential(
request,
JSON.stringify(response),
this.#pubKeys
);
- this.#credentials[id] = cred;
+ // Generate an id that is not already in the #credentials map.
+ let loxId;
+ do {
+ loxId = this.#genLoxId();
+ } while (Object.hasOwn(this.#credentials, loxId));
+ // Set new credentials.
+ this.#credentials[loxId] = cred;
this.#store();
- return id;
+ return loxId;
}
/**
@@ -463,10 +638,9 @@ class LoxImpl {
* @returns {string[]} A list of all historical invites.
*/
getInvites() {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
- return this.#invites;
+ this.#assertInitialized();
+ // Return a copy.
+ return structuredClone(this.#invites);
}
/**
@@ -477,212 +651,191 @@ class LoxImpl {
* - there is no saved Lox credential, or
* - the saved credential does not have any invitations available.
*
+ * @param {string} loxId - The ID to generate an invite for.
* @returns {string} A valid Lox invitation.
*/
- async generateInvite() {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
- const loxid = lazy.TorSettings.bridges.lox_id;
- if (!loxid || !this.#credentials[loxid]) {
- throw new LoxError(LoxErrors.MissingCredential);
- }
+ async generateInvite(loxId) {
+ this.#assertInitialized();
await this.#getPubKeys();
await this.#getEncTable();
- let level = lazy.get_trust_level(this.#credentials[loxid]);
+ let level = this.#getLevel(loxId);
if (level < 1) {
- throw new LoxError(LoxErrors.NoInvitations);
+ throw new LoxError(`Cannot generate invites at level ${level}`);
}
let request = lazy.issue_invite(
- JSON.stringify(this.#credentials[loxid]),
+ JSON.stringify(this.#getCredentials(loxId)),
this.#encTable,
this.#pubKeys
);
- let response;
- try {
- response = await this.#makeRequest(
- "issueinvite",
- JSON.parse(request).request
- );
- } catch {
- throw new LoxError(LoxErrors.LoxServerUnreachable);
- }
+ let response = await this.#makeRequest(
+ "issueinvite",
+ JSON.parse(request).request
+ );
if (response.hasOwnProperty("error")) {
- console.log(response.error);
- throw new LoxError(LoxErrors.NoInvitations);
+ lazy.logger.error(response.error);
+ throw new LoxError(`Error response to "issueinvite": ${response.error}`);
} else {
- this.#credentials[loxid] = response;
const invite = lazy.prepare_invite(response);
this.#invites.push(invite);
// cap length of stored invites
if (this.#invites.len > 50) {
this.#invites.shift();
}
- return invite;
+ this.#store();
+ this.#changeCredentials(loxId, response);
+ Services.obs.notifyObservers(null, LoxTopics.NewInvite);
+ // Return a copy.
+ // Right now invite is just a string, but that might change in the future.
+ return structuredClone(invite);
}
}
/**
* Get the number of invites that a user has remaining.
*
+ * @param {string} loxId - The ID to check.
* @returns {int} The number of invites that can still be generated by a
* user's credential.
*/
- getRemainingInviteCount() {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
- const loxid = lazy.TorSettings.bridges.lox_id;
- if (!loxid || !this.#credentials[loxid]) {
- throw new LoxError(LoxErrors.MissingCredential);
- }
- return parseInt(lazy.get_invites_remaining(this.#credentials[loxid]));
+ getRemainingInviteCount(loxId) {
+ this.#assertInitialized();
+ return LoxImpl.#parseNonNegativeInteger(
+ lazy.get_invites_remaining(this.#getCredentials(loxId))
+ );
}
- async #blockageMigration(loxid) {
- if (!loxid || !this.#credentials[loxid]) {
- throw new LoxError(LoxErrors.MissingCredential);
- }
+ async #blockageMigration(loxId) {
await this.#getPubKeys();
let request;
try {
- request = lazy.check_blockage(this.#credentials[loxid], this.#pubKeys);
+ request = lazy.check_blockage(this.#getCredentials(loxId), this.#pubKeys);
} catch {
- console.log("Not ready for blockage migration");
+ lazy.logger.log("Not ready for blockage migration");
return false;
}
let response = await this.#makeRequest("checkblockage", request);
if (response.hasOwnProperty("error")) {
- console.log(response.error);
- throw new LoxError(LoxErrors.LoxServerUnreachable);
+ lazy.logger.error(response.error);
+ throw new LoxError(
+ `Error response to "checkblockage": ${response.error}`
+ );
}
const migrationCred = lazy.handle_check_blockage(
- this.#credentials[loxid],
+ this.#getCredentials(loxId),
JSON.stringify(response)
);
request = lazy.blockage_migration(
- this.#credentials[loxid],
+ this.#getCredentials(loxId),
migrationCred,
this.#pubKeys
);
response = await this.#makeRequest("blockagemigration", request);
if (response.hasOwnProperty("error")) {
- console.log(response.error);
- throw new LoxError(LoxErrors.LoxServerUnreachable);
+ lazy.logger.error(response.error);
+ throw new LoxError(
+ `Error response to "blockagemigration": ${response.error}`
+ );
}
const cred = lazy.handle_blockage_migration(
- this.#credentials[loxid],
+ this.#getCredentials(loxId),
JSON.stringify(response),
this.#pubKeys
);
- this.#credentials[loxid] = cred;
- this.#store();
+ this.#changeCredentials(loxId, cred);
return true;
}
/** Attempts to upgrade the currently saved Lox credential.
* If an upgrade is available, save an event in the event list.
*
- * @returns {boolean} whether a levelup event occured
+ * @returns {boolean} Whether a levelup event occurred.
*/
- async #attemptUpgrade(loxid) {
- if (!loxid || !this.#credentials[loxid]) {
- throw new LoxError(LoxErrors.MissingCredential);
- }
+ async #attemptUpgrade(loxId) {
await this.#getPubKeys();
await this.#getEncTable();
await this.#getConstants();
- let success = false;
- let level = lazy.get_trust_level(this.#credentials[loxid]);
+ let level = this.#getLevel(loxId);
if (level < 1) {
// attempt trust promotion instead
- try {
- success = await this.#trustMigration();
- } catch (err) {
- console.log(err);
- return false;
- }
- } else {
- let request = lazy.level_up(
- this.#credentials[loxid],
- this.#encTable,
- this.#pubKeys
- );
- const response = await this.#makeRequest("levelup", request);
- if (response.hasOwnProperty("error")) {
- console.log(response.error);
- throw new LoxError(LoxErrors.LoxServerUnreachable);
- }
- const cred = lazy.handle_level_up(
- request,
- JSON.stringify(response),
- this.#pubKeys
- );
- this.#credentials[loxid] = cred;
- return true;
+ return this.#trustMigration(loxId);
+ }
+ let request = lazy.level_up(
+ this.#getCredentials(loxId),
+ this.#encTable,
+ this.#pubKeys
+ );
+ const response = await this.#makeRequest("levelup", request);
+ if (response.hasOwnProperty("error")) {
+ lazy.logger.error(response.error);
+ throw new LoxError(`Error response to "levelup": ${response.error}`);
}
- return success;
+ const cred = lazy.handle_level_up(
+ request,
+ JSON.stringify(response),
+ this.#pubKeys
+ );
+ this.#changeCredentials(loxId, cred);
+ return true;
}
/**
* Attempt to migrate from an untrusted to a trusted Lox credential
*
- * @returns {Promise<bool>} A bool value indicated whether the credential
- * was successfully migrated.
+ * @param {string} loxId - The ID to use.
+ * @returns {boolean} Whether the credential was successfully migrated.
*/
- async #trustMigration() {
- const loxid = lazy.TorSettings.bridges.lox_id;
- if (!loxid || !this.#credentials[loxid]) {
- throw new LoxError(LoxErrors.MissingCredential);
- }
+ async #trustMigration(loxId) {
await this.#getPubKeys();
return new Promise((resolve, reject) => {
let request = "";
try {
- request = lazy.trust_promotion(this.#credentials[loxid], this.#pubKeys);
+ request = lazy.trust_promotion(
+ this.#getCredentials(loxId),
+ this.#pubKeys
+ );
} catch (err) {
- console.log("Not ready to upgrade");
+ lazy.logger.debug("Not ready to upgrade");
resolve(false);
}
this.#makeRequest("trustpromo", JSON.parse(request).request)
.then(response => {
if (response.hasOwnProperty("error")) {
+ lazy.logger.error("Error response from trustpromo", response.error);
resolve(false);
}
- console.log("Got promotion cred");
- console.log(response);
- console.log(request);
+ lazy.logger.debug("Got promotion cred", response, request);
let promoCred = lazy.handle_trust_promotion(
request,
JSON.stringify(response)
);
- console.log("Formatted promotion cred");
+ lazy.logger.debug("Formatted promotion cred");
request = lazy.trust_migration(
- this.#credentials[loxid],
+ this.#getCredentials(loxId),
promoCred,
this.#pubKeys
);
- console.log("Formatted migration request");
+ lazy.logger.debug("Formatted migration request");
this.#makeRequest("trustmig", JSON.parse(request).request)
.then(response => {
if (response.hasOwnProperty("error")) {
+ lazy.logger.error(
+ "Error response from trustmig",
+ response.error
+ );
resolve(false);
}
- console.log("Got new credential");
+ lazy.logger.debug("Got new credential");
let cred = lazy.handle_trust_migration(request, response);
- this.#credentials[loxid] = cred;
- this.#store();
+ this.#changeCredentials(loxId, cred);
resolve(true);
})
.catch(err => {
- console.log(err);
- console.log("Failed trust migration");
+ lazy.logger.error("Failed trust migration", err);
resolve(false);
});
})
.catch(err => {
- console.log(err);
- console.log("Failed trust promotion");
+ lazy.logger.error("Failed trust promotion", err);
resolve(false);
});
});
@@ -701,88 +854,105 @@ class LoxImpl {
/**
* Get a list of accumulated events.
*
+ * @param {string} loxId - The ID to get events for.
* @returns {EventData[]} A list of the accumulated, unacknowledged events
* associated with a user's credential.
*/
- getEventData() {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
- const loxid = lazy.TorSettings.bridges.lox_id;
- if (!loxid || !this.#credentials[loxid]) {
- throw new LoxError(LoxErrors.MissingCredential);
+ getEventData(loxId) {
+ this.#assertInitialized();
+ if (loxId !== this.#activeLoxId) {
+ lazy.logger.warn(
+ `No event data for loxId ${loxId} since it was replaced by ${
+ this.#activeLoxId
+ }`
+ );
+ return [];
}
- return this.#events;
+ // Return a copy.
+ return structuredClone(this.#events);
}
/**
* Clears accumulated event data.
+ *
+ * Should be called whenever the user acknowledges the existing events.
+ *
+ * @param {string} loxId - The ID to clear events for.
*/
- clearEventData() {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
+ clearEventData(loxId) {
+ this.#assertInitialized();
+ if (loxId !== this.#activeLoxId) {
+ lazy.logger.warn(
+ `Not clearing event data for loxId ${loxId} since it was replaced by ${
+ this.#activeLoxId
+ }`
+ );
+ return;
}
this.#events = [];
this.#store();
- }
-
- /**
- * Clears accumulated invitations.
- */
- clearInvites() {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
- this.#invites = [];
- this.#store();
+ Services.obs.notifyObservers(null, LoxTopics.UpdateEvents);
}
/**
* @typedef {object} UnlockData
*
- * @property {string} date - The date-time for the next level up, formatted as YYYY-MM-DDTHH:mm:ssZ.
- * @property {integer} nextLevel - The next level. Levels count from 0, so this will be 1 or greater.
- *
+ * @property {string} date - The date-time for the next level up, formatted as
+ * YYYY-MM-DDTHH:mm:ssZ.
+ * @property {integer} nextLevel - The next level. Levels count from 0, so
+ * this will be 1 or greater.
*/
/**
* Get details about the next feature unlock.
*
+ * NOTE: A call to this method may trigger LoxTopics.UpdateNextUnlock.
+ *
+ * @param {string} loxId - The ID to get the unlock for.
* @returns {UnlockData} - Details about the next unlock.
*/
- async getNextUnlock() {
- if (!this.#initialized) {
- throw new LoxError(LoxErrors.NotInitialized);
- }
- const loxid = lazy.TorSettings.bridges.lox_id;
- if (!loxid || !this.#credentials[loxid]) {
- throw new LoxError(LoxErrors.MissingCredential);
- }
+ async getNextUnlock(loxId) {
+ this.#assertInitialized();
await this.#getConstants();
- let nextUnlocks = JSON.parse(
- lazy.get_next_unlock(this.#constants, this.#credentials[loxid])
+ let nextUnlock = JSON.parse(
+ lazy.get_next_unlock(this.#constants, this.#getCredentials(loxId))
);
- const level = parseInt(lazy.get_trust_level(this.#credentials[loxid]));
- const unlocks = {
- date: nextUnlocks.trust_level_unlock_date,
+ const level = this.#getLevel(loxId);
+ return {
+ date: nextUnlock.trust_level_unlock_date,
nextLevel: level + 1,
};
- return unlocks;
}
async #makeRequest(procedure, args) {
// TODO: Customize to for Lox
- const serviceUrl = "https://rdsys-frontend-01.torproject.org/lox";
+ const serviceUrl = "https://lox.torproject.org";
const url = `${serviceUrl}/${procedure}`;
if (lazy.TorConnect.state === lazy.TorConnectState.Bootstrapped) {
- const request = await fetch(url, {
- method: "POST",
- headers: {
- "Content-Type": "application/vnd.api+json",
- },
- body: JSON.stringify(args),
- });
+ let request;
+ try {
+ request = await fetch(url, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/vnd.api+json",
+ },
+ body: JSON.stringify(args),
+ });
+ } catch (error) {
+ lazy.logger.debug("fetch fail", url, args, error);
+ throw new LoxError(
+ `fetch "${procedure}" from Lox authority failed: ${error?.message}`,
+ LoxError.LoxServerUnreachable
+ );
+ }
+ if (!request.ok) {
+ lazy.logger.debug("fetch response", url, args, request);
+ // Do not treat as a LoxServerUnreachable type.
+ throw new LoxError(
+ `Lox authority responded to "${procedure}" with ${request.status}: ${request.statusText}`
+ );
+ }
return request.json();
}
@@ -803,7 +973,26 @@ class LoxImpl {
});
}
const builder = await this.#domainFrontedRequests;
- return builder.buildPostRequest(url, args);
+ try {
+ return await builder.buildPostRequest(url, args);
+ } catch (error) {
+ lazy.logger.debug("Domain front request fail", url, args, error);
+ if (error instanceof lazy.DomainFrontRequestNetworkError) {
+ throw new LoxError(
+ `Domain front fetch "${procedure}" from Lox authority failed: ${error?.message}`,
+ LoxError.LoxServerUnreachable
+ );
+ }
+ if (error instanceof lazy.DomainFrontRequestResponseError) {
+ // Do not treat as a LoxServerUnreachable type.
+ throw new LoxError(
+ `Lox authority responded to domain front "${procedure}" with ${error.status}: ${error.statusText}`
+ );
+ }
+ throw new LoxError(
+ `Domain front request for "${procedure}" from Lox authority failed: ${error?.message}`
+ );
+ }
}
}
=====================================
toolkit/components/tor-launcher/TorLauncherUtil.sys.mjs
=====================================
@@ -429,20 +429,6 @@ export const TorLauncherUtil = Object.freeze({
return aStringName;
},
- getLocalizedStringForError(aNSResult) {
- for (let prop in Cr) {
- if (Cr[prop] === aNSResult) {
- const key = "nsresult." + prop;
- const rv = this.getLocalizedString(key);
- if (rv !== key) {
- return rv;
- }
- return prop; // As a fallback, return the NS_ERROR... name.
- }
- }
- return undefined;
- },
-
getLocalizedBootstrapStatus(aStatusObj, aKeyword) {
if (!aStatusObj || !aKeyword) {
return "";
=====================================
toolkit/modules/DomainFrontedRequests.sys.mjs
=====================================
@@ -347,6 +347,31 @@ class MeekTransportAndroid {
}
}
+/**
+ * Corresponds to a Network error with the request.
+ */
+export class DomainFrontRequestNetworkError extends Error {
+ constructor(request, statusCode) {
+ super(`Error fetching ${request.name}: ${statusCode}`);
+ this.name = "DomainFrontRequestNetworkError";
+ this.statusCode = statusCode;
+ }
+}
+
+/**
+ * Corresponds to a non-ok response from the server.
+ */
+export class DomainFrontRequestResponseError extends Error {
+ constructor(request) {
+ super(
+ `Error response from ${request.name} server: ${request.responseStatus}`
+ );
+ this.name = "DomainFrontRequestResponseError";
+ this.status = request.responseStatus;
+ this.statusText = request.responseStatusText;
+ }
+}
+
/**
* Callback object to promisify the XPCOM request.
*/
@@ -379,12 +404,11 @@ class ResponseListener {
onStopRequest(request, status) {
try {
if (!Components.isSuccessCode(status)) {
- const errorMessage =
- lazy.TorLauncherUtil.getLocalizedStringForError(status);
- this.#reject(new Error(errorMessage));
+ // Assume this is a network error.
+ this.#reject(new DomainFrontRequestNetworkError(request, status));
}
if (request.responseStatus !== 200) {
- this.#reject(new Error(request.responseStatusText));
+ this.#reject(new DomainFrontRequestResponseError(request));
}
} catch (err) {
this.#reject(err);
=====================================
toolkit/modules/TorSettings.sys.mjs
=====================================
@@ -7,6 +7,7 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
TorLauncherUtil: "resource://gre/modules/TorLauncherUtil.sys.mjs",
Lox: "resource://gre/modules/Lox.sys.mjs",
+ LoxTopics: "resource://gre/modules/Lox.sys.mjs",
TorParsers: "resource://gre/modules/TorParsers.sys.mjs",
TorProviderBuilder: "resource://gre/modules/TorProviderBuilder.sys.mjs",
});
@@ -330,7 +331,17 @@ class TorSettingsImpl {
if (!val) {
return;
}
- this.bridges.bridge_strings = lazy.Lox.getBridges(val);
+ let bridgeStrings;
+ try {
+ bridgeStrings = lazy.Lox.getBridges(val);
+ } catch (error) {
+ addError(`No bridges for lox_id ${val}: ${error?.message}`);
+ // Set as invalid, which will make the builtin_type "" and set the
+ // bridge_strings to be empty at the next #cleanupSettings.
+ this.bridges.source = TorBridgeSource.Invalid;
+ return;
+ }
+ this.bridges.bridge_strings = bridgeStrings;
},
},
});
@@ -692,7 +703,7 @@ class TorSettingsImpl {
try {
await lazy.Lox.init();
} catch (e) {
- lazy.logger.error("Could not initialize Lox.", e.type);
+ lazy.logger.error("Could not initialize Lox.", e);
}
if (
@@ -711,6 +722,8 @@ class TorSettingsImpl {
}
}
+ Services.obs.addObserver(this, lazy.LoxTopics.UpdateBridges);
+
lazy.logger.info("Ready");
}
@@ -718,9 +731,28 @@ class TorSettingsImpl {
* Unload or uninit our settings.
*/
async uninit() {
+ Services.obs.removeObserver(this, lazy.LoxTopics.UpdateBridges);
await lazy.Lox.uninit();
}
+ observe(subject, topic, data) {
+ switch (topic) {
+ case lazy.LoxTopics.UpdateBridges:
+ if (this.bridges.lox_id) {
+ // Fetch the newest bridges.
+ this.bridges.bridge_strings = lazy.Lox.getBridges(
+ this.bridges.lox_id
+ );
+ // No need to save to prefs since bridge_strings is not stored for Lox
+ // source. But we do pass on the changes to TorProvider.
+ // FIXME: This can compete with TorConnect to reach TorProvider.
+ // tor-browser#42316
+ this.applySettings();
+ }
+ break;
+ }
+ }
+
/**
* Check whether the object has been successfully initialized, and throw if
* it has not.
@@ -763,24 +795,32 @@ class TorSettingsImpl {
TorSettingsPrefs.bridges.source,
TorBridgeSource.Invalid
);
- this.bridges.lox_id = Services.prefs.getStringPref(
- TorSettingsPrefs.bridges.lox_id,
- ""
- );
- if (this.bridges.source == TorBridgeSource.BuiltIn) {
- this.bridges.builtin_type = Services.prefs.getStringPref(
- TorSettingsPrefs.bridges.builtin_type,
- ""
- );
- } else {
- const bridgeBranchPrefs = Services.prefs
- .getBranch(TorSettingsPrefs.bridges.bridge_strings)
- .getChildList("");
- this.bridges.bridge_strings = Array.from(bridgeBranchPrefs, pref =>
- Services.prefs.getStringPref(
- `${TorSettingsPrefs.bridges.bridge_strings}${pref}`
- )
- );
+ switch (this.bridges.source) {
+ case TorBridgeSource.BridgeDB:
+ case TorBridgeSource.UserProvided:
+ this.bridges.bridge_strings = Services.prefs
+ .getBranch(TorSettingsPrefs.bridges.bridge_strings)
+ .getChildList("")
+ .map(pref =>
+ Services.prefs.getStringPref(
+ `${TorSettingsPrefs.bridges.bridge_strings}${pref}`
+ )
+ );
+ break;
+ case TorBridgeSource.BuiltIn:
+ // bridge_strings is set via builtin_type.
+ this.bridges.builtin_type = Services.prefs.getStringPref(
+ TorSettingsPrefs.bridges.builtin_type,
+ ""
+ );
+ break;
+ case TorBridgeSource.Lox:
+ // bridge_strings is set via lox id.
+ this.bridges.lox_id = Services.prefs.getStringPref(
+ TorSettingsPrefs.bridges.lox_id,
+ ""
+ );
+ break;
}
/* Proxy */
this.proxy.enabled = Services.prefs.getBoolPref(
@@ -866,7 +906,10 @@ class TorSettingsImpl {
);
});
// write new ones
- if (this.bridges.source !== TorBridgeSource.BuiltIn) {
+ if (
+ this.bridges.source !== TorBridgeSource.Lox &&
+ this.bridges.source !== TorBridgeSource.BuiltIn
+ ) {
this.bridges.bridge_strings.forEach((string, index) => {
Services.prefs.setStringPref(
`${TorSettingsPrefs.bridges.bridge_strings}.${index}`,
=====================================
toolkit/torbutton/chrome/locale/en-US/torlauncher.properties
=====================================
@@ -55,7 +55,3 @@ torlauncher.bootstrapWarning.timeout=connection timeout
torlauncher.bootstrapWarning.noroute=no route to host
torlauncher.bootstrapWarning.ioerror=read/write error
torlauncher.bootstrapWarning.pt_missing=missing pluggable transport
-
-torlauncher.nsresult.NS_ERROR_NET_RESET=The connection to the server was lost.
-torlauncher.nsresult.NS_ERROR_CONNECTION_REFUSED=Could not connect to the server.
-torlauncher.nsresult.NS_ERROR_PROXY_CONNECTION_REFUSED=Could not connect to the proxy.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/4255b3…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/4255b3…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/mullvad-browser] Pushed new tag mullvad-browser-115.10.0esr-13.0-1-build1
by Pier Angelo Vendrame (@pierov) 08 Apr '24
by Pier Angelo Vendrame (@pierov) 08 Apr '24
08 Apr '24
Pier Angelo Vendrame pushed new tag mullvad-browser-115.10.0esr-13.0-1-build1 at The Tor Project / Applications / Mullvad Browser
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/tree/mullv…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/mullvad-browser][mullvad-browser-115.10.0esr-13.0-1] 20 commits: MB 38: Mullvad Browser configuration
by richard (@richard) 08 Apr '24
by richard (@richard) 08 Apr '24
08 Apr '24
richard pushed to branch mullvad-browser-115.10.0esr-13.0-1 at The Tor Project / Applications / Mullvad Browser
Commits:
ab9a059e by Pier Angelo Vendrame at 2024-04-08T22:24:47+02:00
MB 38: Mullvad Browser configuration
- - - - -
3ea9f651 by Pier Angelo Vendrame at 2024-04-08T22:24:47+02:00
MB 1: Mullvad Browser branding
See also:
mullvad-browser#5: Product name and directory customization
mullvad-browser#12: Create new branding directories and integrate Mullvad icons+branding
mullvad-browser#14: Remove Default Built-in bookmarks
mullvad-browser#35: Add custom PDF icons for Windows builds
mullvad-browser#48: Replace Mozilla copyright and legal trademarks in mullvadbrowser.exe metadata
mullvad-browser#51: Update trademark string
mullvad-browser#104: Update shipped dll metadata copyright/licensing info
mullvad-browser#107: Add alpha and nightly icons
- - - - -
b2ac6bd8 by Pier Angelo Vendrame at 2024-04-08T22:24:47+02:00
MB 20: Allow packaged-addons in PBM.
We install a few addons from the distribution directory, but they are
not automatically enabled for PBM mode.
This commit modifies the code that installs them to also add the PBM
permission to the known ones.
- - - - -
c5b7f306 by Pier Angelo Vendrame at 2024-04-08T22:24:47+02:00
MB 63: Customize some about pages for Mullvad Browser
Also:
mullvad-browser#57: Purge unneeded about: pages
- - - - -
202a501a by Pier Angelo Vendrame at 2024-04-08T22:24:47+02:00
MB 37: Customization for the about dialog
- - - - -
60db32aa by Henry Wilkes at 2024-04-08T22:24:48+02:00
MB 39: Add home page about:mullvad-browser
- - - - -
1093b116 by Henry Wilkes at 2024-04-08T22:24:48+02:00
fixup! MB 39: Add home page about:mullvad-browser
Bug 271: Show update in about:mullvad-browser
- - - - -
de482aba by hackademix at 2024-04-08T22:24:48+02:00
MB 97: Remove UI cues to install new extensions.
- - - - -
37cdffef by hackademix at 2024-04-08T22:24:48+02:00
MB 47: uBlock Origin customization
- - - - -
246685ff by Pier Angelo Vendrame at 2024-04-08T22:24:49+02:00
MB 21: Disable the password manager
This commit disables the about:login page and removes the "Login and
Password" section of about:preferences.
We do not do anything to the real password manager of Firefox, that is
in toolkit: it contains C++ parts that make it difficult to actually
prevent it from being built..
Finally, we modify the the function that opens about:login to report an
error in the console so that we can quickly get a backtrace to the code
that tries to use it.
- - - - -
3226e13f by Pier Angelo Vendrame at 2024-04-08T22:24:49+02:00
MB 87: Disable the default browser box on Windows and Linux
Windows and Linux will be distributed only as portable apps at the
beginning, so they should not be settable as default browsers.
We will need to improve the logic once we decide to ship system-wide
installers, too.
- - - - -
e58605be by Pier Angelo Vendrame at 2024-04-08T22:24:49+02:00
MB 112: Updater customization for Mullvad Browser
MB 71: Set the updater base URL to Mullvad domain
- - - - -
f9964a97 by Henry Wilkes at 2024-04-08T22:24:49+02:00
fixup! MB 112: Updater customization for Mullvad Browser
Bug 271: Do not open update override page in a new tab, and show in
about:mullvad-browser instead.
- - - - -
b99eb01d by Nicolas Vigier at 2024-04-08T22:24:49+02:00
MB 79: Add Mullvad Browser MAR signing keys
MB 256: Add mullvad-browser nightly mar signing key
- - - - -
7fdc26ef by Pier Angelo Vendrame at 2024-04-08T22:24:50+02:00
MB 34: Hide unsafe and unwanted preferences UI
about:preferences allow to override some of our defaults, that could
be fingeprintable or have some other unwanted consequences.
- - - - -
b7661568 by Pier Angelo Vendrame at 2024-04-08T22:24:50+02:00
MB 160: Disable the cookie exceptions button
Besides disabling the "Delete on close checkbox", disable also the
"Manage Exceptions" button when always using PBM.
- - - - -
0184e75e by hackademix at 2024-04-08T22:24:50+02:00
MB 163: prevent uBlock Origin from being uninstalled/disabled
- - - - -
7a95efda by Richard Pospesel at 2024-04-08T22:24:50+02:00
MB 188: Customize Gitlab Issue and Merge templates
- - - - -
3b8315c9 by rui hildt at 2024-04-08T22:24:50+02:00
MB 213: Customize the search engines list
- - - - -
430baa35 by hackademix at 2024-04-08T22:24:51+02:00
MB 214: Enable cross-tab identity leak protection in "quiet" mode
- - - - -
30 changed files:
- + .gitlab/issue_templates/Rebase Browser - Alpha.md
- + .gitlab/issue_templates/Rebase Browser - Stable.md
- .gitlab/merge_request_templates/default.md
- browser/app/Makefile.in
- browser/app/macbuild/Contents/Info.plist.in
- browser/app/module.ver
- browser/app/firefox.exe.manifest → browser/app/mullvadbrowser.exe.manifest
- + browser/app/profile/000-mullvad-browser.js
- browser/app/profile/001-base-profile.js
- browser/base/content/aboutDialog.xhtml
- browser/base/content/appmenu-viewcache.inc.xhtml
- browser/base/content/browser-menubar.inc
- browser/base/content/browser-places.js
- browser/base/content/browser.js
- browser/base/content/default-bookmarks.html
- browser/base/content/nsContextMenu.js
- browser/base/content/overrides/app-license.html
- browser/base/content/pageinfo/pageInfo.xhtml
- browser/base/content/utilityOverlay.js
- browser/branding/branding-common.mozbuild
- + browser/branding/mb-alpha/VisualElements_150.png
- + browser/branding/mb-alpha/VisualElements_70.png
- + browser/branding/mb-alpha/configure.sh
- + browser/branding/mb-alpha/content/about-logo.png
- + browser/branding/mb-alpha/content/about-logo.svg
- + browser/branding/mb-alpha/content/about-logo(a)2x.png
- + browser/branding/mb-alpha/content/about-wordmark.svg
- + browser/branding/mb-alpha/content/about.png
- + browser/branding/mb-alpha/content/aboutDialog.css
- + browser/branding/mb-alpha/content/firefox-wordmark.svg
The diff was not included because it is too large.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/9c…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/9c…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/mullvad-browser][mullvad-browser-115.10.0esr-13.0-1] 108 commits: Bug 1819160 - Map Android ids to doc/accessible id pairs. r=Jamie
by Pier Angelo Vendrame (@pierov) 08 Apr '24
by Pier Angelo Vendrame (@pierov) 08 Apr '24
08 Apr '24
Pier Angelo Vendrame pushed to branch mullvad-browser-115.10.0esr-13.0-1 at The Tor Project / Applications / Mullvad Browser
Commits:
725e506a by Eitan Isaacson at 2024-04-08T19:34:03+02:00
Bug 1819160 - Map Android ids to doc/accessible id pairs. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D179737
- - - - -
f08de1b1 by Pier Angelo Vendrame at 2024-04-08T19:34:03+02:00
Bug 1832523 - Allow using NSS to sign and verify MAR signatures. r=application-update-reviewers,glandium,bytesized
Allow using NSS for checking MAR signatures also in platforms where
OS-native APIs are used by default, i.e., macOS and Windows.
Differential Revision: https://phabricator.services.mozilla.com/D177743
- - - - -
a3172cb1 by Pier Angelo Vendrame at 2024-04-08T19:34:03+02:00
Bug 1849129: Prevent exceptions caused by extensions from interrupting the SearchService initialization. r=search-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D186456
- - - - -
c0294c8d by Emilio Cobos Álvarez at 2024-04-08T19:34:04+02:00
Bug 1853731 - Use html:img for message-bar-icon. r=Gijs,dao,settings-reviewers,desktop-theme-reviewers,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D188521
- - - - -
36300a0b by Pier Angelo Vendrame at 2024-04-08T19:34:04+02:00
Bug 1854117 - Sort the DLL blocklist flags. r=mossop,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D188716
- - - - -
ef0c31df by Eden Chuang at 2024-04-08T19:34:04+02:00
Bug 1738426 - Ignoring status 206 and vary header checking for opaque response in Cache API. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D186431
- - - - -
dcfc380f by edgul at 2024-04-08T19:34:04+02:00
Bug 1802057 - Block the following characters from use in the cookie name in the cookie string: 0x3B (semi-colon), 0x3D (equals), and 0x7F (del) r=dveditz,cookie-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D182373
- - - - -
2df76bab by Kelsey Gilbert at 2024-04-08T19:34:05+02:00
Bug 1819497 - Don't race on static bool for initialization. r=gfx-reviewers,aosmond
We could do non-racy static init here (e.g. with a static initializer
self-calling-closure), but there doesn't seem to be a strong reason for
this. Let's just use a switch and get robustness from -Werror=switch.
Differential Revision: https://phabricator.services.mozilla.com/D188054
- - - - -
5c28a706 by Mark Banner at 2024-04-08T19:34:05+02:00
Bug 1845752. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D186676
- - - - -
14e36bbe by Bob Owen at 2024-04-08T19:34:05+02:00
Bug 1850072: Initialize RecordedDrawTargetCreation::mHasExistingData. r=jrmuizel
This also specializes ElementStreamFormat for bool.
Differential Revision: https://phabricator.services.mozilla.com/D187794
- - - - -
08d77150 by Malte Juergens at 2024-04-08T19:34:05+02:00
Bug 1850200 - Add delay to HTTPS-Only "Continue to HTTPS Site" button r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D187887
- - - - -
dc36198c by Andreas Pehrson at 2024-04-08T19:34:05+02:00
Bug 1851803 - Introduce SourceMediaTrack::mDirectDisabledMode. r=karlt
Similar to MediaTrack::mDisabledMode, but this is for uses on the
SourceMediaTrack producer thread. It is still signaled via a control message
from the control thread to maintain order of operations, and is protected by the
SourceMediaTrack mutex.
Differential Revision: https://phabricator.services.mozilla.com/D187554
- - - - -
d33bae3a by Pier Angelo Vendrame at 2024-04-08T19:34:06+02:00
Bug 1860020 - Remove the assertion on the value of toolkit.telemetry.enabled. r=KrisWright,chutten
Bug 1444275 introduced an assertion on the parent process to check that
the value of toolkit.telemetry.enabled is the expected one.
However, this expected value could be different from the one set and
locked e.g. in some forks. Therefore, the assertion prevented debug
builds from working in these cases.
Differential Revision: https://phabricator.services.mozilla.com/D195080
- - - - -
dd524e8c by Kagami Sascha Rosylight at 2024-04-08T19:34:06+02:00
Bug 1865238 - Use One UI Sans KR VF for Korean sans-serif font on Android r=jfkthame
Per /etc/fonts.xml, there are now only two `<family lang="ko">` nodes there:
* OneUISansKRVF series
* SECCJK series (but no KR postfix anymore?)
This patch uses One UI Sans KR VF as the replacement as this is newer and is a variable font (tested with https://codepen.io/SaschaNaz/pen/ExrdYXJ)
Differential Revision: https://phabricator.services.mozilla.com/D195078
- - - - -
029d5577 by Pier Angelo Vendrame at 2024-04-08T19:34:06+02:00
Bug 1875306 - Localize numbers in the underflow and overflow error messages. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D198965
- - - - -
f1f4c1d4 by Pier Angelo Vendrame at 2024-04-08T19:34:06+02:00
Bug 1875313 - Use en-US as a fallback when spoof English is enabled in ICUUtils. r=timhuang,tjr
Differential Revision: https://phabricator.services.mozilla.com/D198967
- - - - -
aa5e6ca0 by Pier Angelo Vendrame at 2024-04-08T19:34:06+02:00
Bug 1880988 - Apply spoof English to the default detail summary. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D202203
- - - - -
53c12e15 by Tom Ritter at 2024-04-08T19:34:07+02:00
Bug 1885258: Hidden fonts should obey the allow list r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D204571
- - - - -
446ba9db by Henry Wilkes at 2024-04-08T19:34:07+02:00
Bug 41454: Move focus after calling openPreferences for a sub-category.
Temporary fix until mozilla bug 1799153 gets a patch upstream.
- - - - -
67e959bf by hackademix at 2024-04-08T19:34:07+02:00
Bug 42194: Fix blank net error page on failed DNS resolution with active proxy.
- - - - -
52611d6a by Henry Wilkes at 2024-04-08T19:34:07+02:00
Bug 41483: Remove the firefox override for appstrings.properties
Remove this patch after upstream bugzilla bug 1790187
- - - - -
cff31be3 by Pier Angelo Vendrame at 2024-04-08T19:34:07+02:00
Bug 41116: Normalize system fonts.
System fonts are an enormous fingerprinting vector.
Even with font allow lists and with our custom configuration on Linux,
which counter metrics measurements, getComputedStyle leaks several
details.
This patch counters both these kinds of attacks.
- - - - -
afcd6a10 by Marco Simonelli at 2024-04-08T19:34:08+02:00
Bug 41459: WebRTC fails to build under mingw (Part 1)
- properly define NOMINMAX for just MSVC builds
- - - - -
56e9b923 by Marco Simonelli at 2024-04-08T19:34:08+02:00
Bug 41459: WebRTC fails to build under mingw (Part 2)
- fixes required to build third_party/libwebrtc
- - - - -
ad6e621c by Marco Simonelli at 2024-04-08T19:34:08+02:00
Bug 41459: WebRTC fails to build under mingw (Part 3)
- fixes required to build third_party/sipcc
- - - - -
e96dab77 by Marco Simonelli at 2024-04-08T19:34:08+02:00
Bug 41459: WebRTC fails to build under mingw (Part 4)
- fixes requried to build netwerk/sctp
- - - - -
ccbbbbeb by Marco Simonelli at 2024-04-08T19:34:08+02:00
Bug 41459: WebRTC fails to build under mingw (Part 5)
- fixes required to build dom/media/webrtc
- - - - -
2d49fc60 by Marco Simonelli at 2024-04-08T19:34:09+02:00
Bug 41459: WebRTC fails to build under mingw (Part 6)
- fixes required to build dom/media/systemservices
- - - - -
f95584fc by hackademix at 2024-04-08T19:34:09+02:00
Bug 41854: Allow overriding download spam protection.
- - - - -
bcf39f09 by Gaba at 2024-04-08T19:34:09+02:00
Adding issue and merge request templates
- - - - -
a43c809f by Pier Angelo Vendrame at 2024-04-08T19:34:09+02:00
Base Browser's .mozconfigs.
Bug 17858: Cannot create incremental MARs for hardened builds.
Define HOST_CFLAGS, etc. to avoid compiling programs such as mbsdiff
(which is part of mar-tools and is not distributed to end-users) with
ASan.
Bug 21849: Don't allow SSL key logging.
Bug 25741 - TBA: Disable features at compile-time
Define MOZ_ANDROID_NETWORK_STATE and MOZ_ANDROID_LOCATION
Bug 27623 - Export MOZILLA_OFFICIAL during desktop builds
This fixes a problem where some preferences had the wrong default value.
Also see bug 27472 where we made a similar fix for Android.
Bug 29859: Disable HLS support for now
Bug 30463: Explicitly disable MOZ_TELEMETRY_REPORTING
Bug 32493: Disable MOZ_SERVICES_HEALTHREPORT
Bug 33734: Set MOZ_NORMANDY to False
Bug 33851: Omit Parental Controls.
Bug 40252: Add --enable-rust-simd to our tor-browser mozconfig files
Bug 41584: Move some configuration options to base-browser level
- - - - -
f480a0a7 by Pier Angelo Vendrame at 2024-04-08T19:34:10+02:00
Tweaks to the build system
Bug 40857: Modified the fat .aar creation file
This is a workaround to build fat .aars with the compiling enviornment
disabled.
Mozilla does not use a similar configuration, but either runs a Firefox
build and discards its output, or uses artifacts build.
We might switch to artifact builds too, and drop this patch, or write a
better one to upstream. But until then we need this patch.
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1763770.
Bug 41458: Prevent `mach package-multi-locale` from actually creating a package
macOS builds need some files to be moved around with
./mach package-multi-locale to create multi-locale packages.
The required command isn't exposed through any other mach command.
So, we patch package-multi-locale both to prevent it from failing when
doing official builds and to detect any future changes on it.
- - - - -
e901b2e8 by Pier Angelo Vendrame at 2024-04-08T19:34:10+02:00
Bug 41108: Remove privileged macOS installation from 102
- - - - -
bdffa105 by Dan Ballard at 2024-04-08T19:34:10+02:00
Bug 41149: Re-enable DLL injection protection in all builds not just nightlies
- - - - -
8f12c48f by Matthew Finkel at 2024-04-08T19:34:10+02:00
Bug 24796: Comment out excess permissions from GeckoView
The GeckoView AndroidManifest.xml is not preprocessed unlike Fennec's
manifest, so we can't use the ifdef preprocessor guards around the
permissions we do not want. Commenting the permissions is the
next-best-thing.
- - - - -
992d272f by Matthew Finkel at 2024-04-08T19:34:10+02:00
Bug 28125: Prevent non-Necko network connections
- - - - -
ac1bbfa3 by Mike Perry at 2024-04-08T19:34:11+02:00
Bug 12974: Disable NTLM and Negotiate HTTP Auth
The Mozilla bugs: https://bugzilla.mozilla.org/show_bug.cgi?id=1046421,
https://bugzilla.mozilla.org/show_bug.cgi?id=1261591, tor-browser#27602
- - - - -
bc550b31 by Alex Catarineu at 2024-04-08T19:34:11+02:00
Bug 40166: Disable security.certerrors.mitm.auto_enable_enterprise_roots
Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1768899
- - - - -
c2e4dc38 by Georg Koppen at 2024-04-08T19:34:11+02:00
Bug 16285: Exclude ClearKey system for now
In the past the ClearKey system had not been compiled when specifying
--disable-eme. But that changed and it is even bundled nowadays (see:
Mozilla's bug 1300654). We don't want to ship it right now as the use
case for it is not really visible while the code had security
vulnerabilities in the past.
- - - - -
28c18e1e by Kathy Brade at 2024-04-08T19:34:11+02:00
Bug 21431: Clean-up system extensions shipped in Firefox
Only ship the pdfjs extension.
- - - - -
dd261b8e by Kathy Brade at 2024-04-08T19:34:11+02:00
Bug 33852: Clean up about:logins (LockWise) to avoid mentioning sync, etc.
Hide elements on about:logins that mention sync, "Firefox LockWise", and
Mozilla's LockWise mobile apps.
Disable the "Create New Login" button when security.nocertdb is true.
- - - - -
1df66507 by Alex Catarineu at 2024-04-08T19:34:12+02:00
Bug 41457: Remove Mozilla permissions
Bug 40025: Remove Mozilla add-on install permissions
- - - - -
d9e8c2e9 by Kathy Brade at 2024-04-08T19:34:12+02:00
Bug 40002: Remove about:ion
Firefox Ion (previously Firefox Pioneer) is an opt-in program in which people
volunteer to participate in studies that collect detailed, sensitive data about
how they use their browser.
Bug 41662: Disable about:sync-logs
Even though we disable sync by default with
`identity.fxaccounts.enabled`, this about: page is still avilable.
We could throw an exception on the constructor of the related
component, but it would result only in an error in the console, without
a visible "this address does not look right" error page.
If we fix the issues with MOZ_SERVICES_SYNC, we can restore the
component.
- - - - -
ce3343ac by Arthur Edelstein at 2024-04-08T19:34:12+02:00
Bug 26353: Prevent speculative connect that violated FPI.
Connections were observed in the catch-all circuit when
the user entered an https or http URL in the URL bar, or
typed a search term.
- - - - -
ea817fc9 by Alex Catarineu at 2024-04-08T19:34:12+02:00
Bug 31740: Remove some unnecessary RemoteSettings instances
More concretely, SearchService.jsm 'hijack-blocklists' and
url-classifier-skip-urls.
Avoid creating instance for 'anti-tracking-url-decoration'.
If prefs are disabling their usage, avoid creating instances for
'cert-revocations' and 'intermediates'.
Do not ship JSON dumps for collections we do not expect to need. For
the ones in the 'main' bucket, this prevents them from being synced
unnecessarily (the code in remote-settings does so for collections
in the main bucket for which a dump or local data exists). For the
collections in the other buckets, we just save some size by not
shipping their dumps.
We also clear the collections database on the v2 -> v3 migration.
- - - - -
969dcb9c by cypherpunks1 at 2024-04-08T19:34:12+02:00
Bug 41092: Add a RemoteSettings JSON dump for query-stripping
- - - - -
93342874 by Pier Angelo Vendrame at 2024-04-08T19:34:13+02:00
Bug 41635: Disable the Normandy component
Do not include Normandy at all whenever MOZ_NORMANDY is False.
- - - - -
dc37fecc by Georg Koppen at 2024-04-08T19:34:13+02:00
Bug 30541: Disable WebGL readPixel() for web content
Related Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1428034
- - - - -
6e3e5057 by Alex Catarineu at 2024-04-08T19:34:13+02:00
Bug 28369: Stop shipping pingsender executable
- - - - -
18aba92a by cypherpunks1 at 2024-04-08T19:34:13+02:00
Bug 41568: Disable LaterRun
- - - - -
54389046 by cypherpunks1 at 2024-04-08T19:34:14+02:00
Bug 40717: Hide Windows SSO in settings
- - - - -
cde48fd0 by Pier Angelo Vendrame at 2024-04-08T19:34:14+02:00
Bug 41599: Always return an empty string as network ID
Firefox computes an internal network ID used to detect network changes
and act consequently (e.g., to improve WebSocket UX).
However, there are a few ways to get this internal network ID, so we
patch them out, to be sure any new code will not be able to use them and
possibly link users.
We also sent a patch to Mozilla to seed the internal network ID, to
prevent any accidental leak in the future.
Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=1817756
- - - - -
a67536f8 by cypherpunks1 at 2024-04-08T19:34:14+02:00
Bug 40175: Add origin attributes to about:reader top-level requests
- - - - -
b5b235a9 by Richard Pospesel at 2024-04-08T19:34:14+02:00
Bug 41327: Disable UrlbarProviderInterventions
- - - - -
81e11adf by Richard Pospesel at 2024-04-08T19:34:14+02:00
Bug 42037: Disable about:firefoxview page
- - - - -
82ca0c8c by Mike Perry at 2024-04-08T19:34:15+02:00
Firefox preference overrides.
This hack directly includes our preference changes in omni.ja.
Bug 18292: Staged updates fail on Windows
Temporarily disable staged updates on Windows.
Bug 18297: Use separate Noto JP,KR,SC,TC fonts
Bug 23404: Add Noto Sans Buginese to the macOS whitelist
Bug 23745: Set dom.indexedDB.enabled = true
Bug 13575: Disable randomised Firefox HTTP cache decay user tests.
(Fernando Fernandez Mancera <ffmancera(a)riseup.net>)
Bug 17252: Enable session identifiers with FPI
Session tickets and session identifiers were isolated
by OriginAttributes, so we can re-enable them by
allowing the default value (true) of
"security.ssl.disable_session_identifiers".
The pref "security.enable_tls_session_tickets" is obsolete
(removed in https://bugzilla.mozilla.org/917049)
Bug 14952: Enable http/2 and AltSvc
In Firefox, SPDY/HTTP2 now uses Origin Attributes for
isolation of connections, push streams, origin frames, etc.
That means we get first-party isolation provided
"privacy.firstparty.isolate" is true. So in this patch, we
stop overriding "network.http.spdy.enabled" and
"network.http.spdy.enabled.http2".
Alternate Services also use Origin Attributes for isolation.
So we stop overriding
"network.http.altsvc.enabled" and "network.http.altsvc.oe"
as well.
(All 4 of the abovementioned "network.http.*" prefs adopt
Firefox 60ESR's default value of true.)
However, we want to disable HTTP/2 push for now, so we
set "network.http.spdy.allow-push" to false.
"network.http.spdy.enabled.http2draft" was removed in Bug 1132357.
"network.http.sped.enabled.v2" was removed in Bug 912550.
"network.http.sped.enabled.v3" was removed in Bug 1097944.
"network.http.sped.enabled.v3-1" was removed in Bug 1248197.
Bug 26114: addons.mozilla.org is not special
* Don't expose navigator.mozAddonManager on any site
* Don't block NoScript from modifying addons.mozilla.org or other sites
Enable ReaderView mode again (#27281).
Bug 29916: Make sure enterprise policies are disabled
Bug 2874: Block Components.interfaces from content
Bug 26146: Spoof HTTP User-Agent header for desktop platforms
In Tor Browser 8.0, the OS was revealed in both the HTTP User-Agent
header and to JavaScript code via navigator.userAgent. To avoid
leaking the OS inside each HTTP request (which many web servers
log), always use the Windows 7 OS value in the desktop User-Agent
header. We continue to allow access to the actual OS via JavaScript,
since doing so improves compatibility with web applications such
as GitHub and Google Docs.
Bug 12885: Windows Jump Lists fail for Tor Browser
Jumplist entries are stored in a binary file in:
%APPDATA%\\Microsoft\Windows\Recent\CustomDestinations\
and has a name in the form
[a-f0-9]+.customDestinations-ms
The hex at the front is unique per app, and is ultimately derived from
something called the 'App User Model ID' (AUMID) via some unknown
hashing method. The AUMID is provided as a key when programmatically
creating, updating, and deleting a jumplist. The default behaviour in
firefox is for the installer to define an AUMID for an app, and save it
in the registry so that the jumplist data can be removed by the
uninstaller.
However, the Tor Browser does not set this (or any other) regkey during
installation, so this codepath fails and the app's AUMID is left
undefined. As a result the app's AUMID ends up being defined by
windows, but unknowable by Tor Browser. This unknown AUMID is used to
create and modify the jumplist, but the delete API requires that we
provide the app's AUMID explicitly. Since we don't know what the AUMID
is (since the expected regkey where it is normally stored does not
exist) jumplist deletion will fail and we will leave behind a mostly
empty customDestinations-ms file. The name of the file is derived from
the binary path, so an enterprising person could reverse engineer how
that hex name is calculated, and generate the name for Tor Browser's
default Desktop installation path to determine whether a person had
used Tor Browser in the past.
The 'taskbar.grouping.useprofile' option that is enabled by this patch
works around this AUMID problem by having firefox.exe create it's own
AUMID based on the profile path (rather than looking for a regkey). This
way, if a user goes in and enables and disables jumplist entries, the
backing store is properly deleted.
Unfortunately, all windows users currently have this file lurking in
the above mentioned directory and this patch will not remove it since it
was created with an unknown AUMID. However, another patch could be
written which goes to that directory and deletes any item containing the
'Tor Browser' string. See bug 28996.
Bug 30845: Make sure default themes and other internal extensions are enabled
Bug 28896: Enable extensions in private browsing by default
Bug 31065: Explicitly allow proxying localhost
Bug 31598: Enable letterboxing
Disable Presentation API everywhere
Bug 21549 - Use Firefox's WASM default pref. It is disabled at safer
security levels.
Bug 32321: Disable Mozilla's MitM pings
Bug 19890: Disable installation of system addons
By setting the URL to "" we make sure that already installed system
addons get deleted as well.
Bug 22548: Firefox downgrades VP9 videos to VP8.
On systems where H.264 is not available or no HWA, VP9 is preferred. But in Tor
Browser 7.0 all youtube videos are degraded to VP8.
This behaviour can be turned off by setting media.benchmark.vp9.threshold to 0.
All clients will get better experience and lower traffic, beause TBB doesn't
use "Use hardware acceleration when available".
Bug 25741 - TBA: Add mobile-override of 000-tor-browser prefs
Bug 16441: Suppress "Reset Tor Browser" prompt.
Bug 29120: Use the in-memory media cache and increase its maximum size.
Bug 33697: use old search config based on list.json
Bug 33855: Ensure that site-specific browser mode is disabled.
Bug 30682: Disable Intermediate CA Preloading.
Bug 40061: Omit the Windows default browser agent from the build
Bug 40322: Consider disabling network.connectivity-service.enabled
Bug 40408: Disallow SVG Context Paint in all web content
Bug 40308: Disable network partitioning until we evaluate dFPI
Bug 40322: Consider disabling network.connectivity-service.enabled
Bug 40383: Disable dom.enable_event_timing
Bug 40423: Disable http/3
Bug 40177: Update prefs for Fx91esr
Bug 40700: Disable addons and features recommendations
Bug 40682: Disable network.proxy.allow_bypass
Bug 40736: Disable third-party cookies in PBM
Bug 19850: Enabled HTTPS-Only by default
Bug 40912: Hide the screenshot menu
Bug 41292: Disable moreFromMozilla in preferences page
Bug 40057: Ensure the CSS4 system colors are not a fingerprinting vector
Bug 24686: Set network.http.tailing.enabled to true
Bug 40183: Disable TLS ciphersuites using SHA-1
Bug 40783: Review 000-tor-browser.js and 001-base-profile.js for 102
We reviewed all the preferences we set for 102, and remove a few old
ones. See the description of that issue to see all the preferences we
believed were still valid for 102, and some brief description for the
reasons to keep them.
- - - - -
26446000 by Pier Angelo Vendrame at 2024-04-08T19:37:07+02:00
fixup! Firefox preference overrides.
Bug 41676: Set privacy.resistFingerprinting.testing.setTZtoUTC as a
defense-in-depth.
We will have to revert this during the ESR-transition.
- - - - -
ba32e138 by Richard Pospesel at 2024-04-08T19:37:08+02:00
Bug 41659: Add canonical color definitions to base-browser
- - - - -
6912b1cb by Pier Angelo Vendrame at 2024-04-08T19:37:08+02:00
Bug 41043: Hardcode the UI font on Linux
The mechanism to choose the UI font does not play well with our
fontconfig configuration. As a result, the final criterion to choose
the font for the UI was its version.
Since we hardcode Arimo as a default sans-serif on preferences, we use
it also for the UI. FontConfig will fall back to some other font for
scripts Arimo does not cover as expected (we tested with Japanese).
- - - - -
78af49c4 by Alex Catarineu at 2024-04-08T19:37:08+02:00
Bug 30605: Honor privacy.spoof_english in Android
This checks `privacy.spoof_english` whenever `setLocales` is
called from Fenix side and sets `intl.accept_languages`
accordingly.
Bug 40198: Expose privacy.spoof_english pref in GeckoView
- - - - -
1a2355c7 by Alex Catarineu at 2024-04-08T19:37:08+02:00
Bug 40199: Avoid using system locale for intl.accept_languages in GeckoView
- - - - -
1ca01b5d by Alex Catarineu at 2024-04-08T19:37:08+02:00
Bug 40171: Make WebRequest and GeckoWebExecutor First-Party aware
- - - - -
acc096e3 by Alex Catarineu at 2024-04-08T19:37:09+02:00
Bug 26345: Hide tracking protection UI
- - - - -
8810e3a9 by Pier Angelo Vendrame at 2024-04-08T19:37:09+02:00
Bug 9173: Change the default Firefox profile directory to be relative.
This commit makes Firefox look for the default profile directory in a
directory relative to the binary path.
The directory can be specified through the --with-relative-data-dir.
This is relative to the same directory as the firefox main binary for
Linux and Windows.
On macOS, we remove Contents/MacOS from it.
Or, in other words, the directory is relative to the application
bundle.
This behavior can be overriden at runtime, by placing a file called
system-install adjacent to the firefox main binary (also on macOS).
- - - - -
3dfa38cf by Alex Catarineu at 2024-04-08T19:37:09+02:00
Bug 27604: Fix addon issues when moving the profile directory
Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1429838
- - - - -
6c25f591 by Mike Perry at 2024-04-08T19:37:09+02:00
Bug 13028: Prevent potential proxy bypass cases.
It looks like these cases should only be invoked in the NSS command line
tools, and not the browser, but I decided to patch them anyway because there
literally is a maze of network function pointers being passed around, and it's
very hard to tell if some random code might not pass in the proper proxied
versions of the networking code here by accident.
Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1433509
- - - - -
dbe9b6c7 by Igor Oliveira at 2024-04-08T19:37:09+02:00
Bug 23104: Add a default line height compensation
Many fonts have issues with their vertical metrics. they
are used to influence the height of ascenders and depth
of descenders. Gecko uses it to calculate the line height
(font height + ascender + descender), however because of
that idiosyncratic behavior across multiple operating
systems, it can be used to identify the user's OS.
The solution proposed in the patch uses a default factor
to be multiplied with the font size, simulating the concept
of ascender and descender. This way all operating
systems will have the same line height.
- - - - -
3e0d8623 by Pier Angelo Vendrame at 2024-04-08T19:37:10+02:00
Bug 40309: Avoid using regional OS locales
Avoid regional OS locales if the pref
`intl.regional_prefs.use_os_locales` is false but RFP is enabled.
- - - - -
b21d7f38 by Matthew Finkel at 2024-04-08T19:37:10+02:00
Bug 40432: Prevent probing installed applications
Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1711084
- - - - -
f1fb4c42 by cypherpunks1 at 2024-04-08T19:37:10+02:00
Bug 33955: When copying an image only copy the image contents to the clipboard
- - - - -
0b690c5c by cypherpunks1 at 2024-04-08T19:37:10+02:00
Bug 41791: Omit the source URL when copying page contents to the clipboard
- - - - -
d64f63dc by hackademix at 2024-04-08T19:37:11+02:00
Bug 42288: Allow language spoofing in status messages.
- - - - -
80460b48 by Pier Angelo Vendrame at 2024-04-08T19:37:11+02:00
Base Browser strings
This commit adds all the strings needed by following Base Browser
patches.
- - - - -
cb24e68d by hackademix at 2024-04-08T19:37:11+02:00
Bug 41434: Letterboxing, preemptively apply margins in a global CSS rule to mitigate race conditions on newly created windows and tabs.
- - - - -
6dcbdca5 by hackademix at 2024-04-08T19:37:11+02:00
Bug 41434: Letterboxing, improve logging.
- - - - -
22b51b42 by hackademix at 2024-04-08T19:37:11+02:00
Bug 31064: Letterboxing, exempt browser extensions.
- - - - -
3efe06ee by hackademix at 2024-04-08T19:37:12+02:00
Bug 32411: Letterboxing, exempt view-source: URIs.
- - - - -
60c67b88 by hackademix at 2024-04-08T19:37:12+02:00
Bug 32308: use direct browser sizing for letterboxing.
Bug 30556: align letterboxing with 200x100 new win width stepping
- - - - -
de231230 by hackademix at 2024-04-08T19:37:12+02:00
Bug 41631: Prevent weird initial window dimensions caused by subpixel computations
- - - - -
97324a4a by Pier Angelo Vendrame at 2024-04-08T19:37:12+02:00
Bug 41369: Improve Firefox language settings for multi-lingual packages
Change the language selector to be sorted by language code, rather than
name, and to display the language code to the user.
Bug 41372: Handle Japanese as a special case in preferences on macOS
Japanese is treated in a special way on macOS. However, seeing the
Japanese language tag could be confusing for users, and moreover the
language name is not localized correctly like other langs.
Bug 41378: Tell users that they can change their language at the first start
With multi-lingual builds, Tor Browser matches the user's system
language, but some users might want to change it.
So, we tell them that it is possible, but only once.
- - - - -
cdf96e05 by Pier Angelo Vendrame at 2024-04-08T19:37:12+02:00
fixup! Bug 41369: Improve Firefox language settings for multi-lingual packages
Bug 42335: Do not localize the order of languages
- - - - -
8c1d07fa by p13dz at 2024-04-08T19:37:13+02:00
Bug 40283: Workaround for the file upload bug
- - - - -
dd62f089 by Arthur Edelstein at 2024-04-08T19:37:13+02:00
Bug 18905: Hide unwanted items from help menu
Bug 25660: Remove the "New Private Window" option
- - - - -
0a36e971 by cypherpunks1 at 2024-04-08T19:37:13+02:00
Bug 41740: Change the RFP value of devicePixelRatio to 2
- - - - -
13541e2f by Pier Angelo Vendrame at 2024-04-08T19:37:13+02:00
Bug 41739: Remove "Website appearance" from about:preferences.
It is ignored because of RFP and it is confusing for users.
- - - - -
4e2eeb54 by cypherpunks1 at 2024-04-08T19:37:14+02:00
Bug 41881: Don't persist custom network requests on private windows
- - - - -
7a1b62b8 by hackademix at 2024-04-08T19:37:14+02:00
Bug 42019: Empty browser's clipboard on browser shutdown
- - - - -
121a4faa by hackademix at 2024-04-08T19:37:14+02:00
Bug 42084: Ensure English spoofing works even if preferences are set out of order.
- - - - -
620b210b by Pier Angelo Vendrame at 2024-04-08T19:37:14+02:00
Bug 42376: Pass the locale list when constructing l10n in datetimebox
The datetime input is inconsistent with other inputs when using spoof
English: its placeholder is not translated, unlike the default values
and texts of all the other inputs.
- - - - -
74d7c959 by Pier Angelo Vendrame at 2024-04-08T19:37:14+02:00
Bug 42428: Make RFP spoof the timezone of document.lastModified.
- - - - -
e79525ac by Pier Angelo Vendrame at 2024-04-08T19:37:15+02:00
Bug 42472: Spoof timezone in XSLT.
- - - - -
23bd2c90 by Pier Angelo Vendrame at 2024-04-08T19:37:15+02:00
Bug 41603: Customize the creation of MOZ_SOURCE_URL
MOZ_SOURCE_URL is created by combining MOZ_SOURCE_REPO and
MOZ_SOURCE_CHANGESET.
But the code takes for granted that it refers to a Hg instance, so it
combines them as `$MOZ_SOURCE_REPO/rev/$MOZ_SOURCE_CHANGESET`.
With this commit, we change this logic to combine them to create a URL
that is valid for GitLab.
$MOZ_SOURCE_CHANGESET needs to be a commit hash, not a branch or a tag.
If that is needed, we could use /-/tree/, instead of /-/commit/.
- - - - -
427757dc by Henry Wilkes at 2024-04-08T19:37:15+02:00
Bug 31575: Disable Firefox Home (Activity Stream)
Treat about:blank as the default home page and new tab page.
Avoid loading AboutNewTab in BrowserGlue.sys.mjs in order
to avoid several network requests that we do not need.
Bug 41624: Disable about:pocket-* pages.
Bug 40144: Redirect about:privatebrowsing to the user's home
- - - - -
5aa6a314 by Kathy Brade at 2024-04-08T19:37:15+02:00
Bug 4234: Use the Firefox Update Process for Base Browser.
Windows: disable "runas" code path in updater (15201).
Windows: avoid writing to the registry (16236).
Also includes fixes for tickets 13047, 13301, 13356, 13594, 15406,
16014, 16909, 24476, and 25909.
Also fix bug 27221: purge the startup cache if the Base Browser
version changed (even if the Firefox version and build ID did
not change), e.g., after a minor Base Browser update.
Also fix 32616: Disable GetSecureOutputDirectoryPath() functionality.
Bug 26048: potentially confusing "restart to update" message
Within the update doorhanger, remove the misleading message that mentions
that windows will be restored after an update is applied, and replace the
"Restart and Restore" button label with an existing
"Restart to update Tor Browser" string.
Bug 28885: notify users that update is downloading
Add a "Downloading Base Browser update" item which appears in the
hamburger (app) menu while the update service is downloading a MAR
file. Before this change, the browser did not indicate to the user
that an update was in progress, which is especially confusing in
Tor Browser because downloads often take some time. If the user
clicks on the new menu item, the about dialog is opened to allow
the user to see download progress.
As part of this fix, the update service was changed to always show
update-related messages in the hamburger menu, even if the update
was started in the foreground via the about dialog or via the
"Check for Tor Browser Update" toolbar menu item. This change is
consistent with the Tor Browser goal of making sure users are
informed about the update process.
Removed #28885 parts of this patch which have been uplifted to Firefox.
- - - - -
c35081bd by Pier Angelo Vendrame at 2024-04-08T19:37:15+02:00
Bug 42061: Create an alpha update channel.
- - - - -
e082b667 by Nicolas Vigier at 2024-04-08T19:37:16+02:00
Bug 41682: Add base-browser nightly mar signing key
- - - - -
99824eb8 by hackademix at 2024-04-08T19:37:16+02:00
Bug 41695: Warn on window maximization without letterboxing in RFPHelper module
- - - - -
646f53bf by Pier Angelo Vendrame at 2024-04-08T19:37:16+02:00
Bug 41698: Reword the recommendation badges in about:addons
Firefox strings use { -brand-product-name }.
As a result, it seems that the fork is recommending extensions, whereas
AMO curators are doing that.
So, we replace the strings with custom ones that clarify that Mozilla is
recommending them.
We assign the strings with JS because our translation backend does not
support Fluent attributes, yet, but once it does, we should switch to
them, instead.
Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1825033
- - - - -
88577ca6 by Alex Catarineu at 2024-04-08T19:37:16+02:00
Bug 40069: Add helpers for message passing with extensions
- - - - -
f51c7502 by Matthew Finkel at 2024-04-08T19:37:17+02:00
Bug 41598: Prevent NoScript from being removed/disabled.
Bug 40253: Explicitly allow NoScript in Private Browsing mode.
- - - - -
76523927 by Henry Wilkes at 2024-04-08T19:37:17+02:00
Bug 41736: Hide NoScript extension's toolbar button by default.
This hides it from both the toolbar and the unified extensions panel.
We also hide the unified-extension-button if the panel would be empty:
not including the NoScript button when it is hidden. As a result, this
will be hidden by default until a user installs another extension (or
shows the NoScript button and unpins it).
- - - - -
714ee4d3 by hackademix at 2024-04-08T19:37:17+02:00
Bug 41834: Hide "Can't Be Removed - learn more" menu line for uninstallable add-ons
- - - - -
ff825a19 by Pier Angelo Vendrame at 2024-04-08T19:37:17+02:00
Bug 40925: Implemented the Security Level component
This component adds a new Security Level toolbar button which visually
indicates the current global security level via icon (as defined by the
extensions.torbutton.security_slider pref), a drop-down hanger with a
short description of the current security level, and a new section in
the about:preferences#privacy page where users can change their current
security level. In addition, the hanger and the preferences page will
show a visual warning when the user has modified prefs associated with
the security level and provide a one-click 'Restore Defaults' button to
get the user back on recommended settings.
Bug 40125: Expose Security Level pref in GeckoView
- - - - -
9aba858e by Pier Angelo Vendrame at 2024-04-08T19:37:17+02:00
Bug 40926: Implemented the New Identity feature
- - - - -
bfb4d727 by hackademix at 2024-04-08T19:37:18+02:00
fixup! Bug 40926: Implemented the New Identity feature
Bug 42236: Let users decide whether to load their home page on new identity.
- - - - -
f7b145d5 by hackademix at 2024-04-08T19:37:18+02:00
fixup! Bug 40926: Implemented the New Identity feature
MB 283: Make new identity homepage check brand-agnostic.
- - - - -
129dd5c6 by Henry Wilkes at 2024-04-08T19:37:18+02:00
Bug 41736: Customize toolbar for base-browser.
- - - - -
9cad59ad by Pier Angelo Vendrame at 2024-04-08T19:37:18+02:00
Bug 42027: Base Browser migration procedures.
This commit implmenents the the Base Browser's version of _migrateUI.
- - - - -
30 changed files:
- .eslintignore
- + .gitlab/issue_templates/bug.md
- + .gitlab/merge_request_templates/default.md
- accessible/android/SessionAccessibility.cpp
- accessible/android/SessionAccessibility.h
- accessible/ipc/DocAccessibleParent.cpp
- accessible/ipc/DocAccessibleParent.h
- accessible/ipc/moz.build
- − browser/actors/RFPHelperChild.sys.mjs
- − browser/actors/RFPHelperParent.sys.mjs
- browser/actors/moz.build
- browser/app/Makefile.in
- browser/app/macbuild/Contents/MacOS-files.in
- browser/app/moz.build
- browser/app/permissions
- + browser/app/profile/001-base-profile.js
- browser/app/profile/firefox.js
- browser/base/content/aboutDialog-appUpdater.js
- browser/base/content/aboutDialog.js
- browser/base/content/aboutDialog.xhtml
- browser/base/content/appmenu-viewcache.inc.xhtml
- browser/base/content/browser-addons.js
- browser/base/content/browser-context.inc
- browser/base/content/browser-menubar.inc
- browser/base/content/browser-safebrowsing.js
- browser/base/content/browser-sets.inc
- browser/base/content/browser-siteIdentity.js
- browser/base/content/browser.css
- browser/base/content/browser.js
- browser/base/content/browser.xhtml
The diff was not included because it is too large.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/5b…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/5b…
You're receiving this email because of your account on gitlab.torproject.org.
1
0

[Git][tpo/applications/tor-browser] Pushed new tag base-browser-115.10.0esr-13.0-1-build1
by Pier Angelo Vendrame (@pierov) 08 Apr '24
by Pier Angelo Vendrame (@pierov) 08 Apr '24
08 Apr '24
Pier Angelo Vendrame pushed new tag base-browser-115.10.0esr-13.0-1-build1 at The Tor Project / Applications / Tor Browser
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/tree/base-brow…
You're receiving this email because of your account on gitlab.torproject.org.
1
0