| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| | |
`AbstractTunnel::extend()` was calling itself endlessly because there
was no `ClientTunnel::extend()` function to call.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| | |
| |
| |
| | |
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The BaseTunnel now has a start_conversation() which takes a TargetHop
meaning it can be used with a multi path tunnel.
The Conversation object has been moved into the tunnel namespace out of
the circuit one.
Signed-off-by: David Goulet <[email protected]>
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the first step towards making the circmgr return high level
tunnel types (wrappers around ClientTunnel).
Future commits will then modify each subsystems to use those specific
types. They are split in order to reduce complexity.
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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]>
|
| | |
| |
| |
| |
| |
| | |
And rename it in the process to "PendingClientTunnel".
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]>
|
| | |
| |
| |
| | |
Signed-off-by: David Goulet <[email protected]>
|
| |/
|
|
|
|
|
|
|
|
| |
Introduce the new Tunnel structs that is planned to expose publicly as a
replacement to `ClientCirc`.
Future commits will make those tunnel objects be used accross the code
base up until tor-proto which than handles Circuit directly.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
|
|
|
| |
Now instead of saying "rejected 0/40 as not usable as middle relay;
28/40 as in same family as already selected", we say "rejected 28/40
as in same family as already selected".
Closes #2006.
|
| |
|
|
|
|
| |
- Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`.
Signed-off-by: hashcatHitman <[email protected]>
|
| |
|
|
|
| |
The fallback CC algorithm is _always_ fixed-window, and we should only
use it when the selected CC algorithm is not supported.
|
| |
|
|
|
|
|
|
|
| |
Now tor-circmgr no longer needs to check which Protover capabilities
are enabled, or construct a separate CircParameters for each hop.
Instead, tor-proto decides whether to use the fallback CC mode,
based on whether the target supports FLOWCTRL_CC.
Closes #1967.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
"Useless as xyz" implies that the relay wouldn't work at all as a
middle relay, but that's not true: it _would_ work somewhat, but be
can't use it for some other reason.
|
| |
|
|
| |
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`).
|
| |
|
|
|
| |
Now that our MSRV is 1.83, clippy is happy to make more
recommendations for us.
|
| |\
| |
| |
| |
| |
| |
| | |
tor-proto: New extend() and create_firsthop() to pick between ntor and ntor3
Closes #1970
See merge request tpo/core/arti!2967
|
| | | |
|
| | |
| |
| |
| |
| | |
We don't want to be thinking about ntor vs ntor3
in circmgr.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
In the future, when we add more circuit handshakes (PQ anyone?)
we'll want to have the logic for choosing which to use be unified.
Almost nobody calling tor-proto should need to care which circuit
handshake is going to be used.
Closes #1970.
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
Back in 4c1eb94173521bc5104449327650e20ffe32afa7, for sensible
reasons, we made `tor_circmgr::path` a crate-private module. But
when we did that, we lost the ability for callers to construct
circuits with custom paths.
This will make it possible for callers to build custom circuits
again, without committing to a very-long-term API for that.
Closes #1981.
|
| |
|
|
|
| |
This means that even with the "flowctl-cc" feature enabled, we shouldn't
try to negotiate congestion control.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Circuit handshake negotiation for congestion control has been added in
previous commit so stop pinning the algorithm.
This commit marks the start of congestion control usage by arti client.
Closes #1817
Signed-off-by: David Goulet <[email protected]>
|