config.default.ini 4.78 KB
Newer Older
1
[paths]
juga's avatar
juga committed
2
sbws_home = ~/.sbws
3
datadir = ${sbws_home}/datadir
4
v3bw_dname = ${sbws_home}/v3bw
5
6
# The latest bandwidth file is atomically symlinked to
# V3BandwidthsFile ${v3bw_dname}/latest.v3bw
7
v3bw_fname = ${v3bw_dname}/{}.v3bw
8
state_fname = ${sbws_home}/state.dat
9
log_dname = ${sbws_home}/log
10

11
[destinations]
12
13
# How often to check if a destional is usable
usability_test_interval = 300
14

15
16
17
[general]
# Days into the past that measurements are considered valid
data_period = 5
Matt Traudt's avatar
Matt Traudt committed
18
19
20
21
22
# Timeout in seconds to give to the python Requests library. It MUST be a
# single float. Requests will use it both as the connect() timeout and the
# timeout between bytes received from the server. See
# http://docs.python-requests.org/en/master/user/advanced/#timeouts
http_timeout = 10
23
24
25
26
27
# Timeout in seconds for waiting on a circuit to be built. It MUST be an
# **int**. We will use this both as the CircuitBuildTimeout and a timeout
# to give to stem for waiting on a circuit to be built since
# CircuitBuildTimeout doesn't handle the case of a TLS connection to a relay
# taking forever, and probably other not-yet-discovered cases.
28
circuit_timeout = 60
Matt Traudt's avatar
Matt Traudt committed
29
30
31
32
# Whether or not to reset the bandwidth measurements when the relay's IP
# address changes. If it changes, we only consider results for the relay that
# we obtained while the relay was located at its most recent IP address.
# This is NOT implemented for IPv6.
33
reset_bw_ipv4_changes = off
34
reset_bw_ipv6_changes = off
35

Matt Traudt's avatar
Matt Traudt committed
36
[scanner]
37
38
# A human-readable string with chars in a-zA-Z0-9 to identify your scanner
nickname = IDidntEditTheSBWSConfig
39
40
41
# ISO 3166-1 alpha-2 country code. To be edited.
# Default to a non existing country to detect it was not edited.
country = AA
42
43
44
45
46
# Limits on what download times are too fast/slow/etc.
download_toofast = 1
download_min = 5
download_target = 6
download_max = 10
47
# How many RTT measurements to make
juga's avatar
juga committed
48
num_rtts = 0
49
50
51
52
53
54
55
# Number of downloads with acceptable times we must have for a relay before
# moving on
num_downloads = 5
# The number of bytes to initially request from the server
initial_read_request = 16384
# How many measurements to make in parallel
measurement_threads = 3
56
57
58
59
60
# Minimum number of bytes we should ever try to download in a measurement
min_download_size = 1
# Maximum number of bytes we should ever try to download in a measurement
# 1073741824 == 1 GiB
max_download_size = 1073741824
61
62

[tor]
Matt Traudt's avatar
Matt Traudt committed
63
datadir = ${paths:sbws_home}/tor
64
run_dpath = ${datadir}
juga's avatar
juga committed
65
66
67
68
control_socket = ${tor:run_dpath}/control
pid = ${tor:run_dpath}/tor.pid
# note this is a directory
log = ${tor:datadir}/log
69
external_control_port =
70
extra_lines =
71
72
73

[cleanup]
# After this many days, compress data files
Matt Traudt's avatar
Matt Traudt committed
74
data_files_compress_after_days = 10
75
# After this many days, delete data files
Matt Traudt's avatar
Matt Traudt committed
76
data_files_delete_after_days = 90
77
78
79
80
# After this many days, compress v3bw files (1d)
v3bw_files_compress_after_days = 1
# After this many days, delete v3bw files (7d)
v3bw_files_delete_after_days = 7
81
82

[relayprioritizer]
83
84
# Whether or not to measure authorities
measure_authorities = off
85
86
87
88
89
90
91
92
93
94
95
96
97
# The target fraction of best priority relays we would like to return.
# 0.05 is 5%. In a 7000 relay network, 5% is 350 relays.
#
# In a network of ~6500 relays and with a ResultDump containing 1 result per
# relay, the best_priority() function takes ~11 seconds to complete on my
# home desktop. Using this parameter allows us to balance between calling
# best_priority() more often (but wasting more CPU), and calling it less
# often (but taking longer to get back to relays with non-successful results).
#
# Alternatively, we could rewrite best_priority() to not suck so much.
fraction_relays = 0.05
# The minimum number of best priority relays we are willing to return
min_relays = 50
98
99
100

[logging]
# Whether or not to log to a rotating file the directory paths.log_dname
101
to_file = yes
102
# Whether or not to log to stdout
juga's avatar
juga committed
103
to_stdout = yes
juga's avatar
juga committed
104
# Whether or not to log to syslog
105
106
# NOTE that when sbws is launched by systemd, stdout goes to journal and
# syslog.
juga's avatar
juga committed
107
to_syslog = no
108
109
110
111
112
113
114
# If logging to file, how large (in bytes) should the file be allowed to get
# before rotating to a new one. 10485760 is 10 MiB. If zero or number of
# backups is zero, never rotate the log file.
to_file_max_bytes = 10485760
# If logging to file, how many backups to keep. If zero or max bytes is zero,
# never rotate the log file.
to_file_num_backups = 50
Matt Traudt's avatar
Matt Traudt committed
115
# Level to log at. Debug, info, warning, error, critical.
116
117
# `level` must be set to the lower of all the handler levels.
level = debug
118
to_file_level = debug
119
120
to_stdout_level = info
to_syslog_level = info
121
# Format string to use when logging
juga's avatar
juga committed
122
format = %(asctime)s %(module)s[%(process)s]: <%(levelname)s> %(message)s
Matt Traudt's avatar
Matt Traudt committed
123
to_stdout_format = ${format}
juga's avatar
juga committed
124
to_syslog_format = %(module)s[%(process)s]: <%(levelname)s> %(message)s
Matt Traudt's avatar
Matt Traudt committed
125
# verbose formatter useful for debugging
126
to_file_format = %(asctime)s %(levelname)s %(threadName)s %(filename)s:%(lineno)s - %(funcName)s - %(message)s