| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | |
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
arti: create TorClient first, then bootstrap.
Closes #336
See merge request tpo/core/arti!320
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This change is possible now that #293 is done.
As an immediate benefit, it allows us to start monitoring the
configuration files immediately, and not only after we're done
bootstrapping the client.
Closes #336.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fix typos
See merge request tpo/core/arti!326
|
| | | |/ / /
| |/| | | |
|
| |\ \ \ \ \
| |/ / / /
|/| | / /
| | |/ /
| |/| | |
Re-enable clippy::ptr_arg where it had been disabled.
See merge request tpo/core/arti!323
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In one of the two places, nightly no longer warns. In the other
place, it's fine for nightly to warn: I just fixed the code to take
a slice instead.
Partial revert of 856aca879151c622512bc4b15c6307808fc83e82.
Resolves part of #310.
|
| |\ \ \ \
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | | |
arti-client: add ability to automatically bootstrap
Closes #278
See merge request tpo/core/arti!322
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new `BootstrapBehavior` enum controls whether an unbootstrapped
`TorClient` will bootstrap itself automatically (`Ondemand`) when an
attempt is made to use it, or whether the user must perform
bootstrapping themselves (`Manual`).
The `lazy-init` example shows how you could write a simple
`get_tor_client()` function that used a global `OnceCell` to share
a Tor client across an entire application with this API.
closes arti#278
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Implement HasKind for tor-chanmgr::Error
See merge request tpo/core/arti!324
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
(There will be a folowup to work on internal errors here.)
|
| |\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
Simplify tor-netdir::Error by a *lot*
See merge request tpo/core/arti!319
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
There's no reason to have the test-network-construction code share an
error enum with the main netdir code.
|
| | |/ /
| | |
| | |
| | |
| | | |
This turns out to have been most of them, which
simplifies matters a lot.
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
tor-cell and tor-proto: provide HasKind.
See merge request tpo/core/arti!304
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This took some refactoring, and gave an opportunity to notice
a few error variants that weren't being used, or didn't mean
what they said on the tin.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Additionally, refactor the IoError out of tor_cell::Error:
nothing in TorCell created this; it was only used by tor_proto.
This required refactoring in tor_proto to use a new error type. Here I
decided to use a new CodecError for now, though we may refactor that
away soon too.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Refactor tor-netdoc a bit more, to use Bug right.
See merge request tpo/core/arti!316
|
| | | | | |
|
| | | |/
| |/| |
|
| |/ / |
|
| | |
| |
| |
| | |
This is a followup for !314 and !310 to fix compilation on main.
|
| |\ \
| |/
|/|
| |
| | |
Refactor errors in tor-netdoc
See merge request tpo/core/arti!314
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This error type doesn't impement HasKind, since the kind will depend
on context.
However, the existing implementation was pretty messy and inconsistent:
Some errors had positions, some didn't.
Some took messages as str, some as String.
Some had internal errors that were somewhat orthogonal to their actual
types.
This commit refactors tor_netdoc::Error to use a ParseErrorKind, and
adds a set of convenience functions to add positions and
messages to the errors that need them.
|
| | |
| |
| |
| |
| | |
Every other case of tor_netdoc::Error means a parse failure. This one,
though, means a failure to construct a document.
|
| | |
| |
| |
| | |
Nothing creates this.
|
| | |
| |
| |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/310#note_2777626
The message from the kind is precisely right.
|
| | |
| |
| |
| | |
Now it maches the others
|
| | |
| |
| |
| |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/310#note_2777519
mutatis mutandi.
And, fix a leftover instance with an old idea of what this was called.
|
| | | |
|
| | |
| |
| |
| | |
Including supporting machinery, new kind field, etc.
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
Provide, and use From impl for InternalError
See merge request tpo/core/arti!315
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adding this autoconversion is quite safe since every error generation
site is explicit and has its own context, and we don't really need to
add more.
This simplifies the code and will simplify future work.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
More docs for IntoTorAddr
Closes #253
See merge request tpo/core/arti!305
|
| | |/ / |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Simplify wait_for_bootstrap to use a Mutex.
Closes #337
See merge request tpo/core/arti!308
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
Since the only purpose of this function is to make sure that no
bootstrapping task is running, a simple futures::lock::Mutex
should do the job just fine.
Closes #337.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Change deny(clippy::all) to warn(clippy::all).
Closes #338
See merge request tpo/core/arti!306
|
| | |/ /
| | |
| | |
| | | |
Closes #338.
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We should not generally explicitly specify a kind for errors which
contain a more detailed error which itself has a kind. Stating the
kind literally is a latent bug, which becomes a real bug if the
contained type's kind changes or starts to vary.
(There may be exceptions to this principle but this isn't one of
them.)
|