summaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/path.rs
Commit message (Collapse)AuthorAgeFilesLines
* circmgr: downgrade TODO pt-client commentsNick Mathewson2022-11-081-3/+3
| | | | These are structure-internal things we can solve later, if ever.
* circmgr: More NOTEs and TODO pt-clients.Nick Mathewson2022-10-241-3/+9
|
* Circmgr: construct paths using either Relay or OwnedCircTargetNick Mathewson2022-10-241-10/+77
| | | | | | | | | | | Previously we could only use Relay for this case, which won't work any more: a Bridge is not a `tor_netdir::Relay`. Instead we allow the GuardMgr to give us something that knows how to convert itself into an OwnedCircTarget. This change required a far amount of follow-on revisions and refactoring, but it should all be internal to the path-building logic.
* Introduce HasRelayIds::same_relay_ids.Nick Mathewson2022-08-021-3/+3
| | | | | This method tells if two HasRelayIds contain exactly the same set of Relay identities, and is generally useful for debugging.
* tor-linkspec: Refactor out traits to represent a relay's ID set.Nick Mathewson2022-08-021-1/+1
| | | | | | | | | | | | | | We want the set of identities supported by a relay to be extensible in the future with minimal fuss; we'd also like to make working with these ID sets more convenient. To handle that, this commit adds a new trait for "Something that has the same IDs as a relay" and a new object for "an owned representation of a relay's IDs." This commit introduces a similar trait for "Something with a list of SocketAddr, like a relay has." There's no owned equivelent for that, since Vec<SocketAddr> is already a thing. Closes #428.
* squash! Bump every crate's edition to 2021.Nick Mathewson2022-04-251-3/+0
| | | | | Remove all `use` statements for `TryFrom` and `TryInto`. These are now redundant in Rust 2021.
* circmgr: Use guard-manager's view of the fallbacks when possible.Nick Mathewson2022-03-301-0/+12
| | | | | | | | | | | | | | | | | | If we're building a path with the guard manager involved, we now ask the guard manager to pick our first hop no matter what. We only pick from the fallback list ourselves if we're using the API with no guard manager. This causes some follow-on changes where we have to remember an OwnedChanTarget object in a TorPath we've built, and where we gain the ability to say we're building a path "from nothing extra at all." Those are all internal to the crate, though. Closes #220, by making sure that we use our guards to get a fresh netdir (if we can) before falling back to any fallbacks, even if our consensus is old. Compilation should be fixed in the next commit.
* Move fallback.rs into guardmgr.Nick Mathewson2022-03-301-1/+2
| | | | | | | This is the logical place for it, I think: the GuardMgr's job is to pick the first hop for a circuit depending on remembered status for possible first hops. Making this change will let us streamline the code that interacts with these objects.
* impl Debug for various internal typesIan Jackson2022-02-251-1/+1
| | | | | | | | I wanted this while debugging something. The ad-hoc impl Debug with f.debug_struct is getting repetitive and I've already perpetrated one copy-paste mistake. We should consider using something like the `educe` crate's Clone.
* Add kinds for *most* circmgr errors.Nick Mathewson2022-02-161-2/+3
| | | | There are a couple of tricky ones I'll do separately.
* add semicolons if nothing returnedDaniel Eades2021-11-251-1/+1
|
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-0/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+152
This will cause some pain for now, but now is really the best time to do this kind of thing.