| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
These are all aimed at figuring out in more detail what's going on
in #2079 and related issues.
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| |\
| |
| |
| |
| | |
various crates: Updated MSRV TODOs for `once_cell` removal
See merge request tpo/core/arti!2953
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
- Shortened the TODO added in e9ef7bea96c2860fa81d03e8d8da2605d0661425 in the
style of [this maintainer request] for consistency.
[this maintainer request]: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2953#note_3197719
Signed-off-by: hashcatHitman <[email protected]>
|
| |/
|
|
|
|
|
| |
This is just code motion (I suggest reviewing with `--color-moved`).
This also moves the implementation-agnostic parts from
`tor_proto::client::circuit` to a new `tor_proto::circuit` module.
|
| |
|
|
|
|
|
| |
This is so a relay can build authenticated channels. Several keys/cert
are required for this that are within the key manager.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
The two main causes of errors were:
- Since some of the lifetime rules have changed, we no longer need
to do as many "bind a variable and immediately return it"
patterns, and so clippy now warns about them.
- We needed to adjust the explicit captures (`use<...>`)
in a couple of our RPIT instances.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
| |
It's necessary and more verbose (and it's rather uncommon).
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, we've been using `ClientCirc::path_ref()` to get the *only*
path of a circuit. Now that `ClientCirc` is a handle to a tunnel reactor
(which may or may not be multi-path), we need to decide for each call
site of `path_ref()`, if we actually want *all* paths in the tunnel, or
if we expect the tunnel to be single-path and thus want the *only* path
in the tunnel.
I've added two new APIs to address this: `all_paths()`, for getting all
the paths in the tunnel, and `single_path()` for getting the only path
in the tunnel, or an error if the tunnel is single-path.
|
| |
|
|
|
| |
These were removed somewhere along the way (which is now causing the
clippy checks to fail).
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In order to pull this off, the Arc requirement needs to go away because
the Arc<ClientCirc> is now within the ClientTunnel.
This commit also has a rename of the CircuitBuilder to TunnelBuilder in
order to reflect the change that it now builds a ClientTunnel.
There is a slight rename in tor-proto as well just for accuracy.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The CircMgr will no longer yield circuits but tunnels (src/tunnel.rs).
This is a first step to rename most circuit related objects to use
"tunnel" instead.
Some "circuit" names have been kept for more precise definitions.
No behavior changes.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently clippy nightly is better (or worse?) about detecting
complex functions than before, so I'm suppressing these warnings
where they occur.
I have mixed feelings about these warnings: On the plus side,
they really do help to detect functions that are twistier than they
need to be. On the minus side, they get confused by tracing macros,
and the "allows" do pile up. But on the plus side, those "allows"
do provide a way to find functions that need to be refactored,
and they are never uglier than the functions they decorate.
|
| |
|
|
| |
(text from Gabi)
|
| |
|
|
| |
On !3007, @gabi-250 says that it was a mistake to have it be Naive.
|
| |
|
| |
Co-authored-by: gabi-250 <[email protected]>
|
| |
|
|
| |
Closes #1911.
|
| | |
|
| |
|
|
|
|
| |
This is the preferred type for choosing a relay,
since unlike a RelayExclusion, it lets us add multiple restrictions,
and a relay usage.
|
| |
|
|
|
|
| |
We'll need this in order to build paths that are specifically
for client rend circuits. I thought of using a boolean here,
but that had potential to get ugly in the future.
|
| |
|
|
|
|
| |
We're going to be looking at this a little more closely
in order to decide whether the last hop of a stem can be used
as a rendezvous point.
|
| |
|
|
|
| |
There are two other functions called "compatible_with_target"
that check a different property, so this one was confusing.
|
| |
|
|
| |
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2996#note_3199590
|
| |
|
|
|
|
|
|
|
|
| |
The `ClientCirc` accessors will only return an error if the underlying
circuit is closed, so it doesn't make sense to map these errors to
`Bug`.
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2996#note_3199072
and
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2996#note_3199073
|
| |
|
|
|
|
|
|
| |
This is messy, because `ClientCirc::{path_ref, n_hops, ..}` become
fallible (we can't unwrap the result, because when a circuit is closed,
its state gets removed from the `TunnelSharedState`, but its
`ClientCirc` handle continues to exist, so any attempt to retrieve the
state will result in an `Err`).
|
| |
|
|
|
| |
We don't want to be thinking about ntor vs ntor3
in circmgr.
|
| |
|
|
|
|
|
|
|
|
|
| |
This avoids cloning the object and instead allows us to have a
CircParameters per hop on the circuit path. This will come handy with
congestion control where each hop might have different congestion
control parameters.
Part of #1817
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
| |
- [`once_cell::sync::OnceCell`] should be replaced by [`std::sync::OnceLock`]
once the blocking methods are stabilized and within our MSRV.
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
|
|
| |
Instead, return an error and make all call site handle it.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Congestion control parameters have specific values depending on the
circuit type. Instead of using a CircuitType, which is removed in this
commit, specialize the function in this case onion and exit.
This allows us to get rid of CircuitType and solely use TargetCircUsage
instead.
At this commit, we use .expect() on the Builder. Future commit will
remove this to return a Result in case of failure. Worth noting that we
don't expect one.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The congestion control parameters are created from the consensus
parameters (netparams) and then put into the CircParameters object that
is then passed down the tor-proto crate.
Because different parameters are selected depending on the circuit type
(onion vs exit vs sbws), a CircuitType enum is introduced for the sole
purpose of being used to select the right parameters.
Related #534
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
As per #1479
|
| |
|
|
| |
As per #1479
|
| |
|
|
|
|
|
|
| |
This is the first step towards clarifying the questions from !2230.
Corresponding torspec changes: https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/282
Part of #1479
|
| |
|
|
| |
Fixes a TODO.
|
| |
|
|
|
|
|
|
|
| |
Plumb through a top-level account. This doesn't have any
channel-specific, circuit-specific or stream-specific accounts yet.
tor-circmgr's and tor-hsclient's *tests* need fake account.
In arti-relay, use a dummy account for now.
|
| | |
|
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| |
|
|
|
|
|
|
|
|
| |
This will allow for testing, as the CircuitBuilder can be replaced with
a mocked version.
This did require moving some of what was in the CircuitBuilder impl into
the AbstractCircuitBuilder type, since Drop implementations can't be
specialized, but that's fine, as we'll probably be doing more of that in
the future anyways.
|
| |
|
|
|
|
|
|
| |
This updates the code to match the spec.
This fixes TROVE-2024-008.
Closes #1474
|
| | |
|