When looking for a Tor to use, prefer (in this order): Tor Browser, Tor Messenger, system Tor (fixes #215)

This commit is contained in:
Micah Lee 2015-11-20 12:43:08 -08:00
parent 52205be7fe
commit 35c1c9cbcb

View File

@ -63,7 +63,7 @@ class HS(object):
# connect to the tor controlport # connect to the tor controlport
self.c = None self.c = None
ports = [9051, 9151] ports = [9151, 9153, 9051]
for port in ports: for port in ports:
try: try:
self.c = Controller.from_port(port=port) self.c = Controller.from_port(port=port)
@ -150,7 +150,7 @@ class HS(object):
urllib2.urlopen('http://{0:s}'.format(onion_host)) urllib2.urlopen('http://{0:s}'.format(onion_host))
else: else:
tor_exists = False tor_exists = False
ports = [9050, 9150] ports = [9150, 9152, 9050]
for port in ports: for port in ports:
try: try:
s = socks.socksocket() s = socks.socksocket()