commit bf82257246e4a8159ba6577ee3d7a602bc19d93b Author: Sukhbir Singh sukhbir@torproject.org Date: Mon Mar 23 09:27:28 2015 +0530
Add TorBirdy patch for Tor Mail bundle --- projects/torbirdy/build | 1 + projects/torbirdy/config | 2 + projects/torbirdy/tormailbundle.patch | 74 +++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+)
diff --git a/projects/torbirdy/build b/projects/torbirdy/build index ea0756a..303de4b 100644 --- a/projects/torbirdy/build +++ b/projects/torbirdy/build @@ -2,6 +2,7 @@ set -e tar xvf [% project %]-[% c('version') %].tar.gz cd [% project %]-[% c('version') %] +patch -p1 < ../tormailbundle.patch make make-xpi cd .. mv -f torbirdy-[% c("version") %].xpi [% dest_dir _ '/' _ c('filename') %] diff --git a/projects/torbirdy/config b/projects/torbirdy/config index db8a70b..990f215 100644 --- a/projects/torbirdy/config +++ b/projects/torbirdy/config @@ -3,3 +3,5 @@ filename: 'torbirdy-[% c("version") %].xpi' version: 0.1.4 git_hash: 4cdded42ca5c6f900c893a8b3d27c50ce6854eac git_url: https://git.torproject.org/torbirdy.git +input_files: + - filename: tormailbundle.patch diff --git a/projects/torbirdy/tormailbundle.patch b/projects/torbirdy/tormailbundle.patch new file mode 100644 index 0000000..66aa96e --- /dev/null +++ b/projects/torbirdy/tormailbundle.patch @@ -0,0 +1,74 @@ +diff --git a/chrome/content/preferences.js b/chrome/content/preferences.js +index 1359f63..d163e2f 100644 +--- a/chrome/content/preferences.js ++++ b/chrome/content/preferences.js +@@ -25,7 +25,7 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() { + + pub.setDefaultPrefs = function() { + pub.prefs.setCharPref("network.proxy.socks", "127.0.0.1"); +- pub.prefs.setIntPref("network.proxy.socks_port", 9150); ++ pub.prefs.setIntPref("network.proxy.socks_port", 9154); + pub.prefs.clearUserPref("network.proxy.http"); + pub.prefs.clearUserPref("network.proxy.http_port"); + pub.prefs.clearUserPref("network.proxy.ssl"); +@@ -494,7 +494,7 @@ if (!org.torbirdy.prefs) org.torbirdy.prefs = new function() { + // Tor. + if (anonService === 0) { + pub.socksHost.value = '127.0.0.1'; +- pub.socksPort.value = '9150'; ++ pub.socksPort.value = '9154'; + } + + // JonDo/Whonix. +diff --git a/components/torbirdy.js b/components/torbirdy.js +index 5867f98..bc3ddf3 100644 +--- a/components/torbirdy.js ++++ b/components/torbirdy.js +@@ -43,7 +43,7 @@ const TorBirdyPrefs = { + + // Configure Thunderbird to use the SOCKS5 proxy. + "network.proxy.socks": "127.0.0.1", +- "network.proxy.socks_port": 9150, ++ "network.proxy.socks_port": 9154, + "network.proxy.socks_version": 5, + + // Set DNS proxying through SOCKS5. +@@ -340,7 +340,6 @@ function TorBirdy() { + this.setAccountPrefs(); + this.setPrefs(); + +- dump("TorBirdy registered!\n"); + } + + TorBirdy.prototype = { +@@ -357,7 +356,6 @@ TorBirdy.prototype = { + + onUninstalling: function(addon, needsRestart) { + if (addon.id == TB_ID) { +- dump("Nooo! TorBirdy uninstall requested\n"); + this._uninstall = true; + this.resetUserPrefs(); + } +@@ -365,7 +363,6 @@ TorBirdy.prototype = { + + onOperationCancelled: function(addon) { + if (addon.id == TB_ID) { +- dump("Uninstall requested cancelled. Yayay!\n"); + this._uninstall = false; + this.setPrefs(); + } +@@ -376,14 +373,12 @@ TorBirdy.prototype = { + }, + + resetUserPrefs: function() { +- dump("Resetting user preferences to default\n"); + // Clear the Thunderbird preferences we changed. + for (var each in TorBirdyPrefs) { + this.prefs.clearUserPref(each); + } + + // Restore the older proxy preferences that were set prior to TorBirdy's install. +- dump("Restoring proxy settings\n"); + for (var i = 0; i < TorBirdyOldPrefs.length; i++) { + var oldPref = TorBirdyOldPrefs[i]; + var setValue = kRestoreBranch + oldPref;
tor-commits@lists.torproject.org