summaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/usage.rs
Commit message (Collapse)AuthorAgeFilesLines
* Allow configurability on preemptive circuitsNeel Chauhan2021-12-071-5/+8
|
* Merge remote-tracking branch 'origin/mr/154'Nick Mathewson2021-11-301-4/+77
|\
| * Add tests & address review commentaryeta2021-11-301-15/+28
| |
| * Actually build preemptive circuits (and minor fixes)eta2021-11-291-0/+7
| | | | | | | | | | | | The new CircMgr::build_circuits_preemptively function actually causes preemptive circuits to be built; it gets called from arti-client, like the other daemon tasks the CircMgr has.
| * Introduce PreemptiveCircuitPredictor and TargetCircUsage::Preemptiveeta2021-11-231-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for making Arti build circuits preemptively, this commit introduces `TargetCircUsage::Preemptive`, a circuit usage that works somewhat differently from other ones: it requires at least 2 circuits to exist that can exit the port it contains in order for an existing circuit to match against it (path-spec.txt § 2.1.1); if that's not the case, that usage will require building new circuits (in order that we build enough to have 2 available). This required refactoring how circuit reuse worked; now, `CircList::find_open` uses the new `AbstractSpec::find_supported` trait method, which we customize to implement the above check in the case of `Preemptive` circuit usages. To make that work, `OpenEntry` now takes two type parameters (the spec and circuit types), instead of taking a builder type parameter and using its associated types. (We also got rid of type constraints on that struct, yay!) A WIP implementation of a preemptive circuit predictor that implements path-spec.txt § 2.1.1 is also included, but this will require additional effort to wire it up with the `CircMgr` properly.
* | tor-circmgr: Write a test for BadExit support.Neel Chauhan2021-11-291-6/+20
|/
* Fix typosDimitris Apostolou2021-11-121-1/+1
|
* tor-circmgr: testing for NoUsage and TimeoutTesting usageNick Mathewson2021-11-021-0/+24
| | | | This doesn't add much to coverage, but it's important.
* tor-circmgr: tests for netwoks with no exitsNick Mathewson2021-11-021-25/+45
|
* tor-circmgr::usage: Add a few more tests.Nick Mathewson2021-11-021-2/+66
|
* Improve docs of more (potentially re-exported) arti-client typeseta2021-10-291-3/+37
| | | | | | | | | | | | | | | | | | | | | Most of the structs in `arti-client` have example code now, to give a clearer idea of how they're used. Annoyingly, a lot of the types exposed in `arti-client` are actually re-exports, which makes documentation a bit harder: example code that references other parts of `arti-client` can't actually be run as a doctest, since the crate it's in is a dependency of `arti-client`. We might be able to fix this in future by doing the documentation in `arti-client` itself, but rustdoc seems to have some weird behaviours there that need to be investigated first (for example, it seems to merge the re-export and original documentation, and also put the re-export documentation on the `impl` block for some reason). For now, though, this commit just writes the docs from the point of view of an `arti-client` consumer, removing notes specific to the crate in which they're defined. It's not ideal, but at least the end user experience is decent.
* Turn StreamIsolation into a separate type.Nick Mathewson2021-10-251-33/+88
| | | | | | | | | Now that we have two kinds of isolation tokens (those set on a stream, and those set by the stream's associated TorClient), we need a more sophisticated kind of isolation. This fixes the bug introduced with the previous commit, where per-stream tokens would override per-TorClient tokens.
* Replace references to arti-client in the documentation.Nick Mathewson2021-10-211-2/+2
|
* Implement guards for multihop paths.Nick Mathewson2021-10-131-5/+5
| | | | There are some limitations here, as noted in the comments.
* Actually select guards for directory circuits.Nick Mathewson2021-10-131-2/+2
|
* Pass the guard manager down to the path selection functions.Nick Mathewson2021-10-111-5/+10
|
* WIPNick Mathewson2021-10-111-5/+7
|
* Integrate GuardUsability and GuardMonitor into CircuitBuilder.Nick Mathewson2021-10-101-7/+14
| | | | | | (When we're building a path with a guard, we need to tell the guard manager whether the path succeeded, and we need to wait to hear whether the guard is usable.)
* Re-export configuration types from tor-client.Nick Mathewson2021-10-091-0/+5
|
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-0/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+487
This will cause some pain for now, but now is really the best time to do this kind of thing.