summaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/client
Commit message (Collapse)AuthorAgeFilesLines
* tor-proto: fix `clippy::needless_pass_by_value` warningSteven Engler2025-10-211-0/+1
|
* proto: Fix doc links post-refactoringGabriela Moldovan2025-10-211-1/+5
|
* proto: Move StreamMpsc{Sender,Receiver} to stream module (fmt)Gabriela Moldovan2025-10-213-3/+3
|
* proto: Move StreamMpsc{Sender,Receiver} to stream moduleGabriela Moldovan2025-10-215-9/+8
| | | | These will be shared with the relay code.
* proto: Move hop settings into a shared moduleGabriela Moldovan2025-10-215-306/+15
|
* proto: Move streammap out of the client module (fmt)Gabriela Moldovan2025-10-213-5/+3
|
* proto: Move halfstream under streammapGabriela Moldovan2025-10-211-247/+0
| | | | | | That way we don't need to make halfstream `pub(crate)` (we only really use it in streammap, and in the client reactor, because of the `handle_msg()` kludge).
* proto: Move streammap out of the client moduleGabriela Moldovan2025-10-217-685/+11
|
* proto: Move dumb pipes to top-lvl stream module (fmt)Gabriela Moldovan2025-10-216-6/+6
|
* proto: Move dumb pipes to top-lvl stream moduleGabriela Moldovan2025-10-218-264/+7
|
* proto: Give the relay reactor a stream mapGabriela Moldovan2025-10-211-2/+2
| | | | | | We need it for exits and leaky pipe. Part of #2212
* Cleanup: Remove a variable renameNick Mathewson2025-10-201-4/+2
|
* Refactor: turn circ_extensions_from_settings into a methodNick Mathewson2025-10-203-63/+62
| | | | Closes #2067.
* proto: Rename data cmd checkers to {Inbound,Outbound}DataCmdCheckerGabriela Moldovan2025-10-165-14/+14
| | | | | | The previous "incoming" terminology was rather ambiguous. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3348#note_3275337
* proto: Fix docs to refer to the right stream:: paths.Gabriela Moldovan2025-10-162-2/+2
|
* proto: Move IncomingDataCmdChecker to top-level stream module.Gabriela Moldovan2025-10-162-49/+1
| | | | | | | This will be used by relays too (for validating incoming messages on streams). This is just code motion, so it's best reviewed with `--color-moved`.
* proto: Split out DataCmdChecker into multiple types (fmt).Gabriela Moldovan2025-10-161-1/+1
|
* proto: Split out DataCmdChecker into multiple types.Gabriela Moldovan2025-10-163-13/+51
| | | | | | | | | | | The incoming one will be used for the exit relay implementation too. Also, with this change, receiving `CONNECTED` on an incoming stream will result in a clearer error message. Previously, the check against receiving `CONNECTED` on an incoming stream was bundled with the double-CONNECTED check for client data streams, so in the incoming stream case, the error message was misleading ("Received CONNECTED twice on a stream.").
* proto: Do not fully-qualify Arc.Gabriela Moldovan2025-10-161-3/+3
| | | | | `Arc` is already in scope, and not fully-qualifying it makes it more readable.
* proto: Replace fully-qualified paths with use (fmt).Gabriela Moldovan2025-10-162-8/+2
|
* proto: Replace fully-qualified paths with use.Gabriela Moldovan2025-10-162-8/+8
|
* proto: Reformat imports post-move.Gabriela Moldovan2025-10-169-9/+9
|
* proto: Avoid crate-pub reexports of shared types from the client module.Gabriela Moldovan2025-10-1610-19/+17
| | | | | This makes it easier to see which parts are implementation-agnostic (i.e. do not import from crate::client).
* proto: Move cmdchecker under top-level stream module.Gabriela Moldovan2025-10-162-57/+1
| | | | | The CmdChecker will be used by relays too, so I am moving it to the shared `stream` module.
* tor-proto: remove `StreamEndpointType`Steven Engler2025-10-141-8/+6
|
* Merge branch 'celltypes' into 'main'gabi-2502025-10-146-187/+5
|\ | | | | | | | | proto: Move celltypes out of client See merge request tpo/core/arti!3355
| * proto: Move celltypes out of clientGabriela Moldovan2025-10-136-187/+5
| | | | | | | | | | Some of these are relay-specific, so it makes more sense to pull this into a top-level module.
* | Merge branch 'unique-id' into 'main'David Goulet2025-10-141-6/+0
|\ \ | | | | | | | | | | | | proto: Stop using tunnel IDs in relay reactor. See merge request tpo/core/arti!3353
| * | proto: Stop using tunnel IDs in relay reactor.Gabriela Moldovan2025-10-131-6/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | Using a tunnel ID here doesn't make much sense right now, because we don't yet support exit-side conflux (and when we will, it's unclear whether the concept of "tunnel" will be applicable, especially if we refactor things such that multi-path circuits are handled without a ConfluxSet-like type like we have for clients). This change forces us to stop using the client-specific `unwrap_or_shutdown` (because this macro expects `self` to have a tunnel ID), but IMO that is okay.
* / proto: Use a small vec for the hop list.Gabriela Moldovan2025-10-131-1/+7
|/ | | | | We can optimize for the general (N <= 3) case, and avoid a heap allocation.
* Merge branch 'mv-flow-ctrl' into 'main'gabi-2502025-10-0817-1083/+14
|\ | | | | | | | | proto: Move flow_ctrl module under stream. See merge request tpo/core/arti!3335
| * proto: Move flow_ctrl module under stream (fmt).Gabriela Moldovan2025-10-078-18/+14
| |
| * proto: Move flow_ctrl module under stream.Gabriela Moldovan2025-10-0717-1079/+14
| | | | | | | | This will be used by exits too, so I am moving it out of `client`.
* | tor-proto: deprecate handshake-specific create/extend variantsNick Mathewson2025-10-071-0/+10
|/ | | | | | | Everybody should use create_firsthop() and extend(), and let tor-proto decide which handshake is best. Closes #1990.
* Merge branch 'chan_padder' into 'main'Nick Mathewson2025-10-064-4/+20
|\ | | | | | | | | Apply maybenot padding to channels See merge request tpo/core/arti!3314
| * proto: Add a comment to note a naming issue.Nick Mathewson2025-10-021-0/+4
| |
| * proto: Implement channel padding with maybenot padders.Nick Mathewson2025-10-021-1/+0
| | | | | | | | With this commit we now actually generate padding when we're told to.
| * proto: Trigger maybenot events for channel-level padding.Nick Mathewson2025-10-022-0/+9
| |
| * proto: Generate per-sender NormalSent events from circuits.Nick Mathewson2025-10-011-3/+7
| |
* | tor-proto: fix comment related to validating stream messagesSteven Engler2025-09-301-3/+4
|/ | | | | | | | | | I don't think the previous comment is correct. The main flow control checks are about receiving SENDME/XON/XOFFs, and ensuring that we don't receive too many of them. This all happens in the reactor. In theory the stream should be checking that we don't receive too many DATA messages for how many stream SENDMEs we've sent. But this is broken due to arti#2100. We do check this in the halfstream code though.
* padding: Remove post-queue blocker.Nick Mathewson2025-09-302-36/+26
| | | | | | | We no longer want to _ever_ block non-DATA cells, per discussion in circuit-padding.md. Closes #2190.
* padding: be less dogmatic in a TODO about where a buffer would go.Nick Mathewson2025-09-301-4/+4
|
* Sort output events for next_circ_action.Nick Mathewson2025-09-291-1/+48
| | | | | | | | This sort makes it so that that blocking and unblocking are always ordered in a sensible way with respect to sending data. This might help simplify padding machines a bit. Prerequisite for #2190
* proto: Replace magic value with constant (fmt).Gabriela Moldovan2025-09-251-1/+2
|
* proto: Replace magic value with constant.Gabriela Moldovan2025-09-251-4/+9
| | | | | Also derives `CIRC_ACTION_COUNT` from the two other constants instead of hard-coding the value.
* proto: Use MAX_CONFLUX_LEGS instead of magic number.Gabriela Moldovan2025-09-251-1/+2
| | | | | Besides, it's better if we use the same number for the expected number of legs as we do in the conflux set impl.
* proto: Make padding and timeout actions take priority.Gabriela Moldovan2025-09-251-34/+69
| | | | | | | | | | This rewrites `next_circ_action()` yet again, using two layers of `PollAll`: * the inner layer drives an individual circuit leg. Each circuit has a `PollAll` that drives its futures * the outer layer drives the inner `PollAll`s belonging to the circuits that form the tunnel
* proto: Add comment emphasizing that the PollAll ordering matters.Gabriela Moldovan2025-09-251-0/+7
|
* proto: Add comment explaining why we need the chan_sender readiness check.Gabriela Moldovan2025-09-251-0/+3
|
* proto: Rewrite should_skip_join_point to return bool.Gabriela Moldovan2025-09-251-11/+10
| | | | | We don't really need to return a `HopNum` anymore (because we work out the join point `HopNum` unconditionally in `next_circ_action`).