aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | tor-proto: add note about proxy socket buf sizesSteven Engler2026-05-071-0/+1
| | |
* | | tor-proto: destructure the `ReactorStreamComponents`Steven Engler2026-05-211-5/+12
| | |
* | | tor-proto: have `StreamReqInfo` store a `ReactorStreamComponents`Steven Engler2026-05-216-49/+41
| | |
* | | tor-proto: add a TODO item for XON/XOFF flow controlSteven Engler2026-05-211-0/+3
| | |
* | | tor-proto: move memquota stream account arg to last positionSteven Engler2026-05-215-11/+11
| | | | | | | | | | | | This better matches nearby code.
* | | tor-proto: clean up `CIRCUIT_BUFFER_SIZE`Steven Engler2026-05-213-12/+1
| | |
* | | tor-proto: move more stream queue init to reactorSteven Engler2026-05-217-149/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-207-29/+54
| | |
* | | tor-proto: small comment improvementsSteven Engler2026-05-202-1/+3
| | |
* | | tor-proto: remove unneeded type aliasSteven Engler2026-05-201-5/+2
| | |
* | | tor-proto: always use a bounded mpsc queue for streamsSteven Engler2026-05-203-39/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether a stream queue should be bounded or unbounded is a decision that needs to be made at runtime depending on the type of flow control used, not at build-time. Window-based flow control should be bounded and XON/XOFF flow control should be unbounded. If we wanted to support both bounded and unbounded queues, it would take a bunch of boilerplate code to wrap the senders and receivers in enums. Instead we make the queue always bounded, but use a large bound for XON/XOFF flow control.
* | | tor-proto: add `FlowCtrlHooks::inbound_queue_max_len()`Steven Engler2026-05-203-1/+35
| | |
* | | tor-proto: move stream incoming queue init to reactorSteven Engler2026-05-207-69/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: small cleanup of `CircHopOutbound::build_flow_ctrl()`Steven Engler2026-05-201-11/+4
| | |
* | | tor-proto: rename `{,Half}StreamFlowCtrlInner` variantsSteven Engler2026-05-201-10/+10
| | | | | | | | | | | | The common suffix isn't needed.
* | | Merge branch 'vegas-stall' into 'main'David Goulet2026-05-204-14/+36
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | tor-proto: Don't run vegas algorithm when a clock stall/jump was detected Closes #2504 See merge request tpo/core/arti!3967
| * | tor-proto: vegas: return early if clock stall was detectedSteven Engler2026-05-073-10/+23
| | |
| * | tor-proto: rtt: return clock stall/jump status from `update()`Steven Engler2026-05-071-4/+13
| | |
* | | Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-1214-38/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* | | tor-proto: clean up return type of `Circuit::begin_stream()`Steven Engler2026-05-112-13/+8
| | |
* | | tor-proto: indentation cleanupSteven Engler2026-05-111-20/+15
| | |
* | | tor-proto: reorg error handling for BeginStream reactor cmdSteven Engler2026-05-112-10/+26
| | |
* | | proto: Derive PartialEq for MetaCellDispositionGabriela Moldovan2026-05-071-1/+1
|/ /
* | tor-proto: rename `*FlowCtrl::e` to `inner`Steven Engler2026-05-071-15/+15
| |
* | tor-proto: rename `*FlowCtrlEnum` to `*FlowCtrlInner`Steven Engler2026-05-071-14/+14
| |
* | tor-proto: fix flow control for half-streamsSteven Engler2026-05-075-79/+98
| | | | | | | | | | | | | | | | | | | | This moves the window-based flow control for half-streams out of the `HalfStream` and into the `HalfStreamWindowFlowCtrl` object. Now that it's applied only in `HalfStreamWindowFlowCtrl` and not generally for all half-streams, we no longer apply window-based flow control to half-streams when they're really using xon/xoff-based flow control.
* | tor-proto: add prototype for `HalfStreamFlowCtrl`Steven Engler2026-05-073-4/+124
| | | | | | | | | | This adds the general structure, and we'll fill it in and use it in a following commit.
* | tor-proto: comment change on `StreamFlowCtrl`Steven Engler2026-05-071-1/+6
|/
* proto: Remove an allow for a now-pedantic warning.Nick Mathewson2026-05-071-6/+0
|
* proto rpc: Turn tunnel paths into a dictNick Mathewson2026-04-283-9/+40
| | | | | | | | | This will make it possible to tell whether a path has been replaced in the tunnel. Since the UniqId type might change its representation in the future, I've documented that we don't guarantee anything about the strings used to distinguish paths.
* proto rpc: Change PathEntry to an enum.Nick Mathewson2026-04-281-28/+30
|
* proto: Add an RPC function to access tunnel and inspect its path.Nick Mathewson2026-04-282-0/+225
| | | | Additionally, allow inspecting tunnel paths directly from streams.
* proto: Allow DataStreamCtrl and ClientTunnel to be RPC objects.Nick Mathewson2026-04-282-0/+10
|
* proto: Wrap PeerInfo in Arc<>Gabriela Moldovan2026-04-233-9/+9
| | | | | | To avoid copying the same information for every circuit, as suggested by @opara in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3906#note_3399497
* proto: Avoid collecting the chan identities in RelayIdSetGabriela Moldovan2026-04-231-10/+2
| | | | | It doesn't make sense to do so, as pointed out by @opara in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3906#note_3398956
* proto: Apply deferred rustfmtGabriela Moldovan2026-04-231-5/+2
|
* proto: Remove expect(unused) from channel PeerInfoGabriela Moldovan2026-04-231-1/+0
| | | | This is used in the relay circuit reactor.
* proto: Build the PeerInfo from the dummy target in the testsGabriela Moldovan2026-04-231-5/+14
| | | | | The new relay circuit reactor test expect the `PeerInfo` to be populated with the identity keys of the peer, and won't work without this change.
* proto: Use PeerInfo in the extend handlerGabriela Moldovan2026-04-232-3/+4
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3906#note_3397922
* proto: Add an accessor for the PeerInfo of a channelGabriela Moldovan2026-04-231-0/+6
|
* proto: Add test ensuring we won't extend to the previous hopGabriela Moldovan2026-04-231-1/+43
|
* proto: Reject EXTEND2 targeting the previous hop in the circuitGabriela Moldovan2026-04-231-1/+13
| | | | | | | The relay reactor will now reject any EXTEND2 that tries to extend the circuit to a hop that shares any identities with our previous hop. Closes #2415
* proto: Give the ExtendRequestHandler a copy of the inbound peer infoGabriela Moldovan2026-04-233-1/+8
| | | | | This will soon be used for preventing the circuit from being extended to the previous hop (#2415).
* proto: Fix broken doc link in extend handlerGabriela Moldovan2026-04-231-1/+3
|
* proto: Extract EXTEND2 handling into a new moduleGabriela Moldovan2026-04-232-200/+254
| | | | | | | | | The EXTEND2 handling logic is fairly self-contained, so I'm moving it outside of the `Forward` handler. This refactoring enables us to add more context to the handler (i.e. the inbound channel identities needed for #2415) without cluttering the `Forward` implementation. I recommend reviewing this commit with `git diff --color-moved`.
* relay: Modify RelayNtorKeys to use a constructorDavid Goulet2026-04-211-7/+5
| | | | | | | | | | | | Because of the sorting requirement and the fact that a `KeyMgr` can have multiple Ntor keys, the caller now explicitly extract the two Ntor keys it wants from the `KeyMgr` and then creates a `RelayNtorKeys` object with them. Future changes (#2495) will move this into a view and warn if there are more than 2 keys. Signed-off-by: David Goulet <[email protected]>
* proto: Make the CreateRequestHandler::new() take the ntor keysDavid Goulet2026-04-212-14/+20
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Use the new RelayNtorKeys for the create handlerDavid Goulet2026-04-211-9/+5
| | | | Signed-off-by: David Goulet <[email protected]>
* Merge branch 'rust-1.95-warnings' into 'main'Nick Mathewson2026-04-211-13/+5
|\ | | | | | | | | Fix new warnings from Rust 1.95 See merge request tpo/core/arti!3902
| * tor-proto: Simplify a match+if statement.Nick Mathewson2026-04-211-13/+5
| |