| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
It just duplicates TorPath::build_circuit, which is all you actually
need.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This would have saved ahf and me a lot of confusion in debugging a
situation where we were cloning a reference of a type that didn't
implement Clone.
|
| | |
|
| | |
|
| |
|
|
| |
(Squashed from typed-netdir-params)
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This is a somewhat obnoxious change in its scope and requirements,
but it makes it easier to understand what the real public and
private parts of our APIs are.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Rust 1.52 just came out, and there are new clippy lints to deal
with:
* It spots more cases when we could use Option::map
* It spots more cases when we could use Iterator::flatten
* When we build a struct instance, it wants us to list the fields
in the same order that the struct declares them.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Important refactoring happened recently which broke the
"experimental-api" feature.
Fixes are quite simple.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
| |
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).
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is a big change, but it is a step towards our goal of removing
tor_rtcompat:: calls directly.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
Public function so an application can use to build a circuit using a
custom path.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
| |
The major types are:
* You implemented Into when you should have implemented From.
* You sliced a slice when you didn't have to.
* You said Ok(x?) when you could have said x.
* You said Vec::new(); push(); push(); when you could have said vec![].
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|