commit 02a36dbcaa673df90a485030b26f7a61c9a8a9a4 Author: juga0 juga@riseup.net Date: Sat Jun 15 14:16:51 2019 +0000
fix: globals: Fetch descriptors early
and useless descriptors, so that sbws detect early changes in the relay descriptors and continue downloading them even when Tor is idle.
Closes: #30733. Bugfix v0.2.0. --- sbws/globals.py | 8 ++++++++ sbws/lib/relaylist.py | 1 + 2 files changed, 9 insertions(+)
diff --git a/sbws/globals.py b/sbws/globals.py index e9fd8dd..1b34730 100644 --- a/sbws/globals.py +++ b/sbws/globals.py @@ -36,6 +36,14 @@ TORRC_STARTING_POINT = { 'SafeLogging': '0', 'LogTimeGranularity': '1', 'ProtocolWarnings': '1', + # To be able to responde to MaxAdvertisedBandwidth as soon as possible. + # If ``FetchDirInfoExtraEarly` is set, but not + # `FetchDirInfoEarly`, Tor will throw this error: + # `FetchDirInfoExtraEarly requires that you also set FetchDirInfoEarly` + 'FetchDirInfoEarly': '1', + 'FetchDirInfoExtraEarly': '1', + # To make Tor keep fetching descriptors, even when idle. + 'FetchUselessDescriptors': '1' } # Options that need to be set at runtime. TORRC_RUNTIME_OPTIONS = { diff --git a/sbws/lib/relaylist.py b/sbws/lib/relaylist.py index 1fc650a..6ddf44a 100644 --- a/sbws/lib/relaylist.py +++ b/sbws/lib/relaylist.py @@ -289,6 +289,7 @@ class Relay: self.relay_recent_priority_list_count += 1
+ class RelayList: ''' Keeps a list of all relays in the current Tor network and updates it transparently in the background. Provides useful interfaces for getting
tor-commits@lists.torproject.org