[tor-commits] [ooni-probe/master] Use our TrueHeaders version of the SOCKS5Agent in oonibclient

art at torproject.org art at torproject.org
Wed Nov 6 09:12:44 UTC 2013


commit d9a1be184d80899cd981103f653ec2802c88a364
Author: aagbsn <aagbsn at extc.org>
Date:   Thu Oct 10 14:07:22 2013 +0000

    Use our TrueHeaders version of the SOCKS5Agent in oonibclient
---
 ooni/oonibclient.py |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ooni/oonibclient.py b/ooni/oonibclient.py
index f05c5e7..889dcd9 100644
--- a/ooni/oonibclient.py
+++ b/ooni/oonibclient.py
@@ -6,13 +6,12 @@ from hashlib import sha256
 from twisted.internet import defer, reactor
 from twisted.internet.endpoints import TCP4ClientEndpoint
 
-from txsocksx.http import SOCKS5Agent
-
 from ooni.deck import Deck, InputFile
 from ooni import errors as e
 from ooni.settings import config
 from ooni.utils import log
 from ooni.utils.net import BodyReceiver, StringProducer, Downloader
+from ooni.utils.trueheaders import TrueHeadersSOCKS5Agent
 
 class Collector(object):
     def __init__(self, address):
@@ -48,7 +47,7 @@ class OONIBClient(object):
     def __init__(self, address):
         if address.startswith('httpo://'):
             self.address = address.replace('httpo://', 'http://')
-            self.agent = SOCKS5Agent(reactor,
+            self.agent = TrueHeadersSOCKS5Agent(reactor,
                 proxyEndpoint=TCP4ClientEndpoint(reactor, '127.0.0.1',
                     config.tor.socks_port))
 





More information about the tor-commits mailing list