1[paths]
2sbws_home = ~/.sbws
3datadir = ${sbws_home}/datadir
4v3bw_dname = ${sbws_home}/v3bw
5# The latest bandwidth file is atomically symlinked to
6# V3BandwidthsFile ${v3bw_dname}/latest.v3bw
7v3bw_fname = ${v3bw_dname}/{}.v3bw
8state_fname = ${sbws_home}/state.dat
9log_dname = ${sbws_home}/log
10
11[destinations]
12# How often to check if a destional is usable
13usability_test_interval = 300
14
15[general]
16# Days into the past that measurements are considered valid
17data_period = 5
18# Timeout in seconds to give to the python Requests library. It MUST be a
19# single float. Requests will use it both as the connect() timeout and the
20# timeout between bytes received from the server. See
21# http://docs.python-requests.org/en/master/user/advanced/#timeouts
22http_timeout = 10
23# Timeout in seconds for waiting on a circuit to be built. It MUST be an
24# **int**. We will use this both as the CircuitBuildTimeout and a timeout
25# to give to stem for waiting on a circuit to be built since
26# CircuitBuildTimeout doesn't handle the case of a TLS connection to a relay
27# taking forever, and probably other not-yet-discovered cases.
28circuit_timeout = 60
29# Whether or not to reset the bandwidth measurements when the relay's IP
30# address changes. If it changes, we only consider results for the relay that
31# we obtained while the relay was located at its most recent IP address.
32# This is NOT implemented for IPv6.
33reset_bw_ipv4_changes = off
34reset_bw_ipv6_changes = off
35
36[scanner]
37# A human-readable string with chars in a-zA-Z0-9 to identify your scanner
38nickname = IDidntEditTheSBWSConfig
39# ISO 3166-1 alpha-2 country code. To be edited.
40# Default to a non existing country to detect it was not edited.
41country = AA
42# Limits on what download times are too fast/slow/etc.
43download_toofast = 1
44download_min = 5
45download_target = 6
46download_max = 10
47# How many RTT measurements to make
48num_rtts = 0
49# Number of downloads with acceptable times we must have for a relay before
50# moving on
51num_downloads = 5
52# The number of bytes to initially request from the server
53initial_read_request = 16384
54# How many measurements to make in parallel
55measurement_threads = 3
56# Minimum number of bytes we should ever try to download in a measurement
57min_download_size = 1
58# Maximum number of bytes we should ever try to download in a measurement
59# 1073741824 == 1 GiB
60max_download_size = 1073741824
61
62[tor]
63datadir = ${paths:sbws_home}/tor
64run_dpath = ${datadir}
65control_socket = ${tor:run_dpath}/control
66pid = ${tor:run_dpath}/tor.pid
67# note this is a directory
68log = ${tor:datadir}/log
69external_control_port =
70extra_lines =
71
72[cleanup]
73# After this many days, compress data files
74# #40017: To generate files as Torflow the result files must be kept for
75# GENERATE_PERIOD seconds.
76# The number of days after they are compressed or deleted could be added
77# as defaults (currently globals.py), and just as a factor of GENERATE_PERIOD.
78data_files_compress_after_days = 29
79# After this many days, delete data files.
80# 57 == 28 * 2 + 1.
81data_files_delete_after_days = 57
82# After this many days, compress v3bw files (1d)
83v3bw_files_compress_after_days = 1
84# After this many days, delete v3bw files (7d)
85v3bw_files_delete_after_days = 7
86
87[relayprioritizer]
88# Whether or not to measure authorities
89measure_authorities = off
90# The target fraction of best priority relays we would like to return.
91# 0.05 is 5%. In a 7000 relay network, 5% is 350 relays.
92#
93# In a network of ~6500 relays and with a ResultDump containing 1 result per
94# relay, the best_priority() function takes ~11 seconds to complete on my
95# home desktop. Using this parameter allows us to balance between calling
96# best_priority() more often (but wasting more CPU), and calling it less
97# often (but taking longer to get back to relays with non-successful results).
98#
99# Alternatively, we could rewrite best_priority() to not suck so much.
100fraction_relays = 0.05
101# The minimum number of best priority relays we are willing to return
102min_relays = 50
103
104[logging]
105# Whether or not to log to a rotating file the directory paths.log_dname
106to_file = yes
107# Whether or not to log to stdout
108to_stdout = yes
109# Whether or not to log to syslog
110# NOTE that when sbws is launched by systemd, stdout goes to journal and
111# syslog.
112to_syslog = no
113# If logging to file, how large (in bytes) should the file be allowed to get
114# before rotating to a new one. 10485760 is 10 MiB. If zero or number of
115# backups is zero, never rotate the log file.
116to_file_max_bytes = 10485760
117# If logging to file, how many backups to keep. If zero or max bytes is zero,
118# never rotate the log file.
119to_file_num_backups = 50
120# Level to log at. Debug, info, warning, error, critical.
121# `level` must be set to the lower of all the handler levels.
122level = info
123to_file_level = info
124to_stdout_level = info
125to_syslog_level = info
126# Format string to use when logging
127format = %(asctime)s %(module)s[%(process)s]: <%(levelname)s> (%(threadName)s) %(message)s
128to_stdout_format = ${format}
129to_syslog_format = %(module)s[%(process)s]: <%(levelname)s> %(message)s
130# verbose formatter useful for debugging
131to_file_format = %(asctime)s %(levelname)s (%(threadName)s) %(filename)s:%(lineno)s - %(funcName)s - %(message)s
132