[Pkg-privacy-commits] [tor-monitor] 02/39: Add support for SOCKS proxy to download descriptors

Sascha Steinbiss sascha-guest at moszumanska.debian.org
Tue Aug 25 18:00:42 UTC 2015


This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to branch master
in repository tor-monitor.

commit 3e9b81f3ae829cd5c711f61e11ba316a33fd8fca
Author: Tails developers <tails at boum.org>
Date:   Thu Feb 12 15:12:22 2015 +0000

    Add support for SOCKS proxy to download descriptors
    
    This allows to run from within Tails.
---
 README     | 5 +++--
 tormonitor | 5 +++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/README b/README
index 7cd4ecc..ee230be 100644
--- a/README
+++ b/README
@@ -5,13 +5,14 @@ Dependencies
 ============
 
 Tor Monitor depends on python (>= 2.7), python-gi (>= 1.42), python-stem
-(>= 1.2.2), Gtk GIR (>= 3.14), GLib GIR (>= 1.42).
+(>= 1.2.2), python-pysocks (>= 1.5), Gtk GIR (>= 3.14), GLib GIR (>= 1.42).
 
 It recommends pycountry (>= 1.8).
 
 On Debian system (>= 8.0), these can be installed with:
 
-    apt-get install python-gi python-stem python-pycountry gir1.2-gtk-3.0 gir1.2-glib-2.0
+    apt-get install python-gi python-stem python-pycountry python-pysocks \
+         gir1.2-gtk-3.0 gir1.2-glib-2.0
 
 Installation
 ============
diff --git a/tormonitor b/tormonitor
index 94c972c..bbe418e 100755
--- a/tormonitor
+++ b/tormonitor
@@ -20,6 +20,7 @@ import datetime
 import gettext
 import logging
 import os
+import socket
 import threading
 import sys
 
@@ -33,6 +34,8 @@ import stem.connection
 import stem.control
 import stem.descriptor.remote
 
+import socks
+
 from gi.repository import (GLib,
                            GObject,
                            Gtk)
@@ -419,6 +422,8 @@ class TorMonitorApplication(Gtk.Application):
 
         # Initialise the downloader in the background
         self._downloader = None
+        socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)
+        socket.socket = socks.socksocket
         self._downloader_thread = threading.Thread(target=self.create_downloader)
         self._downloader_thread.start()
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tor-monitor.git



More information about the Pkg-privacy-commits mailing list