aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/circuit
Commit message (Collapse)AuthorAgeFilesLines
...
* proto: Remove assumption that we are a relay from BWD docGabriela Moldovan2026-02-041-1/+1
| | | | This was leftover from back when the BWD was a relay-specific type.
* proto: Replace SendSendme with a more general-purpose command (fmt)Gabriela Moldovan2026-02-041-5/+4
|
* proto: Replace SendSendme with a more general-purpose commandGabriela Moldovan2026-02-043-13/+14
| | | | | This will soon be used for instructing the BWD to send other types of messages too.
* proto: Replace send_sendme() with general-purpose functionGabriela Moldovan2026-02-041-8/+12
| | | | | | | The backward reactor will soon need the ability to send other types of relay messages too: it will soon need the ability to respond to EXTEND2 by sending back an EXTENDED2, so I am preemptively making this function more general so we can reuse it.
* proto: Allow unused async in WIP reactor codeGabriela Moldovan2026-01-291-0/+2
| | | | This will need to become async soon.
* proto: Document that the hop list is shared with the BWDGabriela Moldovan2026-01-291-0/+11
|
* proto: Rename the FWD -> BWD channelGabriela Moldovan2026-01-293-18/+18
| | | | | | | In the backward reactor, we call this the `forward_reactor_rx` (because it receives commands from the foward reactor), and in the forward reactor we call it `backward_reactor_tx` (because it sends commands to the backward reactor).
* proto: Rename chan senders and sinks for clarityGabriela Moldovan2026-01-293-42/+42
| | | | | | | | | | We settled on * `inbound_chan{tx, rx}`, for the inbound channel (the channel towards the guard, if we are a client, or towards the client if we are a relay) * `outbound_chan{tx, rx}`, for the outbound channel (the channel towards the exit, if we are a middle relay)
* proto: Update misleading comment about cmd_rxGabriela Moldovan2026-01-291-1/+1
|
* proto: Allow CircSynvView::new_relay() to be unusedGabriela Moldovan2026-01-291-0/+1
| | | | | This will change significantly in the near future, or disappear entirely.
* proto: Add a new, implementation-agnostic circuit reactorGabriela Moldovan2026-01-297-5/+3063
|
* proto: Avoid locking in CircHopOutbound::ccontrol()Gabriela Moldovan2026-01-291-8/+26
| | | | | | | | This is just because the generic reactor will soon need a clone of the CC object, so I am preemptively making this function return a ref to the underlying `Arc` instead. Technically, it would've been fine to just kept this method and add a separate one returning `&Arc<Mutex<..>>`, but I'd prefer keeping the API small.
* proto: Rip CC state out of CircHopInboundGabriela Moldovan2026-01-291-17/+1
| | | | | | Soon it won't need be needed here any more. I'm removing it, because having redundant handles to the CC state makes it difficult to see exactly where it's being used from.
* proto: Factor ReactorResultChannel into the shared reactor moduleGabriela Moldovan2026-01-291-0/+5
| | | | This is not just for clients!
* proto: Add a new module for the generic circuit reactorGabriela Moldovan2026-01-291-0/+9
| | | | Currently empty, will be fleshed out in a future commit.
* proto: Move padding_disposition() to the shared padding moduleGabriela Moldovan2026-01-291-0/+69
|
* proto: Move CircPaddingDisposition to a new moduleGabriela Moldovan2026-01-291-0/+16
| | | | Relays will need to use it too.
* proto: #[macro_use] be gone!Gabriela Moldovan2025-12-101-0/+2
|
* proto: Move relay specific unit test to relay moduleDavid Goulet2025-12-101-25/+0
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Move unit tests and minor fixDavid Goulet2025-12-101-21/+0
| | | | | | Move the client specific unit tests into the client module. Signed-off-by: David Goulet <[email protected]>
* proto: Move RelayCircChanMsg into relay moduleDavid Goulet2025-12-101-23/+3
| | | | | | This follows the move of the client specific object. Signed-off-by: David Goulet <[email protected]>
* proto: Move ClientCircChanMsg into client moduleDavid Goulet2025-12-101-27/+11
| | | | | | | | 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 gatingGabriela Moldovan2025-12-081-1/+1
| | | | | Without this, `tor-proto` doesn't compile if you enable the `relay` feature but not `hs-service`.
* Merge branch 'relay-streams2' into 'main'David Goulet2025-12-022-1/+7
|\ | | | | | | | | proto: Start handling incoming streams in the relay reactor See merge request tpo/core/arti!3487
| * proto: Move a couple of stream-related constants to stream mod (fmt)Gabriela Moldovan2025-11-241-1/+1
| |
| * proto: Move a couple of stream-related constants to stream modGabriela Moldovan2025-11-241-1/+1
| |
| * proto: Add WIP constructor for relay sync viewGabriela Moldovan2025-11-241-0/+6
| |
* | opentelemetry: Instrument a bunch of functions.Wesley Aptekar-Cassels2025-11-241-0/+3
|/ | | | | These are all aimed at figuring out in more detail what's going on in #2079 and related issues.
* proto: Fix up doc links post-refactoringGabriela Moldovan2025-11-171-7/+7
|
* proto: Temporarily silence a few warningsGabriela Moldovan2025-11-171-0/+3
|
* proto: Make cc state shared between CircHop{Inbound,Outbound}Gabriela Moldovan2025-11-171-14/+20
| | | | | | | | | | | | | 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.
* proto: Move CircHop{Inbound,Outbound} out of the client module.Gabriela Moldovan2025-11-171-2/+590
| | | | These will be soon used by relays too.
* proto: Make the hop in SendRelayCell optionalGabriela Moldovan2025-11-171-2/+2
|
* proto: Update SendRelayCell docsGabriela Moldovan2025-11-171-2/+3
|
* proto: Move SendRelayCell to circhop (fmt)Gabriela Moldovan2025-11-171-2/+2
|
* proto: Move SendRelayCell to circhopGabriela Moldovan2025-11-171-2/+16
| | | | | This will be used by relays too, once we modify it to make the `HopNum` optional.
* Merge branch 'cell-sender' into 'main'Alexander Hansen Færøy2025-11-101-0/+301
|\ | | | | | | | | proto: Move cell_sender out of the client module See merge request tpo/core/arti!3407
| * proto: Move cell_sender out of the client moduleGabriela Moldovan2025-10-281-0/+301
| | | | | | | | | | | | | | Soon we'll use CircuitCellSender in the relay reactor too (we need to, because it provides a useful abstraction for handling block/unblock padding actions, and because it has some handy helper functions such as `congestion_signals()`).
* | Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | | | | | Run maint/add_warning
* | proto: Move a TODO to CircSyncViewGabriela Moldovan2025-10-301-0/+3
| |
* | proto: Add a new CircSyncView typeGabriela Moldovan2025-10-301-0/+38
|/ | | | | | This will replace ClientCircView in the IncomingStreamRequestFilter APIs, which will enable us to use IncomingStreamRequestFilter for incoming streams on the exit side too.
* proto: Move hop settings into a shared moduleGabriela Moldovan2025-10-211-0/+241
|
* proto: Move celltypes out of clientGabriela Moldovan2025-10-131-0/+181
| | | | | Some of these are relay-specific, so it makes more sense to pull this into a top-level module.
* proto: Add a circuit module shared between client and relay impls.Gabriela Moldovan2025-08-281-0/+50
| | | | | | | 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.
* tor-proto: Add a tunnel module.David Goulet2025-02-2013-4203/+0
| | | | | | | | | | | | | Move StreamTarget to the tunnel module and the circuit module. From now on streams will be implemented on tunnels, not circuits. This moves `StreamTarget` to the tunnel module. A future change will replace `ClientCirc` with `ClientTunnel` inside `StreamTarget`. This is mostly code motion, best reviewed with `--color-moved`. Signed-off-by: David Goulet <[email protected]>
* tor-proto: Change the visibility of a series of structGabriela Moldovan2025-02-202-10/+10
| | | | | | | We're about to need this in `tor_proto::tunnel` which is from the Conflux work. In the spirit of upstreaming as much as possible, it is done now.
* tor-proto: Add a newtype wrapper for LegId.Gabriela Moldovan2025-02-201-4/+12
| | | | | We will eventually need to expose this in `tor-proto`'s public API, so it'll need to be an opaque type.
* tor-proto: Add LegId type that can be used as a slotmap key.Gabriela Moldovan2025-02-201-0/+8
| | | | | This will soon be used by the reactor-internal `ConfluxSet` as a unique identifier for the circuit legs stored in its `SlotMap`.
* tor-proto: Move CreateHandshakeWrap to reactor module (fmt).Gabriela Moldovan2025-02-181-3/+1
|
* tor-proto: Move CreateHandshakeWrap to reactor module.Gabriela Moldovan2025-02-182-1/+66
| | | | | This moves the `CreateHandshakeWrap` and its implementors to `reactor::create` (none of these are used outside of the reactor).