boklm pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
a00cfb3c by Nicolas Vigier at 2023-04-17T18:58:08+02:00
Bug 40844: Fix reproducibility issue in hfsplus-tools when hwclock is set to local time
- - - - -
4 changed files:
- projects/hfsplus-tools/build
- projects/hfsplus-tools/config
- + projects/hfsplus-tools/ignore-timezone.diff
- tools/signing/gatekeeper-bundling.sh
Changes:
=====================================
projects/hfsplus-tools/build
=====================================
@@ -11,6 +11,7 @@ tar -xf diskdev_cmds-[% c("version") %].tar.gz
cd diskdev_cmds-[% c("version") %]
patch -p1 < $rootdir/newfs_hfs.diff
+patch -p1 < $rootdir/ignore-timezone.diff
make -j[% c("num_procs") %]
=====================================
projects/hfsplus-tools/config
=====================================
@@ -21,3 +21,6 @@ input_files:
# exist on Linux (at that path) and is not required on Linux either, and make
# the UUID deterministic.
- filename: newfs_hfs.diff
+ # Remove UTCToLocal conversion to avoid a different result when hwclock
+ # is set to local time or utc time (tor-browser-build#40844)
+ - filename: ignore-timezone.diff
=====================================
projects/hfsplus-tools/ignore-timezone.diff
=====================================
@@ -0,0 +1,13 @@
+diff -ru diskdev_cmds-540.1.linux3/newfs_hfs.tproj/makehfs.c diskdev_cmds-540.1.linux3.n/newfs_hfs.tproj/makehfs.c
+--- diskdev_cmds-540.1.linux3/newfs_hfs.tproj/makehfs.c 2012-02-02 23:36:59.000000000 +0100
++++ diskdev_cmds-540.1.linux3.n/newfs_hfs.tproj/makehfs.c 2023-04-17 13:59:41.993000000 +0200
+@@ -463,8 +463,7 @@
+ }
+ hp->lastMountedVersion = kHFSPlusMountVersion;
+
+- /* NOTE: create date is in local time, not GMT! */
+- hp->createDate = UTCToLocal(defaults->createDate);
++ hp->createDate = defaults->createDate;
+ hp->modifyDate = defaults->createDate;
+ hp->backupDate = 0;
+ hp->checkedDate = defaults->createDate;
=====================================
tools/signing/gatekeeper-bundling.sh
=====================================
@@ -45,7 +45,7 @@ test -f "$libdmg_file" || \
"You can build it with:" \
" ./rbm/rbm build --target no_containers libdmg-hfsplus" \
"See var/deps in projects/libdmg-hfsplus/config for the list of build dependencies"
-hfstools_file="$script_dir/../../out/hfsplus-tools/hfsplus-tools-540.1.linux3-66de66.tar.gz"
+hfstools_file="$script_dir/../../out/hfsplus-tools/hfsplus-tools-540.1.linux3-81ff5b.tar.gz"
test -f "$hfstools_file" || \
exit_error "$hfstools_file is missing." \
"You can build it with:" \
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/a…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/a…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
7968b10a by Pier Angelo Vendrame at 2023-04-17T17:04:05+02:00
Bug 40811: Make it easier to test the updater
This commit adds a config variable to override the URL for the updater.
When it is defined, a user-provided certificate will replace the
default public keys used to sign nightly builds.
- - - - -
3 changed files:
- .gitignore
- projects/firefox/build
- projects/firefox/config
Changes:
=====================================
.gitignore
=====================================
@@ -14,3 +14,7 @@
/release
/alpha
/nightly
+
+# This file is used to test the updater, and whoever is interested in doing so,
+# should provide their file.
+/projects/firefox/marsigner.der
=====================================
projects/firefox/build
=====================================
@@ -92,7 +92,10 @@ fi
popd
[% END %]
-[% IF c("var/nightly") && ! c("var/mullvad-browser") -%]
+[% IF c("var/override_updater_url") -%]
+ sed -i 's|^URL=https://aus1\.torproject\.org/.*|URL=[% c("var/override_updater_url") %]|' build/application.ini.in
+ cp $rootdir/marsigner.der toolkit/mozapps/update/updater/nightly_aurora_level3_secondary.der
+[% ELSIF c("var/nightly") && ! c("var/mullvad-browser") -%]
# Set update url for nightly (#33402 / #40033)
sed -i 's|^URL=https://aus1\.torproject\.org/.*|URL=https://nightlies.tbb.torprojec… c("var/nightly_updates_publish_dir") %]/%CHANNEL%/%BUILD_TARGET%/%VERSION%/ALL|' build/application.ini.in
[% END -%]
=====================================
projects/firefox/config
=====================================
@@ -30,6 +30,12 @@ var:
- pkg-config
has_l10n: '[% !c("var/testbuild") && c("var/locales").size %]'
+ # Uncomment this if you want to test the updater. You will need to provide a
+ # marsigner.der in this directory, too. It will be used as a replacement for
+ # the nightly builds keys only. So, using this option for alphas and releases
+ # will not work (the browser will fail with a key/signature mismatch).
+ # override_updater_url: 'https://tb-build-05.torproject.org/~you/update_3/%CHANNEL%/%BUILD_TARGET%/%…'
+
rezip: |
rezip_tmpdir=$(mktemp -d)
mkdir -p "$rezip_tmpdir/z"
@@ -199,6 +205,8 @@ input_files:
name: translation-tor-browser
pkg_type: tor-browser
enable: '[% c("var/tor-browser") && c("var/has_l10n") %]'
+ - filename: marsigner.der
+ enable: '[% c("var/override_updater_url") %]'
- filename: namecoin-torbutton.patch
enable: '[% c("var/namecoin") %]'
# TorButton patch authored by Arthur Edelstein, from https://github.com/arthuredelstein/torbutton/ branch 2.1.10-namecoin
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/7…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/7…
You're receiving this email because of your account on gitlab.torproject.org.
Pier Angelo Vendrame pushed to branch tor-browser-102.10.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
d2c3dcac by Henry Wilkes at 2023-04-17T15:10:44+01:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 41617 - Tidy up:
- Lint builtinBridgeDialog.jsm and connectionPane.js.
- Use TorConnect.canBeginBootstrap.
- Always start Bootstrapping with the built in bridges, regardless of a
previous errors.
- Wait until settings have been applied before starting bootstrap.
- Use new string ids for the new strings. Mark the old ones for removal.
- Clean up unused properties.
- - - - -
64ea04a6 by Henry Wilkes at 2023-04-17T15:23:13+01:00
fixup! Add TorStrings module for localization
Bug 41617 - Tidy up:
- Use new string ids for the new strings. Mark the old ones for removal.
- Use "website" rather than "web site".
- - - - -
4 changed files:
- browser/components/torpreferences/content/builtinBridgeDialog.jsm
- browser/components/torpreferences/content/connectionPane.js
- browser/modules/TorStrings.jsm
- toolkit/torbutton/chrome/locale/en-US/settings.properties
Changes:
=====================================
browser/components/torpreferences/content/builtinBridgeDialog.jsm
=====================================
@@ -1,35 +1,30 @@
"use strict";
-const obs = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
-
var EXPORTED_SYMBOLS = ["BuiltinBridgeDialog"];
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+
const { TorStrings } = ChromeUtils.import("resource:///modules/TorStrings.jsm");
const {
TorSettings,
- TorSettingsTopics,
TorBridgeSource,
TorBuiltinBridgeTypes,
} = ChromeUtils.import("resource:///modules/TorSettings.jsm");
-const {
- TorConnect,
- TorConnectTopics,
- TorConnectState,
-} = ChromeUtils.import("resource:///modules/TorConnect.jsm");
+const { TorConnect, TorConnectTopics } = ChromeUtils.import(
+ "resource:///modules/TorConnect.jsm"
+);
class BuiltinBridgeDialog {
constructor(onSubmit) {
this.onSubmit = onSubmit;
this._dialog = null;
- this._window = null;
this._acceptButton = null;
}
static get selectors() {
return {
- header: "#torPreferences-builtinBridge-header",
description: "#torPreferences-builtinBridge-description",
radiogroup: "#torPreferences-builtinBridge-typeSelection",
obfsRadio: "#torPreferences-builtinBridges-radioObfs",
@@ -38,22 +33,20 @@ class BuiltinBridgeDialog {
snowflakeDescr: "#torPreferences-builtinBridges-descrSnowflake",
meekAzureRadio: "#torPreferences-builtinBridges-radioMeekAzure",
meekAzureDescr: "#torPreferences-builtinBridges-descrMeekAzure",
- acceptButton: "accept" /* not really a selector but a key for dialog's getButton */,
};
}
_populateXUL(window, aDialog) {
const selectors = BuiltinBridgeDialog.selectors;
- this._window = window;
this._dialog = aDialog;
const dialogWin = this._dialog.parentElement;
dialogWin.setAttribute("title", TorStrings.settings.builtinBridgeHeader);
this._dialog.querySelector(selectors.description).textContent =
- TorStrings.settings.builtinBridgeDescription;
+ TorStrings.settings.builtinBridgeDescription2;
- this._acceptButton = this._dialog.getButton(selectors.acceptButton);
+ this._acceptButton = this._dialog.getButton("accept");
this.onTorStateChange();
let radioGroup = this._dialog.querySelector(selectors.radiogroup);
@@ -63,19 +56,19 @@ class BuiltinBridgeDialog {
elemRadio: this._dialog.querySelector(selectors.obfsRadio),
elemDescr: this._dialog.querySelector(selectors.obfsDescr),
label: TorStrings.settings.builtinBridgeObfs4Title,
- descr: TorStrings.settings.builtinBridgeObfs4Description,
+ descr: TorStrings.settings.builtinBridgeObfs4Description2,
},
snowflake: {
elemRadio: this._dialog.querySelector(selectors.snowflakeRadio),
elemDescr: this._dialog.querySelector(selectors.snowflakeDescr),
label: TorStrings.settings.builtinBridgeSnowflake,
- descr: TorStrings.settings.builtinBridgeSnowflakeDescription,
+ descr: TorStrings.settings.builtinBridgeSnowflakeDescription2,
},
"meek-azure": {
elemRadio: this._dialog.querySelector(selectors.meekAzureRadio),
elemDescr: this._dialog.querySelector(selectors.meekAzureDescr),
label: TorStrings.settings.builtinBridgeMeekAzure,
- descr: TorStrings.settings.builtinBridgeMeekAzureDescription,
+ descr: TorStrings.settings.builtinBridgeMeekAzureDescription2,
},
};
@@ -96,8 +89,8 @@ class BuiltinBridgeDialog {
radioGroup.selectedItem = null;
}
- this._dialog.addEventListener("dialogaccept", e => {
- this.onSubmit(radioGroup.value);
+ this._dialog.addEventListener("dialogaccept", () => {
+ this.onSubmit(radioGroup.value, TorConnect.canBeginBootstrap);
});
this._dialog.addEventListener("dialoghelp", e => {
window.top.openTrustedLinkIn(
@@ -110,14 +103,20 @@ class BuiltinBridgeDialog {
this._dialog.style.minWidth = "0";
this._dialog.style.minHeight = "0";
- obs.addObserver(this, TorConnectTopics.StateChange);
+ Services.obs.addObserver(this, TorConnectTopics.StateChange);
}
onTorStateChange() {
- if (TorConnect.state === TorConnectState.Configuring) {
- this._acceptButton.setAttribute("label", TorStrings.settings.bridgeButtonConnect);
+ if (TorConnect.canBeginBootstrap) {
+ this._acceptButton.setAttribute(
+ "label",
+ TorStrings.settings.bridgeButtonConnect
+ );
} else {
- this._acceptButton.setAttribute("label", TorStrings.settings.bridgeButtonAccept);
+ this._acceptButton.setAttribute(
+ "label",
+ TorStrings.settings.bridgeButtonAccept
+ );
}
}
@@ -130,25 +129,26 @@ class BuiltinBridgeDialog {
observe(subject, topic, data) {
switch (topic) {
- case TorConnectTopics.StateChange: {
+ case TorConnectTopics.StateChange:
this.onTorStateChange();
break;
- }
}
}
close() {
// unregister our observer topics
- obs.removeObserver(this, TorConnectTopics.StateChange);
+ Services.obs.removeObserver(this, TorConnectTopics.StateChange);
}
openDialog(gSubDialog) {
gSubDialog.open(
"chrome://browser/content/torpreferences/builtinBridgeDialog.xhtml",
- { features: "resizable=yes",
+ {
+ features: "resizable=yes",
closingCallback: () => {
this.close();
- },},
+ },
+ },
this
);
}
=====================================
browser/components/torpreferences/content/connectionPane.js
=====================================
@@ -323,7 +323,7 @@ const gConnectionPane = (function() {
prefpane.querySelector(selectors.bridges.header).innerText =
TorStrings.settings.bridgesHeading;
prefpane.querySelector(selectors.bridges.description).textContent =
- TorStrings.settings.bridgesDescription;
+ TorStrings.settings.bridgesDescription2;
{
const learnMore = prefpane.querySelector(selectors.bridges.learnMore);
learnMore.setAttribute("value", TorStrings.settings.learnMore);
@@ -424,7 +424,8 @@ const gConnectionPane = (function() {
selectors.bridges.currentHeader
);
bridgeHeader.textContent = TorStrings.settings.bridgeCurrent;
- prefpane.querySelector(selectors.bridges.switchLabel).textContent = TorStrings.settings.allBridgesEnabled;
+ prefpane.querySelector(selectors.bridges.switchLabel).textContent =
+ TorStrings.settings.allBridgesEnabled;
const bridgeSwitch = prefpane.querySelector(selectors.bridges.switch);
bridgeSwitch.addEventListener("change", () => {
TorSettings.bridges.enabled = bridgeSwitch.checked;
@@ -887,34 +888,34 @@ const gConnectionPane = (function() {
});
}
- {
- this._confirmBridgeRemoval = () => {
- const aParentWindow = Services.wm.getMostRecentWindow("navigator:browser");
-
- const ps = Services.prompt;
- const btnFlags =
- ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING +
- ps.BUTTON_POS_0_DEFAULT +
- ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL;
-
- const notUsed = { value: false };
- const btnIndex = ps.confirmEx(
- aParentWindow,
- TorStrings.settings.bridgeRemoveAllDialogTitle,
- TorStrings.settings.bridgeRemoveAllDialogDescription,
- btnFlags,
- TorStrings.settings.remove,
- null,
- null,
- null,
- notUsed
- );
+ this._confirmBridgeRemoval = () => {
+ const aParentWindow = Services.wm.getMostRecentWindow(
+ "navigator:browser"
+ );
- if (btnIndex === 0) {
- this.onRemoveAllBridges();
- }
- };
- }
+ const ps = Services.prompt;
+ const btnFlags =
+ ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING +
+ ps.BUTTON_POS_0_DEFAULT +
+ ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL;
+
+ const notUsed = { value: false };
+ const btnIndex = ps.confirmEx(
+ aParentWindow,
+ TorStrings.settings.bridgeRemoveAllDialogTitle,
+ TorStrings.settings.bridgeRemoveAllDialogDescription,
+ btnFlags,
+ TorStrings.settings.remove,
+ null,
+ null,
+ null,
+ notUsed
+ );
+
+ if (btnIndex === 0) {
+ this.onRemoveAllBridges();
+ }
+ };
// Advanced setup
prefpane.querySelector(selectors.advanced.header).innerText =
@@ -1058,25 +1059,41 @@ const gConnectionPane = (function() {
},
onAddBuiltinBridge() {
- const builtinBridgeDialog = new BuiltinBridgeDialog(aBridgeType => {
- if (!aBridgeType) {
- TorSettings.bridges.enabled = false;
- TorSettings.bridges.builtin_type = "";
- } else {
- TorSettings.bridges.enabled = true;
- TorSettings.bridges.source = TorBridgeSource.BuiltIn;
- TorSettings.bridges.builtin_type = aBridgeType;
- }
- TorSettings.saveToPrefs();
- TorSettings.applySettings().then(result => {
+ const builtinBridgeDialog = new BuiltinBridgeDialog(
+ async (bridgeType, connect) => {
+ if (!bridgeType) {
+ TorSettings.bridges.enabled = false;
+ TorSettings.bridges.builtin_type = "";
+ } else {
+ TorSettings.bridges.enabled = true;
+ TorSettings.bridges.source = TorBridgeSource.BuiltIn;
+ TorSettings.bridges.builtin_type = bridgeType;
+ }
+ TorSettings.saveToPrefs();
+ await TorSettings.applySettings();
+
this._populateBridgeCards();
- });
- // The bridge dialog button is "connect" when Tor is not bootstrapped,
- // so do the connect
- if (TorConnect.state == TorConnectState.Configuring) {
- TorConnect.openTorConnect({ beginBootstrap: true })
+
+ // The bridge dialog button is "connect" when Tor is not bootstrapped,
+ // so do the connect.
+ if (connect) {
+ // Start Bootstrapping, which should use the configured bridges.
+ // NOTE: We do this regardless of any previous TorConnect Error.
+ if (TorConnect.canBeginBootstrap) {
+ TorConnect.beginBootstrap();
+ }
+ // Open "about:torconnect".
+ // FIXME: If there has been a previous bootstrapping error then
+ // "about:torconnect" will be trying to get the user to use
+ // AutoBootstrapping. It is not set up to handle a forced direct
+ // entry to plain Bootstrapping from this dialog so the UI will not
+ // be aligned. In particular the
+ // AboutTorConnect.uiState.bootstrapCause will be aligned to
+ // whatever was shown previously in "about:torconnect" instead.
+ TorConnect.openTorConnect();
+ }
}
- });
+ );
builtinBridgeDialog.openDialog(gSubDialog);
},
=====================================
browser/modules/TorStrings.jsm
=====================================
@@ -94,7 +94,7 @@ const Loader = {
quickstartCheckbox: "Always connect automatically",
// Bridge settings
bridgesHeading: "Bridges",
- bridgesDescription:
+ 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",
@@ -116,7 +116,8 @@ const Loader = {
allBridgesEnabled: "Use current bridges",
bridgeRemoveAll: "Remove All Bridges",
bridgeRemoveAllDialogTitle: "Remove all bridges?",
- bridgeRemoveAllDialogDescription: "If these bridges were received from torproject.org or added manually, this action cannot be undone",
+ bridgeRemoveAllDialogDescription:
+ "If these bridges were received from torproject.org or added manually, this action cannot be undone",
bridgeAdd: "Add a New Bridge",
bridgeSelectBrowserBuiltin:
"Choose from one of Tor Browser’s built-in bridges",
@@ -138,20 +139,18 @@ const Loader = {
// Scan bridge QR dialog
scanQrTitle: "Scan the QR code",
// Builtin bridges dialog
- builtinBridgeTitle: "Built-In Bridges",
builtinBridgeHeader: "Select a Built-In Bridge",
- builtinBridgeDescription:
+ builtinBridgeDescription2:
"Tor Browser includes some specific types of bridges known as “pluggable transports”, which can help conceal the fact you’re using Tor.",
- builtinBridgeObfs4: "obfs4",
builtinBridgeObfs4Title: "obfs4 (Built-in)",
- builtinBridgeObfs4Description:
+ builtinBridgeObfs4Description2:
"Makes your Tor traffic look like random data. May not work in heavily censored regions.",
builtinBridgeSnowflake: "Snowflake",
- builtinBridgeSnowflakeDescription:
+ builtinBridgeSnowflakeDescription2:
"Routes your connection through Snowflake proxies to make it look like you’re placing a video call, for example.",
builtinBridgeMeekAzure: "meek-azure",
- builtinBridgeMeekAzureDescription:
- "Makes it look like you’re connected to a Microsoft web site, instead of using Tor. May work in heavily censored regions, but is usually very slow.",
+ 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
=====================================
toolkit/torbutton/chrome/locale/en-US/settings.properties
=====================================
@@ -26,7 +26,9 @@ settings.quickstartCheckbox=Always connect automatically
# Bridge settings
settings.bridgesHeading=Bridges
-settings.bridgesDescription=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.
+# Old description used up to 12.0 - TODO: remove when 12.5 becomes stable:
+settings.bridgesDescription=Bridges help you access the Tor Network in places where Tor is blocked. Depending on where you are, one bridge may work better than another.
+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.
settings.bridgeLocation=Your location
settings.bridgeLocationAutomatic=Automatic
settings.bridgeLocationFrequent=Frequently selected locations
@@ -72,20 +74,26 @@ settings.cancel=Cancel
settings.scanQrTitle=Scan the QR code
# Builtin bridges dialog
-settings.builtinBridgeTitle=Built-In Bridges
-# Bug 41617: Todo - delete builtinBridgeHeader, no longer user
settings.builtinBridgeHeader=Select a Built-In Bridge
-settings.builtinBridgeDescription=Tor Browser includes some specific types of bridges known as “pluggable transports”, which can help conceal the fact you’re using Tor.
-settings.builtinBridgeObfs4=obfs4
+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.builtinBridgeObfs4Description=Makes your Tor traffic look like random data. May not work in heavily censored regions.
+settings.builtinBridgeObfs4Description2=Makes your Tor traffic look like random data. May not work in heavily censored regions.
settings.builtinBridgeSnowflake=Snowflake
-settings.builtinBridgeSnowflakeDescription=Routes your connection through Snowflake proxies to make it look like you’re placing a video call, for example.
+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.builtinBridgeMeekAzureDescription=Makes it look like you’re connected to a Microsoft web site, instead of using Tor. May work in heavily censored regions, but is usually very slow.
+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
+# Old dialog strings used up to 12.0 - TODO: remove when 12.5 becomes stable:
+settings.builtinBridgeTitle=Built-In Bridges
+settings.builtinBridgeDescription=Tor Browser includes some specific types of bridges known as “pluggable transports”.
+settings.builtinBridgeObfs4=obfs4
+settings.builtinBridgeObfs4Description=obfs4 is a type of built-in bridge that makes your Tor traffic look random. They are also less likely to be blocked than their predecessors, obfs3 bridges.
+settings.builtinBridgeSnowflakeDescription=Snowflake is a built-in bridge that defeats censorship by routing your connection through Snowflake proxies, ran by volunteers.
+settings.builtinBridgeMeekAzureDescription=meek-azure is a built-in bridge that makes it look like you are using a Microsoft web site instead of using Tor.
+# end
+
# Request bridges dialog
settings.requestBridgeDialogTitle=Request Bridge
settings.submitCaptcha=Submit
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/f0df64…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/f0df64…
You're receiving this email because of your account on gitlab.torproject.org.
Richard Pospesel deleted branch 12.0.5-build2 at The Tor Project / Applications / tor-browser-build
--
You're receiving this email because of your account on gitlab.torproject.org.
Richard Pospesel pushed to branch maint-12.0 at The Tor Project / Applications / tor-browser-build
Commits:
0abc4667 by Richard Pospesel at 2023-04-14T18:32:33+00:00
fixup! Bug 40814: Prepare stable release 12.0.5
updated build tag to build2
- - - - -
1 changed file:
- rbm.conf
Changes:
=====================================
rbm.conf
=====================================
@@ -72,7 +72,7 @@ buildconf:
var:
torbrowser_version: '12.0.5'
- torbrowser_build: 'build1'
+ torbrowser_build: 'build2'
torbrowser_incremental_from:
- 12.0.4
build_mar: 1
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0…
You're receiving this email because of your account on gitlab.torproject.org.
This is an automated email from the git hooks/post-receive script.
dcf pushed a change to branch main
in repository pluggable-transports/goptlib.
from 24b2b14 Move repository URL to gitlab.torproject.org.
new 0630d8d Revert "Move repository URL to gitlab.torproject.org."
new c484712 Moved to https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/gopt….
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
ChangeLog | 5 -----
README | 13 ++++++++++---
examples/dummy-client/dummy-client.go | 2 +-
examples/dummy-server/dummy-server.go | 2 +-
go.mod | 2 +-
5 files changed, 13 insertions(+), 11 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
This is an automated email from the git hooks/post-receive script.
dcf pushed a commit to branch main
in repository pluggable-transports/goptlib.
The following commit(s) were added to refs/heads/main by this push:
new 3155c60 Update some references to ext-orport-spec.txt.
3155c60 is described below
commit 3155c6049a6eb37eaf82d423e4e518cf3d8a2110
Author: David Fifield <david(a)bamsoftware.com>
AuthorDate: Fri Apr 14 19:13:42 2023 -0600
Update some references to ext-orport-spec.txt.
These might have been done in b31bdca77deeeb3c9da4116473b65e8ffba9ea0b,
apart from the https://spec.torproject.org/ext-orport-spec permalink
which did not exist at that time.
---
README | 2 +-
pt.go | 30 ++++++++++++++----------------
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/README b/README
index acab129..1a48b3c 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
goptlib is a library for writing Tor pluggable transports in Go.
https://spec.torproject.org/pt-spec
-https://gitweb.torproject.org/torspec.git/tree/ext-orport-spec.txt
+https://spec.torproject.org/ext-orport-spec
To download a copy of the library into $GOPATH:
go get git.torproject.org/pluggable-transports/goptlib.git
diff --git a/pt.go b/pt.go
index d01e497..9661f0c 100644
--- a/pt.go
+++ b/pt.go
@@ -122,7 +122,7 @@
// https://spec.torproject.org/pt-spec
//
// Extended ORPort:
-// https://gitweb.torproject.org/torspec.git/tree/ext-orport-spec.txt
+// https://spec.torproject.org/ext-orport-spec
//
// The package implements a SOCKS5 server sufficient for a Tor client transport
// plugin.
@@ -674,7 +674,7 @@ func readAuthCookie(f io.Reader) ([]byte, error) {
}
// Read and validate the contents of an auth cookie file. Returns the 32-byte
-// cookie. See section 4.2.1.2 of 217-ext-orport-auth.txt.
+// cookie. See section 2.1.2 of ext-orport-spec.txt.
func readAuthCookieFile(filename string) (cookie []byte, err error) {
f, err := os.Open(filename)
if err != nil {
@@ -764,7 +764,7 @@ func ServerSetup(_ []string) (info ServerInfo, err error) {
return info, nil
}
-// See 217-ext-orport-auth.txt section 4.2.1.3.
+// See ext-orport-spec.txt section 2.1.3.
func computeServerHash(authCookie, clientNonce, serverNonce []byte) []byte {
h := hmac.New(sha256.New, authCookie)
io.WriteString(h, "ExtORPort authentication server-to-client hash")
@@ -773,7 +773,7 @@ func computeServerHash(authCookie, clientNonce, serverNonce []byte) []byte {
return h.Sum([]byte{})
}
-// See 217-ext-orport-auth.txt section 4.2.1.3.
+// See ext-orport-spec.txt section 2.1.3.
func computeClientHash(authCookie, clientNonce, serverNonce []byte) []byte {
h := hmac.New(sha256.New, authCookie)
io.WriteString(h, "ExtORPort authentication client-to-server hash")
@@ -783,7 +783,7 @@ func computeClientHash(authCookie, clientNonce, serverNonce []byte) []byte {
}
func extOrPortAuthenticate(s io.ReadWriter, info *ServerInfo) error {
- // Read auth types. 217-ext-orport-auth.txt section 4.1.
+ // Read auth types. ext-orport-spec.txt section 2.
var authTypes [256]bool
var count int
for count = 0; count < 256; count++ {
@@ -866,7 +866,7 @@ func extOrPortAuthenticate(s io.ReadWriter, info *ServerInfo) error {
return nil
}
-// See section 3.1.1 of 196-transport-control-ports.txt.
+// See section 3.1 of ext-orport-spec.txt.
const (
extOrCmdDone = 0x0000
extOrCmdUserAddr = 0x0001
@@ -900,19 +900,17 @@ func extOrPortSendCommand(s io.Writer, cmd uint16, body []byte) error {
return nil
}
-// Send a USERADDR command on s. See section 3.1.2.1 of
-// 196-transport-control-ports.txt.
+// Send a USERADDR command on s. See section 3.2.1 of ext-orport-spec.txt.
func extOrPortSendUserAddr(s io.Writer, addr string) error {
return extOrPortSendCommand(s, extOrCmdUserAddr, []byte(addr))
}
-// Send a TRANSPORT command on s. See section 3.1.2.2 of
-// 196-transport-control-ports.txt.
+// Send a TRANSPORT command on s. See section 3.2.2 of ext-orport-spec.txt.
func extOrPortSendTransport(s io.Writer, methodName string) error {
return extOrPortSendCommand(s, extOrCmdTransport, []byte(methodName))
}
-// Send a DONE command on s. See section 3.1 of 196-transport-control-ports.txt.
+// Send a DONE command on s. See section 3.1 of ext-orport-spec.txt.
func extOrPortSendDone(s io.Writer) error {
return extOrPortSendCommand(s, extOrCmdDone, []byte{})
}
@@ -1001,9 +999,9 @@ func extOrPortSetup(s net.Conn, timeout time.Duration,
}
// Dial (using the given net.Dialer) info.ExtendedOrAddr if defined, or else
-// info.OrAddr, and return an open net.Conn. If connecting to the extended
-// OR port, extended OR port authentication à la 217-ext-orport-auth.txt is done
-// before returning; an error is returned if authentication fails.
+// info.OrAddr, and return an open net.Conn. If connecting to the extended OR
+// port, extended OR port authentication is done before returning; an error is
+// returned if authentication fails.
//
// The addr and methodName arguments are put in USERADDR and TRANSPORT ExtOrPort
// commands, respectively. If either is "", the corresponding command is not
@@ -1028,8 +1026,8 @@ func DialOrWithDialer(dialer *net.Dialer, info *ServerInfo, addr, methodName str
// Dial info.ExtendedOrAddr if defined, or else info.OrAddr, and return an open
// *net.TCPConn. If connecting to the extended OR port, extended OR port
-// authentication à la 217-ext-orport-auth.txt is done before returning; an
-// error is returned if authentication fails.
+// authentication is done before returning; an error is returned if
+// authentication fails.
//
// The addr and methodName arguments are put in USERADDR and TRANSPORT ExtOrPort
// commands, respectively. If either is "", the corresponding command is not
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Richard Pospesel pushed to branch tor-browser-102.10.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
84b47639 by Dan Ballard at 2023-04-14T20:35:41+00:00
fixup! Add TorStrings module for localization
Bug 41617: Improve the UX of the built-in bridges dialog
- - - - -
f0df6486 by Dan Ballard at 2023-04-14T21:02:03+00:00
fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
Bug 41617: Improve the UX of the built-in bridges dialog
- - - - -
5 changed files:
- browser/components/torpreferences/content/builtinBridgeDialog.jsm
- browser/components/torpreferences/content/builtinBridgeDialog.xhtml
- browser/components/torpreferences/content/connectionPane.js
- browser/modules/TorStrings.jsm
- toolkit/torbutton/chrome/locale/en-US/settings.properties
Changes:
=====================================
browser/components/torpreferences/content/builtinBridgeDialog.jsm
=====================================
@@ -1,19 +1,30 @@
"use strict";
+const obs = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
+
var EXPORTED_SYMBOLS = ["BuiltinBridgeDialog"];
const { TorStrings } = ChromeUtils.import("resource:///modules/TorStrings.jsm");
const {
TorSettings,
+ TorSettingsTopics,
TorBridgeSource,
TorBuiltinBridgeTypes,
} = ChromeUtils.import("resource:///modules/TorSettings.jsm");
+const {
+ TorConnect,
+ TorConnectTopics,
+ TorConnectState,
+} = ChromeUtils.import("resource:///modules/TorConnect.jsm");
+
class BuiltinBridgeDialog {
constructor(onSubmit) {
this.onSubmit = onSubmit;
this._dialog = null;
+ this._window = null;
+ this._acceptButton = null;
}
static get selectors() {
@@ -27,27 +38,31 @@ class BuiltinBridgeDialog {
snowflakeDescr: "#torPreferences-builtinBridges-descrSnowflake",
meekAzureRadio: "#torPreferences-builtinBridges-radioMeekAzure",
meekAzureDescr: "#torPreferences-builtinBridges-descrMeekAzure",
+ acceptButton: "accept" /* not really a selector but a key for dialog's getButton */,
};
}
_populateXUL(window, aDialog) {
const selectors = BuiltinBridgeDialog.selectors;
+ this._window = window;
this._dialog = aDialog;
const dialogWin = this._dialog.parentElement;
- dialogWin.setAttribute("title", TorStrings.settings.builtinBridgeTitle);
+ dialogWin.setAttribute("title", TorStrings.settings.builtinBridgeHeader);
- this._dialog.querySelector(selectors.header).textContent =
- TorStrings.settings.builtinBridgeHeader;
this._dialog.querySelector(selectors.description).textContent =
TorStrings.settings.builtinBridgeDescription;
+
+ this._acceptButton = this._dialog.getButton(selectors.acceptButton);
+ this.onTorStateChange();
+
let radioGroup = this._dialog.querySelector(selectors.radiogroup);
let types = {
obfs4: {
elemRadio: this._dialog.querySelector(selectors.obfsRadio),
elemDescr: this._dialog.querySelector(selectors.obfsDescr),
- label: TorStrings.settings.builtinBridgeObfs4,
+ label: TorStrings.settings.builtinBridgeObfs4Title,
descr: TorStrings.settings.builtinBridgeObfs4Description,
},
snowflake: {
@@ -94,6 +109,16 @@ class BuiltinBridgeDialog {
// Hack: see the CSS
this._dialog.style.minWidth = "0";
this._dialog.style.minHeight = "0";
+
+ obs.addObserver(this, TorConnectTopics.StateChange);
+ }
+
+ onTorStateChange() {
+ if (TorConnect.state === TorConnectState.Configuring) {
+ this._acceptButton.setAttribute("label", TorStrings.settings.bridgeButtonConnect);
+ } else {
+ this._acceptButton.setAttribute("label", TorStrings.settings.bridgeButtonAccept);
+ }
}
init(window, aDialog) {
@@ -103,10 +128,27 @@ class BuiltinBridgeDialog {
}, 0);
}
+ observe(subject, topic, data) {
+ switch (topic) {
+ case TorConnectTopics.StateChange: {
+ this.onTorStateChange();
+ break;
+ }
+ }
+ }
+
+ close() {
+ // unregister our observer topics
+ obs.removeObserver(this, TorConnectTopics.StateChange);
+ }
+
openDialog(gSubDialog) {
gSubDialog.open(
"chrome://browser/content/torpreferences/builtinBridgeDialog.xhtml",
- { features: "resizable=yes" },
+ { features: "resizable=yes",
+ closingCallback: () => {
+ this.close();
+ },},
this
);
}
=====================================
browser/components/torpreferences/content/builtinBridgeDialog.xhtml
=====================================
@@ -8,7 +8,6 @@
xmlns:html="http://www.w3.org/1999/xhtml">
<dialog id="torPreferences-builtinBridge-dialog"
buttons="help,accept,cancel">
- <html:h3 id="torPreferences-builtinBridge-header">​</html:h3>
<description>
<html:div id="torPreferences-builtinBridge-description">​<br/>​</html:div>
</description>
=====================================
browser/components/torpreferences/content/connectionPane.js
=====================================
@@ -1071,6 +1071,11 @@ const gConnectionPane = (function() {
TorSettings.applySettings().then(result => {
this._populateBridgeCards();
});
+ // The bridge dialog button is "connect" when Tor is not bootstrapped,
+ // so do the connect
+ if (TorConnect.state == TorConnectState.Configuring) {
+ TorConnect.openTorConnect({ beginBootstrap: true })
+ }
});
builtinBridgeDialog.openDialog(gSubDialog);
},
=====================================
browser/modules/TorStrings.jsm
=====================================
@@ -95,7 +95,7 @@ const Loader = {
// Bridge settings
bridgesHeading: "Bridges",
bridgesDescription:
- "Bridges help you access the Tor Network in places where Tor is blocked. Depending on where you are, one bridge may work better than another.",
+ "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",
@@ -141,16 +141,19 @@ const Loader = {
builtinBridgeTitle: "Built-In Bridges",
builtinBridgeHeader: "Select a Built-In Bridge",
builtinBridgeDescription:
- "Tor Browser includes some specific types of bridges known as “pluggable transports”.",
+ "Tor Browser includes some specific types of bridges known as “pluggable transports”, which can help conceal the fact you’re using Tor.",
builtinBridgeObfs4: "obfs4",
+ builtinBridgeObfs4Title: "obfs4 (Built-in)",
builtinBridgeObfs4Description:
- "obfs4 is a type of built-in bridge that makes your Tor traffic look random. They are also less likely to be blocked than their predecessors, obfs3 bridges.",
+ "Makes your Tor traffic look like random data. May not work in heavily censored regions.",
builtinBridgeSnowflake: "Snowflake",
builtinBridgeSnowflakeDescription:
- "Snowflake is a built-in bridge that defeats censorship by routing your connection through Snowflake proxies, ran by volunteers.",
+ "Routes your connection through Snowflake proxies to make it look like you’re placing a video call, for example.",
builtinBridgeMeekAzure: "meek-azure",
builtinBridgeMeekAzureDescription:
- "meek-azure is a built-in bridge that makes it look like you are using a Microsoft web site instead of using Tor.",
+ "Makes it look like you’re connected to a Microsoft web site, 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",
=====================================
toolkit/torbutton/chrome/locale/en-US/settings.properties
=====================================
@@ -26,7 +26,7 @@ settings.quickstartCheckbox=Always connect automatically
# Bridge settings
settings.bridgesHeading=Bridges
-settings.bridgesDescription=Bridges help you access the Tor Network in places where Tor is blocked. Depending on where you are, one bridge may work better than another.
+settings.bridgesDescription=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.
settings.bridgeLocation=Your location
settings.bridgeLocationAutomatic=Automatic
settings.bridgeLocationFrequent=Frequently selected locations
@@ -73,14 +73,18 @@ settings.scanQrTitle=Scan the QR code
# Builtin bridges dialog
settings.builtinBridgeTitle=Built-In Bridges
+# Bug 41617: Todo - delete builtinBridgeHeader, no longer user
settings.builtinBridgeHeader=Select a Built-In Bridge
-settings.builtinBridgeDescription=Tor Browser includes some specific types of bridges known as “pluggable transports”.
+settings.builtinBridgeDescription=Tor Browser includes some specific types of bridges known as “pluggable transports”, which can help conceal the fact you’re using Tor.
settings.builtinBridgeObfs4=obfs4
-settings.builtinBridgeObfs4Description=obfs4 is a type of built-in bridge that makes your Tor traffic look random. They are also less likely to be blocked than their predecessors, obfs3 bridges.
+settings.builtinBridgeObfs4Title=obfs4 (Built-in)
+settings.builtinBridgeObfs4Description=Makes your Tor traffic look like random data. May not work in heavily censored regions.
settings.builtinBridgeSnowflake=Snowflake
-settings.builtinBridgeSnowflakeDescription=Snowflake is a built-in bridge that defeats censorship by routing your connection through Snowflake proxies, ran by volunteers.
+settings.builtinBridgeSnowflakeDescription=Routes your connection through Snowflake proxies to make it look like you’re placing a video call, for example.
settings.builtinBridgeMeekAzure=meek-azure
-settings.builtinBridgeMeekAzureDescription=meek-azure is a built-in bridge that makes it look like you are using a Microsoft web site instead of using Tor.
+settings.builtinBridgeMeekAzureDescription=Makes it look like you’re connected to a Microsoft web site, 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
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/314794…
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/314794…
You're receiving this email because of your account on gitlab.torproject.org.