Please sign in to comment.
Fix broken download of Tor exit relays.
The periodic download of Tor exit relays was broken for a number of reasons. Here's what we're doing to fix this issue: 1. We're moving the proxies variable outside of state. The problem is that the state object is written to disk and reloaded every 30 minutes (a cron job is triggering this reload by running ~/bridgedb-admin/reload-bridgedb). The reload causes state.proxies to be at a different memory address than before the reload, which breaks the looping call that fetches new exit relays every three hours. This looping call expects to write exit relays to the same memory address each time, but after BridgeDB's first reload, the memory address changed, so exit relays are no longer updated. There's no need to keep our proxies in BridgeDB's state. We fetch them continuously anyway, and also right after BridgeDB starts. 2. We're adding the method replaceExitRelays(). Once we have a new batch of exit relay addresses, this method allows us to completely overwrite the past batch. 3. We're adding the argument "setStdout=False" to the call to startLogging() because otherwise we're missing the download script's output.
- Loading branch information
Showing with 17 additions and 7 deletions.