| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
We replaced TunnelId with UniqId in the relay code a while ago.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is only done if we kept the AUTH_CHALLENGE cell and we have relay
identities. In other words, this is only when the UnverifiedChannel was
created from a RelayInitiatorHandshake.
Note: The check_internal() function is too large and should be
refactored in smaller pieces.
Note: It is also likely that we need to split UnverifiedChannel and
VerifiedChannel as it is getting client or relay members. Not great.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
The client and relay channel builder don't share anything and return
different objects hence the seperation.
Furthermore, this seperation avoids having the client ChanMgr ability to
launch relay channels.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a intermediary object between tor-chanmgr and tor-proto that is
when building a relay channel, those keys/certs need to be set in the
ChannelBuilder so the tor-proto can use them to authenticate.
We avoid that way making tor-proto depending on tor-keymgr for the
ultimate goal to avoid tor-proto to have access to all the keys in the
KeyMgr.
Future commits will introduce a relay channel builder which will use
that object to set the keys.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit only adds a struct holding all the authentication data that
needs to be built during the verification process after all handshake
cells needed for authentication have been sent.
It lives in the VerifiedChannel struct so it can be used to build the
AUTHENTICATE cell and be sent before the NETINFO.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
This implements the relay initiator side of the handshake up to the
creation of an unverified channel.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
We need to give the control channels higher priority here.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Control messages are handled in RelayReactor instead of BackwardReactor.
|
| |
|
|
|
| |
This only moves the control/command fields to RelayReactor. The next
step is to actually implement the control message handling and dispatch.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The `RelayReactor` now holds the sending end of the shutdown broadcast
channel, so if `RelayReactor` exits, both the forward and the backward
relay reactor will notice and shut down too.
Similarly, if the forward or backward reactor exits, the `RelayReactor`
will notice (because it select!s between the two), and will shut down
|
| | |
|
| |
|
|
|
| |
I used `futures::join` by mistake: the intention here is to have
`RelayReactor` exit when either one of the fwd/bwd reactors exits.
|
| | |
|
| | |
|
| |
|
|
| |
This also clarifies why we reroute cells to `BackwardReactor`.
|
| |
|
|
|
| |
Things will get very confusing if every reactor uses different variable
names for this, so I am renaming it back to input.
|
| |
|
|
|
|
|
|
| |
The channel provider is used to request outgoing channels from the
`ChanMgr` in response to `EXTEND`/`EXTEND2` cells, so it belongs in the
`ForwardReactor`.
(This was leftover from the old circ reactor architecture)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is the first step towards parallelizing stream reads and
writes.
|
| |
|
|
|
| |
This makes it a bit clearer that `cell_rx` is for moving stream data
between `ForwardReactor` and `BackwardReactor`.
|
| |
|
|
| |
The forward/backward terminology is clearer.
|
| | |
|
| |
|
|
|
| |
BackwardReactor is not meant to be used directly (the channel reactor is
supposed to use the `RelayReactor` wrapper instead).
|
| |
|
|
|
| |
`BackwardReactor` now exists alongside `ForwardReactor`,
to make it clearer that they are siblings.
|
| |
|
|
|
| |
We are about to need this, because BackwardReactor will be moved to
another module, and we want to keep its internals private.
|
| |
|
|
|
|
|
| |
This is no longer used, and not having it makes the code less generic
and easier to read, so I'm removing it for now.
If we ever need it again, we can add it back.
|
| |
|
|
|
|
| |
This is the first step towards making `ForwardReactor` and
`BackwardReactor` be siblings (rather than being in a
primary-subordinate relationship).
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This sketches out the "dual" relay reactor implementation, which has:
* a `ForwardReactor`, which forwards cells from the client to the exit
* a `BackwardReactor`, which deals with streams, control messages, and
forwarding cells from the exit to the client
The `BackwardReactor` is actually the "primary" reactor. It's the
interface we expose to the channel reactor (via the `RelayReactor`
type-alias), and it is in charge of spawning the "secondary"
`ForwardReactor` task (via its `run()` function).
See the module-level docs from `tor_proto::relay::reactor` for more
details on the inner workings of the two reactors.
This commit also adds the incomplete skeleton of the circuit extension
logic. Once #1599 is implemented, we'll be able to uncomment the
commented code, or replace it, depending on what the corresponding
channel reactor APIs look like.
|
| | |
|
| |
|
|
|
| |
We only have one command right now (`Shutdown`), so this is mostly just
boilerplate.
|
| | |
|
| |
|
|
|
| |
We will need a handle to the runtime to spawn the "secondary" reactor
from the main one.
|
| | |
|