[tor-commits] [ooni-probe/master] Updated ooniprobe.conf with the default_timeout setting for general maximum
isis at torproject.org
isis at torproject.org
Tue Dec 18 05:53:46 UTC 2012
commit a07df95df0c79b989098e898b95f8d86ae2615ae
Author: Isis Lovecruft <isis at torproject.org>
Date: Thu Dec 13 19:50:00 2012 +0000
Updated ooniprobe.conf with the default_timeout setting for general maximum
connection timeout, and changed the old 'checktimeout' to be
'default_timeout'.
---
ooni/reporter.py | 14 ++++++--------
ooniprobe.conf.sample | 9 +++++----
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/ooni/reporter.py b/ooni/reporter.py
index 37cf9d1..89a62ba 100644
--- a/ooni/reporter.py
+++ b/ooni/reporter.py
@@ -121,15 +121,13 @@ def getTestDetails(options):
config.privacy.includecountry or \
config.privacy.includecity:
log.msg("Running geoIP lookup via check.torproject.org")
- if config.privacy.checktimeout is not None and \
- isinstance(config.privacy.checktimeout, int):
- my_ip_timeout = config.privacy.checktimeout
+ if config.advanced.default_timeout is not None and \
+ isinstance(config.advanced.default_timeout, int):
+ my_ip_timeout = float(config.advanced.default_timeout)
else:
- log.debug(
- "reporter.getTestDetails(): bad config.privacy.checktimeout %s"
- % str(config.privacy.checktimeout)
- )
- my_ip_timeout = 15
+ log.debug("getTestDetails(): bad config: default_timeout %s"
+ % str(config.advanced.default_timeout))
+ my_ip_timeout = float(120)
client_ip = yield geodata.myIP(connectTimeout=my_ip_timeout)
client_location = geodata.IPToLocation(client_ip)
else:
diff --git a/ooniprobe.conf.sample b/ooniprobe.conf.sample
index 67da610..2d6ef47 100644
--- a/ooniprobe.conf.sample
+++ b/ooniprobe.conf.sample
@@ -17,13 +17,14 @@ privacy:
# Should we collect a full packet capture on the client?
includepcap: false
advanced:
- # XXX change this to point to the directory where you have stored the GeoIP
- # database file. This should be the directory in which OONI is installed
- # /path/to/ooni-probe/data/
+ # XXX change this to point to the directory where you have stored the
+ # GeoIP database file. This should be the directory in which OONI is
+ # installed /path/to/ooni-probe/data/
geoip_data_dir: /usr/share/GeoIP/
+ # Should we display debug messages:
debug: true
# How many seconds should we wait for connections before timing out?:
- checktimeout: 15
+ default_timeout: 30
# Location where Tor is installed:
tor_binary: '/usr/sbin/tor'
# For auto detection
More information about the tor-commits
mailing list