| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |/ / /
| | | |
| | | |
| | | | |
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.)
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Split up ErrorKind::ProtocolViolation
See merge request tpo/core/arti!312
|
| | |/ / / / |
|
| |\ \ \ \ \
| |_|_|/ /
|/| | | |
| | | | |
| | | | | |
Split up ErrorKind::NoSupport
See merge request tpo/core/arti!311
|
| | | | | | |
|
| | |/ / / |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Clarify ErrorKind::InvalidConfigTransition
See merge request tpo/core/arti!309
|
| | |/ / / |
|
| |\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
dirmgr: Remove a useless Ok(x?)
See merge request tpo/core/arti!307
|
| | |/ /
| | |
| | |
| | | |
Found by nightly clippy.
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Use atomic set-and-check to update OptTimestamps if none.
See merge request tpo/core/arti!297
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes a tiny race condition in the previous code, where we
checked whether an OptTimestamp is None a bit before we set it.
Since std::atomic gives us compare_exchange, we might as well use
it.
|
| | | |
| | |
| | |
| | | |
(Looks like this one got missed.)
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Allow creating unbootstrapped `TorClient`s (and `DirMgr`s)
Closes #293
See merge request tpo/core/arti!298
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Write some examples for TorClient::connect()
See merge request tpo/core/arti!303
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
These should explain better what you can pass as an address, and
what you should do if you _really need_ to provide a SocketAddr or
something.
|
| |\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | | |
tor-socksproto: Implement HasKind
See merge request tpo/core/arti!299
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Refactor the Error type to remove the yucky internal hidden Truncated
variant. Instead, there's now an embedded tor_bytes::Error value.
If that tor_bytes::Error is Truncated, we bubble it up when we convert our
handshake result to the nested error struct.
Thus there is still (sadly) a variant of tor_socksproto::Error
that shouldn't be exposed to user code. But refactoring every
inner method under handshake.rs seemed like a bad idea: once we're using
Result<Result<..>>, the ? operator no longer helps us much.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I'm not in love with this solution; the others just seem a bit ugly
too.
|
| |/ / / /
| | | |
| | | |
| | | |
| | | | |
(This error isn't yet wrapped in TorError, but it will be eventually
when we implement socks proxy and PT support.)
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Fix typos
See merge request tpo/core/arti!301
|
| | | | | | |
|
| |\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | | |
tor-bytes: Use InternalError.
See merge request tpo/core/arti!300
|
| |/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
This crate's Error type is too low-level to have an ErrorKind, but
it does make sense to use InternalError for the internal errors
here.
|
| |\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | | |
tor-config: Add HasKind support.
See merge request tpo/core/arti!296
|
| |/ / /
| | |
| | |
| | | |
This required a few new ErrorKinds.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This edge-case was there even before the migration of
595fe1ab881b94106649, but now it's more explicit and ought to be
revisited.
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Remove the use of Mutex in channel unused_since timestamp
See merge request tpo/core/arti!293
|
| | | | |
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Temporarily allow failures in the coverage CI.
See merge request tpo/core/arti!295
|
| |/ /
| |
| |
| | |
Right now it's failing on nightly through no fault of our own.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Another set of improvements to the error code
Closes #321
See merge request tpo/core/arti!294
|
| | | |
| | |
| | |
| | | |
This fixes a compilation error.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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).
|
| |\ \
| | |
| | |
| | |
| | | |
Hopefully uncontroversial improvements to new Error code
See merge request tpo/core/arti!291
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
These tests turned up a need for using the #[track_caller]
annotation in order to get accurate locations, which is fortunately
stable since Rust 1.46.0.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
(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.
|