aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src/bridge/descs.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'rd-fingerprint' into 'main'Clara Engler2026-05-131-2/+18
|\ | | | | | | | | Store fingerprint in Option<SpFingerprint> See merge request tpo/core/arti!3978
| * tor-netdoc: Return copy in RouterDesc::rsa_identity()Clara Engler2026-05-121-2/+18
| | | | | | | | | | | | | | | | | | | | | | This change might seem pointless for now but it will be required and unavoidable later on, because we will have to change RouterDesc::fingerprint from RsaIdentity to Option<SpFingerprint> which will make it impossible to be used inside the getter anymore. With this change, our only resort is to obtain the RSA identity from the signing key but we can only return a copy then because that RSA identity is created ad-hoc then.
* | Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-1/+1
|/ | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* tor-guardmgr: Port to web_time_compat.Nick Mathewson2026-03-261-3/+3
|
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* GuardMgr: Treat Guards as sensitive and Bridges as redacted.Nick Mathewson2022-11-281-0/+2
| | | | | 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.
* BridgeConfig: Replace all Arc<BridgeConfig> with BridgeConfigIan Jackson2022-11-221-5/+2
| | | | BridgeConfig is itself an Arc now, so these are redundant.
* Allow a subset-only ChanMethod match when looking up a BridgeConfigNick Mathewson2022-11-151-1/+5
| | | | | | | | | If we have a bridge guard that is using Direct connection and it knows multiple addresses, our code to match it with a BridgeConfig is wrong, because the BridgeConfig has only one address, and our code looks for an exact match. Fixes #642.
* GuardMgr: Update desired bridge descs from 'update' function.Nick Mathewson2022-11-141-1/+1
| | | | | There are some new TODOs here for us to think about, but I think this will give us something to test.
* GuardMgr: Explain why we timestamp BridgeSets as we do.Nick Mathewson2022-11-101-8/+7
|
* GuardMgr Document why a BridgeSet has trivial weight thresholds.Nick Mathewson2022-11-101-0/+4
| | | | | | This is the only way I could find in which parameter interpretation differs between bridge guards and relay guards; with it documented, I can remove a TODO about identifying such ways.
* GuardMgr: Docs for BridgeDescProviderNick Mathewson2022-11-081-2/+12
|
* GuardMgr: Remove a TODO pt-client comment.Nick Mathewson2022-11-081-2/+0
| | | | | The BridgeSet type does not necessarily need further changes... and if it gets them, it won't be because of this comment.
* Merge branch 'store' into 'main'Nick Mathewson2022-11-081-2/+2
|\ | | | | | | | | | | | | Persistently cache bridge descriptors Closes #619 See merge request tpo/core/arti!831
| * bridge descs: Rename BridgeDescMgr from BridgeDescManagerIan Jackson2022-11-081-2/+2
| | | | | | | | | | | | This is more consistent with our naming elsewhere. Suggested-by: Nick Mathewson <[email protected]>
* | GuardMgr: Remove no-longer-relevant `TODO pt-client` commentsNick Mathewson2022-11-081-1/+0
| | | | | | | | | | Also remove a bunch of now-unnecessary `allow(dead_code)` annotations.
* | GuardMgr: Spelling fixes and normalizations.Nick Mathewson2022-11-081-2/+2
| |
* | GuardMgr: When possible, return a FirstHop that can be a CircTargetNick Mathewson2022-11-081-1/+1
| | | | | | | | | | | | We do this by checking the FirstHops we're about to return, and when they correspond to bridges, looking up an appropriate BridgeRelay in the current BridgeSet (if we can).
* | GuardMgr: Refactor UniverseRef to contains Arcs.Nick Mathewson2022-11-081-8/+8
| | | | | | | | | | | | 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: Change BridgeSet, BridgeRelay to use more referencesNick Mathewson2022-11-081-18/+15
| | | | | | | | | | | | | | This will match our needs better and help avoid some `Arc<>`s. It will be especially helpful for avoiding `Arc`s we don't actually have.
* | Require Send+Sync for BridgeDescProviderNick Mathewson2022-11-081-1/+1
| | | | | | | | We require these for NetDirProvider, so this shouldn't be a big reach.
* | bridge desc: Make BridgeDescProvider DynCloneIan Jackson2022-11-071-1/+3
|/ | | | | This allows the use of Box<dyn BridgeDescProvider> in callers, since Box<dyn BridgeDescProvider> is now Clone.
* Refactor CandidateStatus API to simplify code in descs.Nick Mathewson2022-11-021-26/+31
| | | | This removes some duplication.
* guardmgr: Refactor candidate info; add `full_dir_info`Nick Mathewson2022-11-021-5/+12
| | | | | | | 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: Implement Universe for bridges.Nick Mathewson2022-11-021-1/+155
| | | | | Now we can use a group of bridges as the basis for a sample of guards.
* BridgeDescProvider: Make BridgeDescEvent repr(u16) and derive traitsIan Jackson2022-10-271-1/+6
| | | | This will enable us to impl FlagEvent for it.
* BridgeDescEvent: Change the sole variant to SomethingChangedIan Jackson2022-10-251-5/+17
| | | | And explain what this all means.
* tor-guardmgr: descs: Make BridgeDescError DynCloneIan Jackson2022-10-211-1/+4
|
* tor-guardmgr: descs: Make BridgeDescError into a traitIan Jackson2022-10-211-4/+15
|
* bridge descriptors: Change types of the descriptor cacheIan Jackson2022-10-201-3/+12
| | | | | | | Now keyed by Arc<BridgeConfig>, and the values can be errors. Currently there is no implementation so there can't be any errors, but the error enum will become nonempty.
* Extend some comments about bridge descriptorsNick Mathewson2022-10-061-0/+4
|
* Implement BridgeDesc and BridgeDescList.Nick Mathewson2022-10-041-58/+41
| | | | | | | | | | BridgeDesc is a separate type to make sure that we do not confuse bridges' descriptors with the descriptors from other routers down the road. (Bridges' descriptors need to be used differently, and treated as more private.) With this code, BridgerDescList is now just an alias for `ByRelayIds<BridgeDesc>`, which is pretty keen.
* GuardMgr/DirMgr: Add APIs for bridge descriptor listsNick Mathewson2022-09-261-0/+97