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:
https://www.torproject.org/projects/torbrowser/design/
Also have a look at this page for already answered questions:
https://trac.torproject.org/projects/tor/wiki/org/teams/CommunityTeam/Support_discuss
For other issues you should know about have a look at this blog post:
https://blog.torproject.org/toggle-or-not-toggle-end-torbutton
For a list of all torbutton announcements see
https://blog.torproject.org/category/tags/torbutton
To build an XPI that is suitable for Babelzilla, do the following:
patch -p0 < no-english.diff
chmod +x makexpi.sh
./makexpi.sh
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: https://svn.torproject.org/svn/translation/trunk/documentation/howto.txt
cd torbutton.git/trans_tools/po
torsocks svn up
torsocks tx pull -a
cd ..
./validate_all.sh | less
torsocks ./new_tb_strings.sh
./mkmoz.sh
./mvmoz.sh
cd ..
git diff .
git commit .
#. Tag the release:
git tag -u mikeperry@fscked.org -s ${VERSION}
torsocks git push origin-push --tags
#. Create the .xpi
cd /tmp/
torsocks git clone git://git.torproject.org/git/torbutton.git torbutton-release
cd torbutton-release
git tag -v ${VERSION} # verify signature against git protocol haaAAXXXX
git checkout -b tag-${VERSION} ${VERSION}
mkdir ./pkg
sh makexpi.sh
#. 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/www-master.torproject.org/htdocs/dist/torbutton/
torsocks scp ./pkg/torbutton-${VERSION}.xpi vescum:/srv/www-master.torproject.org/htdocs/dist/torbutton/torbutton-current.xpi
torsocks scp ./pkg/torbutton-${VERSION}.xpi.asc vescum:/srv/www-master.torproject.org/htdocs/dist/torbutton/torbutton-current.xpi.asc
#. 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: http://blog.techno-barje.fr/post/2009/10/08/How-to-setup-a-mozilla-extension-update-server/
# Gui: https://www.binaryturf.com/steps-release-extension-firefox-3/
# 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: https://trac.torproject.org/projects/tor/ticket/6011
# 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 tor-talk@lists.torproject.org -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/brand.properties chrome://torbutton/locale/brand.properties
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 = linkNames.map(name => document.getElementById(name));
links.forEach(link => {;
links.forEach(link => {
if (show_manual && locale != "") {
link.href= "https:/tb-manual.torproject.org/" + locale +
"/security-slider.html";
......
......@@ -26,18 +26,17 @@ let createTorCircuitDisplay = (function () {
"use strict";
// Mozilla utilities
const { Cu : utils , Ci : interfaces } = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
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["@torproject.org/torbutton-logger;1"]
.getService(Components.interfaces.nsISupports).wrappedJSObject;
.getService(Ci.nsISupports).wrappedJSObject;
// ## 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(
"chrome://global/locale/regionNames.properties");
// __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('https://support.torproject.org/${localeCode}/tbb/tbb-2/');`,
["span", {onclick: `gBrowser.selectedTab = gBrowser.addTab('https://support.torproject.org/${localeCode}/tbb/tbb-2/', {triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()});`,
class: "circuit-link"},
learnMoreString]]);
};
......
......@@ -3,8 +3,9 @@
// code directly. I don't see any of them as essential for 1506,
// really.
var m_tb_torlog = Components.classes["@torproject.org/torbutton-logger;1"]
.getService(Components.interfaces.nsISupports).wrappedJSObject;
// let { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm", {});
var m_tb_torlog = Cc["@torproject.org/torbutton-logger;1"]
.getService(Ci.nsISupports).wrappedJSObject;
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["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
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["@mozilla.org/intl/stringbundle;1"]
.getService(Components.interfaces.nsIStringBundleService);
var oBundle = Services.strings;
o_stringbundle = oBundle.createBundle("chrome://torbutton/locale/torbutton.properties");
} 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