| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
The old name was unwieldy and other crates can just as well name it by
the crate scope.
|
| |
|
|
|
|
| |
Now
cargo +stable clippy --locked --offline --workspace --all-targets
is clean.
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1071/diffs?commit_id=580fe1118dbbbfa086d11b28e3e26d7c91afe21c#fbd7ab2d6d0a5b515697d4f9f99a42ebd508aa4b_153_165
|
| |
|
|
|
| |
Obviously this still doesn't work because the actual impl in hsclient
is just a todo!().
|
| | |
|
| |
|
|
|
|
|
|
| |
We have a theory about how this ought to work, so it's noit an API
usage error - it's an unimplemented feature.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1060#note_2884757
|
| |
|
|
| |
And add some clarity and todos about address errors.
|
| |
|
|
| |
Provide an explicit From impl isntead.
|
| |
|
|
|
|
|
| |
Now, a Host has a separate variant for `.onion` which is always used,
even when HS is disabled.
Currently it ends in a todo!.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Change ErrorHint so that, internally, it just holds an enum with a
lightweight reference to whatever parts of the error it needs to
generate a hint. Then we can move the formatting logic into a
Display function for ErrorHint, and do away with ErrorDetail entirely.
|
| |
|
|
|
|
|
| |
Move the "hint" function into Error, and use Option rather than Result.
(I'm using Option here because it's not really an error case not to have
a hint; we just either have a hint, or we don't.)
|
| | |
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This makes a `pt_state` directory inside .local/share/arti (or the
local equivalent), right next to our existing `state` dir.
Ideally we would use a separate directory for each PT, but we have a
very fuzzy "what is a specific PT" notion.
Closes #667
|
| |
|
|
|
|
|
|
| |
If support is available at compile-time, then we construct a PtMgr
and register it with the ChanMgr. We keep a handle to it ourself so
that we can reconfigure it as needed.
Closes #659.
|
| | |
|
| |
|
|
|
|
|
| |
Having this done within circmgr was irregular - most of our other key
buildup functions are done in TorClient::create_inner.
It is also inconvenient, as it buries the guardmgr within the circmgr.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This allows us to give better errors in the case where bootstrapping
succeeds at first, but fails thereafter for long enough to make our
directory expire.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
We're going to want this in a moment.
|
| |
|
|
|
|
|
|
|
| |
According to doc/Errors.md, and in keeping with current best
practices, we should not include display an error's `source()` as
part of that error's display method. Instead, we should let the
caller decide to call source() and display that error in turn.
Part of #323.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |\
| |
| |
| |
| | |
Alternative DirProvider setup
See merge request tpo/core/arti!347
|
| | |
| |
| |
| | |
Put it behind experimental_api.
|
| |/
|
|
|
| |
It auto-converts to ErrorDetail but add this for convenience of
callers which don't want to look into that unstable API.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes how the `TorClient` type works, enabling it to be
constructed synchronously without initiating the bootstrapping process.
Daemon tasks are still started on construction (although some of them
won't do anything if the client isn't bootstrapped).
The old bootstrap() methods are now reimplemented in terms of the new
create_unbootstrapped() and bootstrap_existing() methods.
This required refactoring how the `DirMgr` works to enable the same sort
of thing there.
closes #293
|
| |
|
|
|
|
|
|
| |
Instead of declaring a macro that takes vis as an argument, we now
conditionally declare a macro that applies an appropriate visibility.
There's a long comment explaining the rationale here, along with a
couple of other solutions that don't work.
|
| |
|
|
|
|
|
| |
This is closer to common usage.
(Not that we all agree with common usage, but it's closer to what
people expect.)
|
| |
|
|
|
|
|
| |
This is closer to what we described in Errors.md.
Also, remove the (sometimes private) Result alias: it was only used in
one or two places, and never exposed in public.
|
| |
|
|
|
|
| |
This change lets us make TorError's members unconditionally hidden,
and makes our API a little more consistent (since basically nothing
else is a public field).
|
| | |
|
| |
|
|
|
| |
(By our convention, these errors should say what we were trying to
spawn when the error occurred.)
|
| |
|
|
|
|
|
|
|
|
|
| |
At least by default, we should have Error be private, and not expose
it as part of our APIs.
To keep functionality in `arti`, I had to add an `ExitTimeout` error
kind.
For interface consistency, I also re-exported ErrorKind and HasError
from `arti_client`.
|
| |
|
|
|
| |
I had planned to use assert_impl, but that can't check for
the 'static lifetime.
|
| |
|
|
|
| |
This patch makes only minimal changes in lower-level error types:
we have more refactoring to do.
|
| | |
|