summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src/sample
Commit message (Collapse)AuthorAgeFilesLines
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* Fix typosDimitris Apostolou2024-09-031-1/+1
|
* Remove temporary functions in CheckedRelay.Nick Mathewson2024-03-281-2/+2
|
* Remove temporary functions in UncheckedRelay.Nick Mathewson2024-03-281-1/+2
|
* guardmgr: explain remaining work for #504 issues.Nick Mathewson2024-03-121-2/+4
|
* guardmgr: refactor most logic for relay selectionNick Mathewson2024-03-121-26/+30
|
* Mark code with "TODO #504" and "TODO #789".Nick Mathewson2024-02-221-0/+3
| | | | | | | | I've done this by looking for every non-test instance of pick_relays or pick_n_relays, and for every non-test usage of any non-ID-related method on Relay or UncheckedRelay. Part of #504.
* Add and use "UncheckedRelay::is_suitable_as_guard"Nick Mathewson2024-02-201-1/+1
|
* Require that guards are Fast and Stable.Nick Mathewson2024-02-201-2/+5
| | | | | | This matches the behavior of C tor. Part of #1100.
* 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`.