summaryrefslogtreecommitdiff
path: root/tor-circmgr/src/path/dirpath.rs
Commit message (Collapse)AuthorAgeFilesLines
* more improvements to circmgr tests.Nick Mathewson2021-06-161-1/+2
|
* More tests on circmgr::path.Nick Mathewson2021-06-161-1/+2
|
* circmgr: tests for path/dirpath.rsNick Mathewson2021-06-161-0/+68
|
* Enormous tor-circmgr rewrite.Nick Mathewson2021-06-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As with the tor-chanmgr code, the circuit manager is now implemented using an AbstractCircMgr type that uses traits to abstract the particular behavior of other types that it uses. (Specifically: circuits, building circuits, and telling whether one circuit usage is compatible with another.) Abstracting out the dependencies in this ways makes it possible to test the circuit manager without having to actually build real circuits. This commit also introduces new behavior for handling pending circuit requests. Upon getting a new request, first we check to see if there's an existing circuit we can use. If there isn't, we look for pending circuits and wait for them. If there aren't any pending circuits we can use, we launch one or more, and wait for them. So far, that's the same as the old behavior. But here's a change: if, while we are waiting for some pending circuits, a different circuit is completed, and it's one we could use, then the task that was building _that_ circuit will tell us: "please look at this circuit". This gives us better changes of getting a usable circuit fast. Minor changes: * The Error type in CircMgr no longer uses anyhow; several errors have been simplified. * We've gotten more formal about the relationship between circuit usage and target usage.
* Refactor TorPath code to have explicit constructors.Alexander Færøy2021-05-201-2/+2
| | | | | | | | | This patch refactors the internal representation of the TorPath type to use an enum for representing its state. We add explicit constructor methods to create the different types of path's, such that client users can write code that uses different paths based on their need. This work was done together with Nick as part of the Arti hackathon.
* Enforce (and obey) clippy lints about exhaustive enums, structs.Nick Mathewson2021-04-271-0/+1
| | | | | | | | These lints force us to declare our exported enums and exhaustive-looking structs as non-exhaustive (so that we can add to them in the future without breaking our API) or to explicitly disable the warning for a given enum/struct (to say that we _intend_ for additions to be a breaking change).
* Make authorities and fallbacks configurable.Nick Mathewson2021-02-111-1/+3
| | | | | | | | | | This commit adds configuration options for these values, with the right defaults, and uses those options instead of built-in functions to set them. We also remove the function to extract information from chutney directories: now that arti is configurable, it can be chutney's job to make its own network configurations.
* Mark some XXXX issues as XXXX-A1.Nick Mathewson2020-12-071-1/+0
|
* Implement correct (?) weighting for path selection.Nick Mathewson2020-12-021-3/+2
|
* Add support for using fallback directories in path constructionNick Mathewson2020-11-191-14/+25
| | | | | | This is mainly a refactoring commit, with a little new code. It also adds #[derive(Copy,Clone)] for a few types.
* Use anyhow in tor-circmgr and tor-chanmgrNick Mathewson2020-11-111-3/+1
|
* Document tor-circmgrNick Mathewson2020-11-021-0/+4
|
* Implement rudimentary circuit-manager functionalityNick Mathewson2020-11-021-1/+1
| | | | | This code is meant to "get or launch a circuit as appropriate." It's super dodgy, but it is probably good enough for a first pass.
* Add a new circuit-manager crate and move path selection there.Nick Mathewson2020-11-021-0/+30