| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The guard manager is responsible for handing out the first hops of
tor circuits, keeping track of their successes and failures, and
remembering their states. Given that, it makes sense to store this
information here. It is not yet used; I'll be fixing that in
upcoming commits.
Arguably, this information no longer belongs in the directory
manager: I've added a todo about moving it.
This commit will break compilation on its own in a couple of places;
subsequent commits will fix it up.
|
| |\
| |
| |
| |
| | |
Remove allow(clippy::disallowed_methods) lint flag.
See merge request tpo/core/arti!437
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The various background daemon tasks that `arti-client` used to spawn are
now handled inside their respective crates instead, with functions
provided to spawn them that return `TaskHandle`s.
This required introducing a new trait, `NetDirProvider`, which steals
some functionality from the `DirProvider` trait to enable `tor-circmgr`
to depend on it (`tor-circmgr` is a dependency of `tor-dirmgr`, so it
can't depend on `DirProvider` directly).
While we're at it, we also make some of the tasks wait for events from
the `NetDirProvider` instead of sleeping, slightly increasing
efficiency.
|
| |\
| |
| |
| |
| |
| |
| | |
Don't use SystemTime::now()
Closes #306
See merge request tpo/core/arti!365
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
implement IsolationHelper for StreamIsolation
See merge request tpo/core/arti!434
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
arti-client, dirmgr: Initial DirFilter code
See merge request tpo/core/arti!431
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There are two reasons why the DynFilter newtype might be needed:
1. To impl Default. But we don't need it to impl Default since we can
have an accessor which does the defaulting.
2. To hide the API. But this is usrely an unstable API.
Just writing Arc<dyn> gets rid of a lot of unnecessary boilerplate and
conversion code.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Abolish the handwritten Debug impl for DynFilter, which is no longer
needed.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This will make it possible to implement a directory-munging
mechanism in arti-testing for #397.
|
| | |/ /
| | |
| | |
| | |
| | |
| | | |
This code sits behind a feature flag, and can be used to modify
directories before storing them. This is part of the implementation
for #397.
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Implement a periodic task scheduler, and a basic dormant mode
See merge request tpo/core/arti!429
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a revised version of !397; it implements a scheduling system for
periodic tasks that can be externally controlled, and then uses the
external control aspect to implement a basic dormant mode (#90).
More technically, the scheduling system consists of a `Stream` that
periodic tasks are expected to embed in a `while` loop or similar, a
way for tasks themselves to choose how long to wait until the stream
next yields a result, and a handle to control this outside of the task.
|
| |/ /
| |
| |
| | |
Fixes #314, #418.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of requiring a `Box<dyn Isolation>`, it now takes either a
`Box<dyn Isolation>`, or an arbitrary `T` that implements
`Isolation`.
This API still allows the user to pass in a `Box<dyn Isolation>` if
that's what they have, but it doesn't require them to Box the
isolation on their own.
Part of #414.
|
| |\ \
| | |
| | |
| | |
| | | |
new api for isolation
See merge request tpo/core/arti!377
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
it seems I added conditional compilation without noticing it??
and there was some errors when choosing a prefered runtime depending on
feature flags
|
| | | | |
|
| | | |
| | |
| | |
| | | |
this also removes JoinResult
|
| | | | |
|
| | | | |
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Absolish builders for CircMgrConfig and DirMgrConfig
See merge request tpo/core/arti!417
|
| | | |
| | |
| | |
| | | |
See rationale in the comment.
|
| | | |
| | |
| | |
| | | |
See commentary for the rationale.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now we use NetParams. That implies making its constructor public,
which I think it fine.
This is related to #413 but is far from completing that ticket.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This handwritten conversion function omitted a field. There was
nothing to spot this mistake.
IMO this shows why these particular types ought not to use builders,
but instead, should cause API breaks when things change.
Adding this line here to explicitly fix the bug, although we are about
to abolish this function completely almost right away.
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| | |
This has the different syntax for builder field attributes than what I
originally proposed in my MR, and which therefore is in the pinned
branch.
My upstream MR for the field attributes feature was morged:
https://github.com/colin-kiegel/rust-derive-builder/issues/239
|
| | | |
|
| | |
| |
| |
| | |
Replace all uses of our copy of this code.
|
| | | |
|
| | |
| |
| |
| | |
As per #371
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace the recapitulation of TorClientConfig fields in ArtiConfig and
instead just have it contain one. This is part of #374.
The conversions from ArtiConfig back to ArtiConfigBuilder and
TorClientConfigBuilder would need to change, but, since we don't want
them anyway,
No longer impl Deserialize for ArtiConfig. (As per #371 this will
want to become a private type.)
No longer impl From<ArtiConfig> for ArtiConfigBuilder and
TorClientConfigBuilder. And abolish tests of that code.
(This all has to be in one commit, because previously
ArtiConfig::tor_client_config used the validated-to-builder config
retcon.)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I used
git-grep -P '\#\[serde\((?!default|deny_unknown)'
to find places where I needed to add additional attributes on the
builder method fields.
This is currently a bit duplicative, but when #371 is completely done,
the validated (non-builder) configs won't need to be Deserialize any
more.
This is part of #371 and #372.
|
| |\ \
| | |
| | |
| | |
| | | |
Replace many manual trait impls with use of educe
See merge request tpo/core/arti!375
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Code motion and the minimal mechanical changes.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/375#note_2783078
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously they returned an Arc, which wasn't necessary unless the
client actually _wanted_ a new Arc.
This would be an API break, except that these functions are marked
'experimental-api', so semver does not apply; nonetheless I've noted
the break in semver_status.md, just in case we care.
Closes #369
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Alternative DirProvider setup
See merge request tpo/core/arti!347
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Put it behind experimental_api.
|