[Pkg-privacy-commits] [torbrowser-launcher] 06/07: add patch for 797339 as debian patch…
Holger Levsen
holger at moszumanska.debian.org
Tue Mar 1 16:05:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch debian/proposed
in repository torbrowser-launcher.
commit e19db1f22524062c278422e82f9a74b2e70c9b04
Author: Holger Levsen <holger at layer-acht.org>
Date: Tue Mar 1 16:06:50 2016 +0100
add patch for 797339 as debian patch…
---
...e-socks4-port-configurable.-Closes-797339.patch | 78 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 79 insertions(+)
diff --git a/debian/patches/0004-make-socks4-port-configurable.-Closes-797339.patch b/debian/patches/0004-make-socks4-port-configurable.-Closes-797339.patch
new file mode 100644
index 0000000..701e2cc
--- /dev/null
+++ b/debian/patches/0004-make-socks4-port-configurable.-Closes-797339.patch
@@ -0,0 +1,78 @@
+From 41b1e9b5c22653b0d0bd281accbb15421daaa10b Mon Sep 17 00:00:00 2001
+From: Holger Levsen <holger at layer-acht.org>
+Date: Tue, 1 Mar 2016 13:08:39 +0100
+Subject: [PATCH] make socks4 port configurable. (Closes: #797339)
+
+Thanks to Michael Gold <michael at bitplane.org> for the original patch
+---
+ torbrowser_launcher/common.py | 1 +
+ torbrowser_launcher/launcher.py | 4 ++--
+ torbrowser_launcher/settings.py | 16 ++++++++++++++++
+ 3 files changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py
+index 1eddb54..531067d 100644
+--- a/torbrowser_launcher/common.py
++++ b/torbrowser_launcher/common.py
+@@ -194,6 +194,7 @@ class Common:
+ 'installed': False,
+ 'download_over_tor': False,
+ 'modem_sound': False,
++ 'tor_socks_address': 'tcp:127.0.0.1:9050',
+ 'mirror': self.default_mirror
+ }
+
+diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
+index 1f2dadd..9049cd9 100644
+--- a/torbrowser_launcher/launcher.py
++++ b/torbrowser_launcher/launcher.py
+@@ -408,10 +408,10 @@ class Launcher:
+ self.refresh_gtk()
+
+ if self.common.settings['download_over_tor']:
+- from twisted.internet.endpoints import TCP4ClientEndpoint
++ from twisted.internet.endpoints import clientFromString
+ from txsocksx.http import SOCKS5Agent
+
+- torEndpoint = TCP4ClientEndpoint(reactor, '127.0.0.1', 9050)
++ torEndpoint = clientFromString(reactor, self.common.settings['tor_socks_address'])
+
+ # default mirror gets certificate pinning, only for requests that use the mirror
+ if self.common.settings['mirror'] == self.common.default_mirror and '{0}' in url:
+diff --git a/torbrowser_launcher/settings.py b/torbrowser_launcher/settings.py
+index 57b8e32..7c782df 100644
+--- a/torbrowser_launcher/settings.py
++++ b/torbrowser_launcher/settings.py
+@@ -101,6 +101,21 @@ class Settings:
+ self.modem_checkbox.set_tooltip_text(_("This option requires python-pygame to be installed"))
+ self.modem_checkbox.show()
+
++ # Tor SOCKS address
++ self.tor_addr_box = gtk.HBox(False, 10)
++ self.settings_box.pack_start(self.tor_addr_box, True, True, 0)
++ self.tor_addr_box.show()
++
++ self.tor_addr_label = gtk.Label(_('Tor server'))
++ self.tor_addr_label.set_line_wrap(True)
++ self.tor_addr_box.pack_start(self.tor_addr_label, True, True, 0)
++ self.tor_addr_label.show()
++
++ self.tor_addr = gtk.Entry()
++ self.tor_addr.set_text(self.common.settings['tor_socks_address'])
++ self.tor_addr_box.pack_start(self.tor_addr, True, True, 0)
++ self.tor_addr.show()
++
+ # status
+ if(self.common.settings['installed']):
+ self.status_label = gtk.Label(_('Status: Installed'))
+@@ -212,6 +227,7 @@ class Settings:
+ # checkbox options
+ self.common.settings['download_over_tor'] = self.tor_download_checkbox.get_active()
+ self.common.settings['modem_sound'] = self.modem_checkbox.get_active()
++ self.common.settings['tor_socks_address'] = self.tor_addr.get_text()
+
+ # figure out the selected mirror
+ self.common.settings['mirror'] = self.common.mirrors[self.mirrors.get_active()]
+--
+2.7.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 85ba638..604392b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
Include-local-overrides-file-in-AppArmor-profiles.-C.patch
Set-torbrowser.start-tor-browser-and-usr.bin.torbrow.patch
0003-fix-apparmor-profile-to-support-self-upgrade.patch
+0004-make-socks4-port-configurable.-Closes-797339.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbrowser-launcher.git
More information about the Pkg-privacy-commits
mailing list