| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
With a protocol violation, we have to immediately deal with such event
before emitting anything on the wire.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This mirrors also the relay reactor. We've introduced the ProtoViolation
into a previous commit which is not an action but rather an "event" that
happened on a circuit.
And so, better semantic. No behavior change.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
Because of https://gitlab.torproject.org/tpo/core/torspec/-/issues/385
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
Move the client specific unit tests into the client module.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes the CircuitRx* based solely on the client circuit
message and moves it into the top level of the crate so all reactors can
use them.
The client reactor then upon receiving the message, it converts the
AnyChanMsg into a ClientCircChanMsg. On error, this leads to a shutdown
of the entire reactor due to a fatal error.
In order to pull this off, we added a CircuitAction::Shutdown that is
handled as a priority.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
| |
Next commit will also move the Relay specific set into the relay module.
These two sets are becoming specific to the reactor as the circuit
reactor communication channel will use AnyChanMsg instead.
Signed-off-by: David Goulet <[email protected]>
|
| |\
| |
| |
| |
| | |
proto: Fix relay/hs-service feature gating
See merge request tpo/core/arti!3534
|
| | |
| |
| |
| |
| | |
Without this, `tor-proto` doesn't compile if you enable the `relay`
feature but not `hs-service`.
|
| |/
|
|
|
|
|
|
|
| |
Fixes part of #2193.
(Edits from nickm: I selected the cases here that I could verify
were correct from immediate context.)
Edited-by: Nick Mathewson <[email protected]>
|
| | |
|
| |\
| |
| |
| |
| | |
proto: Start handling incoming streams in the relay reactor
See merge request tpo/core/arti!3487
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Initially I wanted to turn `msg_streamid()` into a method on
`UnparsedRelayMsg`, but I ultimately decided against it, because it
feels like it doesn't belong there (even though intuitively, I would've
expected it to handle the mismatch between stream ID and cell command
internally). This is because all the `UnparsedRelayMsg` methods return
`tor_bytes::Result`, and do not actually do any validation beyond some
length checks on the various fields.
|
| | |
| |
| |
| | |
All this indirection is making me dizzy.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
We are about to use `StreamReqInfo` for exit streams too.
|
| | | |
|
| | | |
|
| |/
|
|
|
| |
These are all aimed at figuring out in more detail what's going on
in #2079 and related issues.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Move the client specific code into VerifiedClientChannel as in sending
the NETINFO cell. The rest is pretty much boiler plate to build a
channel reactor.
The relay finish() code is coming in a followup commit.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
By changing the connect() returned object we therefore officially make
VerifiedChannel and UnverifiedChannel crate only objects.
Thus, this commit changes visibility on most things.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the UnverifiedClientChannel and VerifiedClientChannel
mirroring the relay API for channels.
It plainly uses the generic object underneath as for now those objects
are client only.
Followup commits will make things more client specific.
No behavior change.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This only moves code from src/channel to src/client/channel.
It introduces a ClientChanBuilder that is used to launch client specific
channel by the public ChanBuilder.
The followup commits will add a VerifiedClientChannel and
UnverifiedClientChannel in order to again decouple client and relay code
from the generic objects.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The relay reactor needs the cc state to be shared between the inbound
and outbound components (i.e. the forward and backward reactors), so we
need to put the cc state behind a mutex.
There will never be any contention on this mutex in the client impl,
because the client reactor doesn't split the `CircHop` into
`CircHopInbound` and `CircHopOutbound`.
In the future, we should work on trying to reduce the number of locks in
the `CircHop` states.
|
| |
|
|
| |
These will be soon used by relays too.
|
| | |
|
| |
|
|
|
| |
The Inbound/Outbound CircHop states will be used in the relay reactor,
so it's helpful to move some of the `CircHop` impl there.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This will be used by relays too, once we modify it to make the `HopNum`
optional.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Unlike the client reactor, the relay reactor uses these components in
separate tasks. Splitting `CircHop` this way enables us to reuse its
parts instead of duplicating them in the relay impl.
Eventually, I'd like us to rewrite the client reactor to follow a
similar pattern.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Implement a usage-based timeout for strongly isolated circuits (prop368)
Closes #2237
See merge request tpo/core/arti!3430
|
| | |
| |
| |
| | |
This is part of an implementation for proposal 368.
|