| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The motivation for doing this now is to remove the `#[from]` so we
would spot where operationsl circuit setup failures were handled.
(But it turns out that they are turned into internal errors!)
Perhaps this will want to become a different error type from circmgr
in due course, but for now we simply use a bespoke variant of
TorError.
It will want its own Kind. The TODO in the HasKind impl marks
this (amongst much else here).
|
| |
|
|
|
| |
Right now we must always expose the `Error` type since we haven't
converted everything.
|
| |
|
|
| |
We are going to make the top-level Error type conditionally hidden.
|
| |
|
|
| |
Still much to do here.
|
| |
|
|
|
|
|
|
|
| |
This involves making a temporary ErrorKind::TODO. That will continue
to exist until all errors (at least, the ones that make it out to
here) can be properly categorised.
Introducing this will let us work from the top and bottom towards the
middle.
|
| |
|
|
|
|
|
| |
Provide an enum variant to contain the SpawnError and a From impl.
We use `#[from]` here because it doesn't really make sense to attach
any context, as it's not likely to be very relevant.
|
| | |
|
| |
|
|
|
| |
This enum is required to use `TorClient::reconfigure` correctly, and
as such ought to be re-exported.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit puts the native-tls crate behind a feature. The feature
is off-by-default in the tor-rtcompat crate, but can be enabled
either from arti or arti-client.
There is an included script that I used to test that tor-rtcompat
could build and run its tests with all subsets of its features.
Closes #300
|
| |
|
|
|
| |
This should help avoid some amount of temptation towards API
proliferation.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Having separate types here doesn't justify the (very limited)
benefit of distinguishing between the case where we have created an
executor that we own and the case where we have a handle to an
already-running tokio executor.
Part of #301.
|
| |
|
|
|
|
|
| |
In line with the rest of the renaming.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/256#note_2771617
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The docs even say this is about stream.
As @nickm writes in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771289
we generally call end-to-end connections that are tunneled over Tor
"Streams" to distinguish them from everything else in the Tor
protocols that could possibly be called a "Connection".
That seems to apply here too.
|
| |\
| |
| |
| |
| |
| |
| | |
Provide isolate-all-streams function
Closes #279
See merge request tpo/core/arti!252
|
| | |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771291
|
| | |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771289
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
In the usual case, set_isolation_group is awkward.
This is perhaps slightly duplicative with TorClient::isolated_client().
If so then perhaps the *latter* should be abolished.
|
| | |
| |
| |
| |
| |
| | |
No functional change.
This will grow a new variant shortly.
|
| | | |
|
| |/
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/250#note_2771239
|
| | |
|
| | |
|
| |
|
|
|
| |
This may save quite a bit of copying. The callees don't need to copy
the whole struct; they copy the bits they need.
|
| |
|
|
| |
These aren't flags. Eg, there's an isolation token in there.
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit combines status update information from tor-dirmgr and
tor-chanmgr in the arti-client crate, so that the user can get to
it; it represents a high-level view of the client's ability to reach
the network and route traffic.
I have omitted the tor-circmgr support for now; it's mostly not
needed.
At present it's not so useful, since there's no way for a client to
get a TorClient that _isn't_ completely bootstrapped, and therefore
there's no way to actually watch these events until they're no
longer interesting. That should change with arti#293.
This is part of #96.
|
| |/
|
|
|
|
|
| |
This resolves a copy-and-paste error where we were putting
everything in our state directory.
Closes #297.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The purpose of a this API is to tell the user how far along Arti is
in getting bootstrapped, and if it's stuck, what it's stuck on.
This API doesn't yet expose any useful information: by the time it's
observable to a client, it's always "100% bootstrapped." But I'm
putting it in a MR now so that we can review the basic idea, and to
avoid conflicts with later work on tickets like #293 and #278.
This is part of #96.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit addresses multiple problems highlighted by arti#182:
- `arti-client` had some types in its public API that weren't accessible
without importing another crate (`CfgPath`, `DataReader`,
`DataWriter`). This has been fixed.
- In addition, the doc comments for `DataReader` and `DataWriter` were
cleaned up to be of better quality, now that they're public.
- It was impossible to use `arti-client` without also importing
`tor-rtcompat`. This is now fixed by the addition of two convenience
methods: `TorClient::bootstrap_with_tokio` and
`TorClient::bootstrap_with_async_std`.
- Potentially controversially: `tor-rtcompat` now returns *concrete*
types from methods like `current_runtime`, instead of `impl Runtime`.
- This was needed in order to actually be able to name the `TorClient`
type that results from using these methods.
- This does mean we lose API flexibility, but on balance I think this
is a good thing, because the API we *do* have is actually usable...
|
| |\
| |
| |
| |
| |
| |
| | |
Expose and rename stream timeout config.
Closes #281
See merge request tpo/core/arti!231
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we kept this in an ambiguously named type,
`ClientTimeoutConfig`. But everything we do right now is client
related! So `StreamTimeoutConfig` is a better name.
Also, we'd previously neglected to expose the builder for this type
from `TorClientConfigBuilder`. Now we do.
Closes #281.
|
| |/
|
|
| |
Closes #280.
|
| | |
|
| |
|
|
|
|
| |
See the new commentary text on `ClientCirc` for the rationale.
Signed-off-by: Ian Jackson <[email protected]>
|
| | |
|
| |\
| |
| |
| |
| | |
address clippy's latest lint
See merge request tpo/core/arti!205
|
| | | |
|
| |/
|
|
|
|
| |
We _do_ reject bad hostnames: just not where I once thought we might.
We need to decide if the current behavior is what we want (and I think
it is, probably?).
|
| |\
| |
| |
| |
| | |
Make most arti-client fields reconfigurable.
See merge request tpo/core/arti!181
|
| | |
| |
| |
| |
| |
| |
| |
| | |
We don't want MutCfg to be automatially coneable, or we'll wind up with
surprises like the one that this patch fixes in TorClient.
(The "surprise" is that reconfigure() would only apply its
client-specific options to one client instance.)
|
| | |
| |
| |
| |
| |
| | |
If we allow overlapping reconfiguration requests, we introduce all
kinds of "fun" bugs. For example, we could wind up with a configuration
made up of parts of one reconfiguration attempt, and parts of another.
|
| | |
| |
| |
| |
| | |
It no longer makes sense to say "most things can't change", now that
most things can.
|
| | |
| |
| |
| | |
This covers ClientAddrConfig and ClientTimeoutConfig.
|