summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src/sample
Commit message (Collapse)AuthorAgeFilesLines
* GuardMgr: Treat Guards as sensitive and Bridges as redacted.Nick Mathewson2022-11-281-0/+4
| | | | | This machinery is a bit inelegant, but it is all confined to be within the GuardMgr crate, so IMO it should be fine for now.
* GuardMgr: Explain why we timestamp BridgeSets as we do.Nick Mathewson2022-11-101-2/+5
|
* GuardMgr: Spelling fixes and normalizations.Nick Mathewson2022-11-081-1/+1
|
* GuardMgr: Refactor UniverseRef to contains Arcs.Nick Mathewson2022-11-081-5/+5
| | | | | | We already _have_ these Arc<>s whenever we construct a UniverseRef, so there's no real point in using &refs and making these so hard to construct.
* GuardMgr: Pass correct universe to "Bridges" `GuardSet`.Nick Mathewson2022-11-081-0/+65
| | | | | | This can probably be done in a simpler way, but for the moment I would prefer to try to minimize the amount of code I'm changing here.
* Refactor CandidateStatus API to simplify code in descs.Nick Mathewson2022-11-021-4/+4
| | | | This removes some duplication.
* GuardMgr: Fix and improve comments based on review.Nick Mathewson2022-11-021-2/+2
|
* guardmgr: Refactor candidate info; add `full_dir_info`Nick Mathewson2022-11-021-14/+26
| | | | | | | Previously we always set `dir_info_missing` to `false` for new guards, since new guards could only be taken from ones that were present in the NetDir. But for bridges, we don't download their info until _after_ we have chosen them as guards.
* guardmgr: Universe API should look up by ChanTargetNick Mathewson2022-11-021-11/+10
| | | | This will be necessary for bridges.
* guardmgr: take sampled guards from Universe.Nick Mathewson2022-11-021-2/+105
| | | | This is a trickier case, since we have to deal with weights.
* guardmgr: Begin to decouple guards from NetDir.Nick Mathewson2022-11-021-0/+72
In this and the upcoming commits I'll be changing how guards related to `NetDir` and to `Relay`. Previously, a guard could only come from (or be updated from) a `Relay` in a `NetDir`. Soon it will be able to be built from a bridge as well. To do this, I'm defining a `Universe` trait (name negotiable) that represents a set of things that may be guards. I'm going to continue extending its functionality until there are no more methods in guard.rs or sample.rs that take `NetDir`. This commit removes most of the usage of `NetDir` and `Relay` in `guard.rs`.