Commit 8c5a555b authored by Georg Koppen's avatar Georg Koppen
Browse files

Merge remote-tracking branch 'acat/10760+1'

parents cbf7172b 45b99073
Torbutton comes pre-installed with Tor Browser and we urge you not to change it.
We do not recommend to install it to Firefox because this is not a sufficient
way to surf anonymously.
Torbutton guarantees that DNS requests are sent through the Tor instance that
comes with Tor Browser. You should not change the proxy settings.
It’s strongly discouraged to install new Add-ons in Tor Browser, because they
can compromise both your privacy and your security. Plus, Tor Browser already
comes installed with two add-ons — HTTPS Everywhere and NoScript — which give
you a lot of added protection.
You can read more about it here:
Also have a look at this page for already answered questions:
For other issues you should know about have a look at this blog post:
For a list of all torbutton announcements see
To build an XPI that is suitable for Babelzilla, do the following:
patch -p0 < no-english.diff
chmod +x
cd pkg/
You should see:
file torbutton-1.2.0rc1.xpi
pkg/torbutton-1.2.0rc1.xpi: Zip archive data, at least v1.0 to extract
This is to work around the fact that an xpi requires empty strings for
incomplete translations or the formatting of various dialogs will be broken.
Furthermore, Babelzilla doesn't know an english string from a Japanese string
and simply records translations as matching strings. The XPI resulting from
the above build process will be ready for Babelzilla but should not be used by
anyone else.
# Magical Torbutton Release Process Incantations
# "May this part of my job one day be replaced by a small shell script"
#. Decide the version number.
export VERSION="1.5.2"
vim ./src/install.rdf # edit <em:version> tag to reflect version
#. Test upgrades of candidate XPI in latest Firefox and TBB product matrix
# TODO: Currently manual
#. Generate changelog from git shortlog
# TODO: Currently manual
#. tx noise:
cd torbutton.git/trans_tools/po
torsocks svn up
torsocks tx pull -a
cd ..
./ | less
torsocks ./
cd ..
git diff .
git commit .
#. Tag the release:
git tag -u -s ${VERSION}
torsocks git push origin-push --tags
#. Create the .xpi
cd /tmp/
torsocks git clone git:// torbutton-release
cd torbutton-release
git tag -v ${VERSION} # verify signature against git protocol haaAAXXXX
git checkout -b tag-${VERSION} ${VERSION}
mkdir ./pkg
#. SHA1 + Sign the .xpi
gpg -abs ./pkg/torbutton-${VERSION}.xpi
sha1sum ./pkg/torbutton-${VERSION}.xpi
#. Upload .xpi to website
chmod 664 ./pkg/torbutton-${VERSION}.xpi*
torsocks scp ./pkg/torbutton-${VERSION}.xpi* vescum:/srv/
torsocks scp ./pkg/torbutton-${VERSION}.xpi vescum:/srv/
torsocks scp ./pkg/torbutton-${VERSION}.xpi.asc vescum:/srv/
#. Update update-unsigned.rdf in torbutton.git with package sha1
cd torbutton.git
vim update-unsigned.rdf # Add <li> and <description> w/ sha1 and version
#. Sign the new update-unsigned.rdf.
# Key creation based on these instructions:
# Command line:
# Gui:
# TODO: Process currently manual due to offline signing.
# No need to fear the reaper, man. We can do online signing if we just put
# our minds to it:
# Special note: I was unable to update an already signed
# copy of the update.rdf for a new release. We probably need to
# keep the unsigned version around as input? See the root directory
# of the torbutton.git for a copy.
./mccoy-cli.x86/mccoy -profile ./.mozilla/mccoy/*.default/ -signRDF update-unsigned.rdf -key Torbutton
# Copy the signed update.rdf into place in the website svn
#. Update update.rdf
cd website-svn
vim ./include/versions.wmi # Add sha1 and version
cp /mnt/update-signed.rdf ./torbutton/update.rdf
#. Update website
torsocks svn up .
torsocks svn commit .
torsocks ssh vescum "/home/mirroradm/bin/trigger-mirrors"
#. Test firefox autoupdate
# Wait for mirrors to sync first.. Pester phobos/weasel/helix/Sebastian for
# website push + dist chown + mirror update.
# TODO: Currently manual
#. Announce on tor-talk
# FIXME: May need eventual minor improvements
echo "Troll food." | mail -s "Feed the trolls"
content torbutton chrome/content/
overlay chrome://browser/content/browser.xul chrome://torbutton/content/torbutton.xul
overlay chrome://browser/content/preferences/connection.xul chrome://torbutton/content/pref-connection.xul
overlay chrome://messenger/content/messenger.xul chrome://torbutton/content/torbutton_tb.xul
overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://torbutton/content/torbutton_tb.xul
overlay about:addons chrome://torbutton/content/torbutton-extensions.xul
overlay chrome://mozapps/content/extensions/extensions.xul chrome://torbutton/content/torbutton-extensions.xul
resource torbutton ./
resource torbutton-assets resource://torbutton/chrome/skin/ contentaccessible=yes
# browser branding
override chrome://branding/locale/brand.dtd chrome://torbutton/locale/brand.dtd
override chrome://branding/locale/ chrome://torbutton/locale/
overlay chrome://browser/content/aboutDialog.xul chrome://torbutton/content/aboutDialog.xul
# UI customization
overlay chrome://browser/content/browser.xul chrome://torbutton/content/menu-items-overlay.xul
overlay chrome://browser/content/browser.xul chrome://torbutton/content/menu-overlay.xul
overlay chrome://browser/content/browser.xul chrome://torbutton/content/tor-circuit-display.xul
# Strings for the about:tbupdate page
override chrome://browser/locale/aboutTBUpdate.dtd chrome://torbutton/locale/aboutTBUpdate.dtd
// # Security Settings User Interface for Mobile
// Utilities
let { utils: Cu } = Components;
let { getBoolPref, getIntPref, setBoolPref, setIntPref, getCharPref } =
Cu.import("resource://gre/modules/Services.jsm", {}).Services.prefs;
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { getBoolPref, getIntPref, setBoolPref, setIntPref, getCharPref }
= Services.prefs;
let { getLocale, show_torbrowser_manual } =
Cu.import("resource://torbutton/modules/utils.js", {});
ChromeUtils.import("resource://torbutton/modules/utils.js", {});
// Description elements have the follow names.
const descNames =
......@@ -64,7 +64,7 @@ function torbutton_set_learn_more_links() {
locale = getLocale();
let links = => document.getElementById(name));
links.forEach(link => {;
links.forEach(link => {
if (show_manual && locale != "") {
link.href= "https:/" + locale +
......@@ -26,18 +26,17 @@ let createTorCircuitDisplay = (function () {
"use strict";
// Mozilla utilities
const { Cu : utils , Ci : interfaces } = Components.utils;
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
// Import the controller code.
let { controller } = Cu.import("resource://torbutton/modules/tor-control-port.js", {});
let { controller } = ChromeUtils.import("resource://torbutton/modules/tor-control-port.js", {});
// Utility functions
let { bindPrefAndInit, observe, getLocale, getDomainForBrowser } = Cu.import("resource://torbutton/modules/utils.js", {});
let { bindPrefAndInit, observe, getLocale, getDomainForBrowser } = ChromeUtils.import("resource://torbutton/modules/utils.js", {});
// Make the TorButton logger available.
let logger = Cc[";1"]
// ## Circuit/stream credentials and node monitoring
......@@ -209,18 +208,13 @@ let uiString = function (shortName) {
return torbuttonBundle.GetStringFromName("torbutton.circuit_display." + shortName);
// __regionBundle__.
// A list of localized region (country) names.
let regionBundle = Services.strings.createBundle(
// __localizedCountryNameFromCode(countryCode)__.
// Convert a country code to a localized country name.
// Example: `'de'` -> `'Deutschland'` in German locale.
let localizedCountryNameFromCode = function (countryCode) {
if (!countryCode) return uiString("unknown_country");
try {
return regionBundle.GetStringFromName(countryCode.toLowerCase());
return Services.intl.getRegionDisplayNames(undefined, [countryCode])[0];
} catch (e) {
return countryCode.toUpperCase();
......@@ -363,7 +357,7 @@ let setupGuardNote = function () {
["div", {},
noteBefore, ["span", {class: "circuit-guard-name"}, name],
noteAfter, " ",
["span", {onclick: `gBrowser.selectedTab = gBrowser.addTab('${localeCode}/tbb/tbb-2/');`,
["span", {onclick: `gBrowser.selectedTab = gBrowser.addTab('${localeCode}/tbb/tbb-2/', {triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()});`,
class: "circuit-link"},
......@@ -3,8 +3,9 @@
// code directly. I don't see any of them as essential for 1506,
// really.
var m_tb_torlog = Components.classes[";1"]
// let { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm", {});
var m_tb_torlog = Cc[";1"]
var m_tb_string_bundle = torbutton_get_stringbundle();
......@@ -28,10 +29,8 @@ function torbutton_get_prefbranch(branch_name) {
var o_branch = false;
torbutton_log(1, "called get_prefbranch()");
o_prefs = Components.classes[";1"]
if (!o_prefs)
o_prefs = Services.prefs;
if (!o_prefs) {
torbutton_log(5, "Failed to get preferences-service!");
return false;
......@@ -52,8 +51,7 @@ function torbutton_get_stringbundle()
var o_stringbundle = false;
try {
var oBundle = Components.classes[";1"]
var oBundle = Services.strings;
o_stringbundle = oBundle.createBundle("chrome://torbutton/locale/");
} catch(err) {
o_stringbundle = false;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment