aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src/bridge/relay.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-linkspec: Change HasAddrs::addrs to return an IteratorIan Jackson2025-10-061-5/+3
| | | | | | | | This will let us model the actual structure of routerstatus entries in netdocs more closely. They don't have the addresses in a single list. When this code was written this would have been much more awkward, but now we have RPITIT.
* Bridges: deduplicate addresses.Nick Mathewson2023-07-131-0/+2
| | | | | Currently we list an address for a bridge twice if it is listed both in the bridge line and the bridge descriptor. That can't be right.
* Use bool::then_some() as appropriateNick Mathewson2023-04-111-1/+1
| | | | | | Now that we require a version of Rust that allows `b.then_some(v)`, clippy complains about our use of `b.then(|| v)`.
* Rename for_circuit_usage => as_relay_with_descNick Mathewson2022-11-301-1/+1
|
* Remove TODO to rename for_circuit_usage in favor of #623Nick Mathewson2022-11-101-1/+0
|
* Resolve todo!()s and TODOs around BridgeRelay::HasAddrs.Nick Mathewson2022-11-101-15/+35
| | | | | | | Also, add a bunch of reminders around these implementations that `HasAddrs` returns all the address associated with you for GeoIp or family purposes, even if they are _not_ ones that we should actually contact you at.
* GuardMgr: Change BridgeSet, BridgeRelay to use more referencesNick Mathewson2022-11-081-11/+12
| | | | | | | 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.
* guardmgr: Implement Universe for bridges.Nick Mathewson2022-11-021-0/+5
| | | | | Now we can use a group of bridges as the basis for a sample of guards.
* struct BridgeConfig: Rename from BridgeIan Jackson2022-10-121-2/+2
| | | | Fixes #599
* Change multiplicity of ChannelMethod and addressesNick Mathewson2022-10-111-5/+5
| | | | | | | Now each `ChanTarget` has at most one `ChannelMethod`, and only `Direct` `ChannelMethods` can have multiple addresses. Closes #600.
* Begin revising HasAddr and its relationship to ChanTargetNick Mathewson2022-10-061-1/+15
| | | | | | | | | | | | | | | | | | | HasAddr used to mean "Here are addresses that I have, at which I can be contacted." But "Where (and how) can I be contacted?" is now a question for HasChannelMethod to answer. (We still need to have "HasAddr", though, so we can answer things like "what country is this relay in" and "are these relays in the same /8?") So this commit introduces: * A new trait for adding an implementation of HasChannelMethod in terms of HasAddr. * A requirement on ChanTarget that it needs to implement HasChannelMethod. There is some temporary breakage here, marked with "TODO pt-client", that I'll fix later in this branch.
* Extend some comments about bridge descriptorsNick Mathewson2022-10-061-2/+7
|
* Add a temporary HasAddrs for BridgeRelayNick Mathewson2022-10-041-1/+10
| | | | See comment for an explanation of the next issue here.
* BridgeRelay: Implement more traits.Nick Mathewson2022-10-041-1/+56
| | | | | | Also add a BridgeRelayWithDesc type (name tbd) to guarantee that a bridge relay really does have a known descriptor before you try to build a circuit with it.
* Start on a new BridgeRelay type.Nick Mathewson2022-10-041-0/+38
This is the one we'll actually use to connect to bridges. It has a `Bridge` line, and an optional `BridgeDesc`. Maybe this will turn into a `BridgeRelay<'a>` by analogy to `Relay` some time; I'm not sure.