aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/client/reactor/circuit
Commit message (Collapse)AuthorAgeFilesLines
* tor-proto: disable flowctrl sidechannel mitigations for relaysSteven Engler7 days1-2/+9
| | | | | | | | The end result should be: 1. outgoing streams - enable sidechannel mitigations 2. incoming hs streams - enable sidechannel mitigations 3. incoming exit streams - disable sidechannel mitigations
* proto: Add {backward|forward} prefix to circ_id in logsDavid Goulet2026-08-031-4/+4
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Rename uniq_id to circ_unique_id mostly in loggingDavid Goulet2026-08-031-4/+4
| | | | | | | | | We have decided that instead of "uniq_id" in logging, we'll use the "<domaine>-[<type>]-id" syntax to indicate who is that unique ID. This commit only renames circuit's unique ID to "circ_uniq_id". Signed-off-by: David Goulet <[email protected]>
* proto: Log both UniqId and CircId when possibleDavid Goulet2026-08-032-9/+36
| | | | | | | | | | This commit only affects logging. Whenever possible, log both the UniqId and CircId. This also changes the log lines which is now "uniq_id=" and "circ_id=" as the UniqId is internal and circ_id (CircId) is protocol level. Signed-off-by: David Goulet <[email protected]>
* tor-cell: rename `XonKbpsEwma` to `XonKBpsEwma`Steven Engler2026-07-301-2/+2
|
* proto: log hop settings at trace upon client circuit opening.Nick Mathewson2026-06-231-1/+2
|
* tor-proto: move memquota stream account arg to last positionSteven Engler2026-05-211-4/+4
| | | | This better matches nearby code.
* tor-proto: move more stream queue init to reactorSteven Engler2026-05-211-25/+2
| | | | | | | | | | | | | | | | | | | | Previously when initializing a stream, we constructed most of the stream-related queues outside of the reactor and passed the relevant halves of the queues (senders or receivers) into the reactor. A downside of the above approach is that the reactor may be better informed about what queues to construct, and how to construct them. For example the reactor knows what type of flow control that the hop is using, so it knows whether we need queues for passing rate limits and drain rates for XON/XOFF flow control. This commit moves the construction of these queues into the reactor and passes the relevant halves out of the reactor. In the future we can make better decisions about which queues are needed depending on the flow control method used instead of always constructing them (see arti#2068). Reviewing with `--color-moved` might be helpful as a few lines have been moved.
* tor-proto: add `ReactorStreamComponents` to bundle return valsSteven Engler2026-05-201-4/+5
|
* tor-proto: move stream incoming queue init to reactorSteven Engler2026-05-201-7/+15
| | | | | | | | | | | The stream queue length (for messages incoming from the Tor network) depends on the type of flow control we're using for the hop. Currently we construct the stream queue outside of the circuit reactor, but we don't have the flow control information here. Instead of constructing the stream queue outside of the reactor and passing the sender into the reactor, we construct the stream queue inside of the reactor and pass the receiver out of the reactor.
* tor-proto: Port to web-time-compatNick Mathewson2026-03-261-1/+1
|
* proto: Remove unused n_open_streams() functionsGabriela Moldovan2026-02-161-17/+0
|
* proto: Add an accessor for the CircHopOutbound of a CircHopGabriela Moldovan2026-02-161-0/+5
| | | | This will soon be needed for building a `CircSyncView`.
* proto: Move CREATE helpers to a shared moduleGabriela Moldovan2026-02-051-63/+0
| | | | These will be used by the relay code too (for circuit extension).
* proto: Avoid locking in CircHopOutbound::ccontrol()Gabriela Moldovan2026-01-291-1/+1
| | | | | | | | 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-5/+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.
* opentelemetry: Instrument a bunch of functions.Wesley Aptekar-Cassels2025-11-241-0/+2
| | | | | 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-2/+2
|
* proto: Make cc state shared between CircHop{Inbound,Outbound}Gabriela Moldovan2025-11-171-9/+6
| | | | | | | | | | | | | 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-573/+9
| | | | These will be soon used by relays too.
* proto: Add constructors for CircHop{Inbound,Outbound}Gabriela Moldovan2025-11-171-19/+46
|
* proto: Move some of CircHop's impl to CircHop{Inbound,Outbound}Gabriela Moldovan2025-11-171-141/+340
| | | | | The Inbound/Outbound CircHop states will be used in the relay reactor, so it's helpful to move some of the `CircHop` impl there.
* proto: Make the hop in SendRelayCell optionalGabriela Moldovan2025-11-172-4/+4
|
* proto: Move SendRelayCell to circhop (fmt)Gabriela Moldovan2025-11-171-1/+1
|
* proto: Move SendRelayCell to circhopGabriela Moldovan2025-11-172-3/+4
| | | | | This will be used by relays too, once we modify it to make the `HopNum` optional.
* proto: Split CircHop into inbound and outbound components (fmt)Gabriela Moldovan2025-11-171-7/+13
|
* proto: Split CircHop into inbound and outbound componentsGabriela Moldovan2025-11-171-52/+76
| | | | | | | | | 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.
* proto: Rename cell decoder field for clarityGabriela Moldovan2025-11-141-3/+3
|
* proto: Avoid exposing stream map field (fmt)Gabriela Moldovan2025-11-141-8/+11
|
* proto: Avoid exposing stream map fieldGabriela Moldovan2025-11-141-3/+3
|
* proto: Import StreamMap to reduce cognitive complexityGabriela Moldovan2025-11-141-6/+6
|
* Merge branch 'prop368-v4' into 'main'Nick Mathewson2025-11-131-0/+15
|\ | | | | | | | | | | | | Implement a usage-based timeout for strongly isolated circuits (prop368) Closes #2237 See merge request tpo/core/arti!3430
| * tor-proto: Track information on when tunnels were last usedNick Mathewson2025-11-121-0/+15
| | | | | | | | This is part of an implementation for proposal 368.
* | proto: Remove duplicated function in CircHopGabriela Moldovan2025-11-131-5/+0
| | | | | | | | | | `CircHop::relay_format()` returned the same thing as `CircHop::relay_cell_format()`.
* | proto: Remove a no longer relevant TODOGabriela Moldovan2025-11-121-3/+0
|/ | | | | | | I think this was addressed by @opara in eca15143ba80b789382ba7cbe19601d3b98e42c2. Spotted while refactoring `CircHop`.
* proto: Move cell_sender out of the client moduleGabriela Moldovan2025-10-281-301/+0
| | | | | | | 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()`).
* proto: Make everything in CircuitCellSender pub(crate)Gabriela Moldovan2025-10-281-8/+8
| | | | | | This is in preparation for moving `CircuitCellSender` out of the client module (it makes the next commit easier to review, because `cell_sender.rs` will be moved without any modifications).
* tor-proto: fix `clippy::needless_pass_by_value` warningSteven Engler2025-10-211-0/+1
|
* proto: Move StreamMpsc{Sender,Receiver} to stream module (fmt)Gabriela Moldovan2025-10-211-1/+1
|
* proto: Move StreamMpsc{Sender,Receiver} to stream moduleGabriela Moldovan2025-10-211-1/+1
| | | | These will be shared with the relay code.
* proto: Move hop settings into a shared moduleGabriela Moldovan2025-10-212-2/+3
|
* proto: Move streammap out of the client module (fmt)Gabriela Moldovan2025-10-211-3/+1
|
* proto: Move streammap out of the client moduleGabriela Moldovan2025-10-211-1/+1
|
* proto: Move dumb pipes to top-lvl stream module (fmt)Gabriela Moldovan2025-10-211-1/+1
|
* proto: Move dumb pipes to top-lvl stream moduleGabriela Moldovan2025-10-211-1/+1
|
* proto: Reformat imports post-move.Gabriela Moldovan2025-10-161-1/+1
|
* proto: Avoid crate-pub reexports of shared types from the client module.Gabriela Moldovan2025-10-161-1/+1
| | | | | This makes it easier to see which parts are implementation-agnostic (i.e. do not import from crate::client).
* tor-proto: remove `StreamEndpointType`Steven Engler2025-10-141-8/+6
|
* Merge branch 'celltypes' into 'main'gabi-2502025-10-141-1/+1
|\ | | | | | | | | proto: Move celltypes out of client See merge request tpo/core/arti!3355
| * proto: Move celltypes out of clientGabriela Moldovan2025-10-131-1/+1
| | | | | | | | | | Some of these are relay-specific, so it makes more sense to pull this into a top-level module.