summaryrefslogtreecommitdiff
path: root/crates/tor-proto/src
Commit message (Collapse)AuthorAgeFilesLines
* proto: Adjust a comment about a buffer size.Nick Mathewson2025-10-281-3/+3
|
* proto: Avoid identifying relay circuits using TunnelIdGabriela Moldovan2025-10-271-3/+3
| | | | We replaced TunnelId with UniqId in the relay code a while ago.
* proto: Remove relay ChannelAuthenticationData builderDavid Goulet2025-10-232-82/+46
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Feature flag some relay specific codeDavid Goulet2025-10-232-8/+15
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Add relay todos for the handshakeDavid Goulet2025-10-231-0/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Use Arc for relay identities objectDavid Goulet2025-10-233-5/+7
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Remove LOG_PREFIX in relay handshakeDavid Goulet2025-10-231-5/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Re-arrange some importsDavid Goulet2025-10-231-3/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Add a note about channel canonicityDavid Goulet2025-10-231-0/+5
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Compute authenticate data after validating certificatesDavid Goulet2025-10-234-15/+58
| | | | | | | | | | | | | | 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]>
* proto: Add a relay channel builderDavid Goulet2025-10-233-2/+37
| | | | | | | | | | 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]>
* proto: Add RelayIdentities object holding our keysDavid Goulet2025-10-233-1/+63
| | | | | | | | | | | | | | | 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]>
* proto: Add the channel authentication dataDavid Goulet2025-10-232-2/+154
| | | | | | | | | | | 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]>
* proto: Add RelayInitiatorHandshakeDavid Goulet2025-10-235-1/+141
| | | | | | | This implements the relay initiator side of the handshake up to the creation of an unverified channel. Signed-off-by: David Goulet <[email protected]>
* proto: Change visibility for some channel objectsDavid Goulet2025-10-232-19/+19
| | | | | | | | | | Upcoming code for relay channels are put in the src/relay module and thus we need visibility into some channel generic things. Turns out also we don't need to re-export publicly UnverifiedChannel and VerifiedChannel. Signed-off-by: David Goulet <[email protected]>
* proto: Replace select! with select_biased!Gabriela Moldovan2025-10-221-2/+2
| | | | We need to give the control channels higher priority here.
* proto: Update an outdated doc linkGabriela Moldovan2025-10-221-1/+1
|
* proto: Add debug log when RelayReactor shuts downGabriela Moldovan2025-10-221-2/+14
|
* proto: Replace futures::select with importGabriela Moldovan2025-10-221-2/+2
|
* proto: Remove no-longer relevant note on control message handlingGabriela Moldovan2025-10-221-10/+0
|
* proto: Remove an already-addressed TODOGabriela Moldovan2025-10-221-2/+0
|
* proto: Handle control messages in RelayReactorGabriela Moldovan2025-10-222-51/+53
| | | | Control messages are handled in RelayReactor instead of BackwardReactor.
* proto: Move the control channels to RelayReactorGabriela Moldovan2025-10-222-53/+53
| | | | | This only moves the control/command fields to RelayReactor. The next step is to actually implement the control message handling and dispatch.
* tor-proto: fix `clippy::needless_pass_by_value` warningSteven Engler2025-10-211-0/+1
|
* proto: Fix broken doc linksGabriela Moldovan2025-10-211-2/+3
|
* proto: Prioritize shutdown over everything elseGabriela Moldovan2025-10-211-8/+8
|
* proto: Ensure RelayReactor shuts down the other reactorsGabriela Moldovan2025-10-213-21/+48
| | | | | | | | | 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
* proto: Add TODO about moving control message handling to RelayReactorGabriela Moldovan2025-10-211-0/+3
|
* proto: Use select not joinGabriela Moldovan2025-10-211-4/+5
| | | | | I used `futures::join` by mistake: the intention here is to have `RelayReactor` exit when either one of the fwd/bwd reactors exits.
* proto: Emphasize that we think 2 reactors are better for perfGabriela Moldovan2025-10-211-4/+8
|
* proto: Add a TODO about splitting out fields out of BackwardReactorGabriela Moldovan2025-10-211-0/+9
|
* proto: Move StreamMap split closer to cell_tx docsGabriela Moldovan2025-10-211-3/+5
| | | | This also clarifies why we reroute cells to `BackwardReactor`.
* proto: s/inbound_rx/input for consistency with other reactorsGabriela Moldovan2025-10-211-2/+2
| | | | | Things will get very confusing if every reactor uses different variable names for this, so I am renaming it back to input.
* proto: Move channel provider to ForwardReactorGabriela Moldovan2025-10-213-18/+18
| | | | | | | | 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)
* proto: Remove no longer needed MutexGabriela Moldovan2025-10-211-7/+5
|
* proto: Remove stray words from docsGabriela Moldovan2025-10-211-1/+1
|
* proto: Disambiguate "channel" and "stream"Gabriela Moldovan2025-10-213-52/+52
|
* proto: Say why there are two reactors instead of just oneGabriela Moldovan2025-10-211-0/+23
|
* proto: Clarify why we may need to forward cells to BackwardReactorGabriela Moldovan2025-10-211-2/+3
|
* proto: Fix docs post-renamingGabriela Moldovan2025-10-211-3/+3
|
* proto: Avoid calling BackwardReactor "primary"Gabriela Moldovan2025-10-211-5/+1
|
* proto: Replace select_biased! with PollAllGabriela Moldovan2025-10-211-32/+124
| | | | | This is the first step towards parallelizing stream reads and writes.
* proto: Replace placeholder () with stream id and msgGabriela Moldovan2025-10-213-8/+16
| | | | | This makes it a bit clearer that `cell_rx` is for moving stream data between `ForwardReactor` and `BackwardReactor`.
* proto: Replace inbound/outbound terminologyGabriela Moldovan2025-10-212-42/+42
| | | | The forward/backward terminology is clearer.
* proto: Write a debug log when the reactor startsGabriela Moldovan2025-10-211-2/+12
|
* proto: Restrict the visibility of BackwardReactorGabriela Moldovan2025-10-211-3/+3
| | | | | BackwardReactor is not meant to be used directly (the channel reactor is supposed to use the `RelayReactor` wrapper instead).
* proto: Move BackwardReactor to its own moduleGabriela Moldovan2025-10-212-443/+466
| | | | | `BackwardReactor` now exists alongside `ForwardReactor`, to make it clearer that they are siblings.
* proto: Add a constructor for BackwardReactorGabriela Moldovan2025-10-211-16/+54
| | | | | We are about to need this, because BackwardReactor will be moved to another module, and we want to keep its internals private.
* proto: Remove no-longer needed Runtime argumentGabriela Moldovan2025-10-211-13/+5
| | | | | | | 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.
* proto: Replace RelayReactor type-alias with structGabriela Moldovan2025-10-211-23/+32
| | | | | | This is the first step towards making `ForwardReactor` and `BackwardReactor` be siblings (rather than being in a primary-subordinate relationship).