aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | tor-proto: add some log messages after circuit handshakeSteven Engler2026-07-271-0/+5
|/ /
* | Merge branch 'clippy' into 'main'opara2026-07-271-1/+1
|\ \ | |/ |/| | | | | Fix some recently-appearing clippy lints See merge request tpo/core/arti!4240
| * tor-proto: Remove a redundant explicit link targetIan Jackson2026-07-271-1/+1
| | | | | | | | Found by rustdoc.
* | tor-proto: add a TODO for crypt protocol and cc alg logicSteven Engler2026-07-271-0/+4
| |
* | tor-proto: add `HandshakeSubprotocols`Steven Engler2026-07-272-9/+49
| | | | | | | | | | | | The advantage of this over using a `SubprotocolRequest` is that we can use the type system to ensure it only has subprotocols that are allowed during a handshake.
* | tor-proto: remove `CircNetParameters::extend_by_ed25519_id`Steven Engler2026-07-273-6/+0
| | | | | | | | | | We never used this, it was just needed because we used to convert to a `CircParameters` which required this.
* | tor-proto: add `HopSettings::from_handshake_params()`Steven Engler2026-07-272-71/+115
|/ | | | | | | | | | | | | | | ... and also remove `CircNetParameters::as_circ_parameters()`. We used to call `HopSettings::from_params_and_caps()` when handling incoming circuit requests, but this didn't really make sense because we already know exactly what settings we want. The new `HopSettings::from_handshake_params()` takes the exact settings we want, which means we can also skip constructing a `CircParameters` and use the raw consensus `CircNetParameters`. Most of the code in `CircNetParameters::as_circ_parameters()` has been migrated in some form to `HopSettings::from_handshake_params()`.
* proto: Include the actual cell command in an error messageGabriela Moldovan2026-07-231-3/+5
| | | | | | | This can happen if we get an unexpected BEGIN_DIR/RESOLVE too, so we can't hard-code "BEGIN" in the error message. Context: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4230#note_3439258,
* proto: Remove feature-gating from CircHop::handle_msg()Gabriela Moldovan2026-07-233-6/+4
| | | | | | | | | | | | | | | This feature-gating has been a source of confusion, and it unnecessarily complicates the stream message handling flow. I've previously argued in favour of keeping it, in the spirit of a belt and braces approach to message validation, but I've been convinced that in this particular case, the feature-gate is more trouble than it's worth. What makes things worse is that the `CircHop::handle_msg()` function was designed poorly (by yours truly). I plan on refactoring it at some point, hopefully soon. There is a TODO about this below its doc comment.
* tor-checkable: Rename `TimeBound::is_valid_at` to `check_valid_at`Ian Jackson2026-07-231-1/+1
| | | | | I find this names confusing. To my mind "is" implies a function returning `bool`.
* tor-checkable: TimeBound: Make wrapped type an associated typeIan Jackson2026-07-231-3/+3
| | | | | It wouldn't make much sense for one concrete type to be unwrappable variously as different inner types.
* tor-checkable: TimeBound: remove Error associated typeIan Jackson2026-07-231-1/+1
| | | | | This was always TimeValidityError. And we want to rely on that so we can do the validity checking more centrally.
* proto: Remove misleading comment about CircuitIncomingStreamReceiverGabriela Moldovan2026-07-221-3/+0
|
* proto: Update CreateRequestHandler::new() docsGabriela Moldovan2026-07-221-1/+2
| | | | | As suggested in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4222#note_3437129
* proto: Reword CircuitIncomingStreamReceiver docs for clarityGabriela Moldovan2026-07-221-1/+2
| | | | Applies @opara's suggested rephrasing.
* proto: Return the incoming streams from the create handler (fmt)Gabriela Moldovan2026-07-221-8/+10
|
* proto: Return the incoming streams from the create handlerGabriela Moldovan2026-07-222-12/+60
| | | | | | | | | | | We need to return the "futures::Stream of Tor streams" from the CREATE handler, because these need to be handled from `arti-relay`, as per `doc/dev/notes/relay-streams.md` This commit is intentionally (slightly) misformatted to make reviewing a bit easier (the next commit will rustfmt everything). Part of #2612
* proto: Add newtype wrapper for incoming stream receiverGabriela Moldovan2026-07-222-2/+43
| | | | | The inner type is an eyesore, and doesn't really need to be exposed outside of tor-proto (we might even replace it at some point).
* proto: Adjust feature-gating around incoming streamsGabriela Moldovan2026-07-221-1/+1
| | | | | This applies to relays too, not just onion services (we need to to handle BEGIN/BEGIN_DIR/RESOLVE).
* Apply deferred rustfmt churnIan Jackson2026-07-161-1/+1
|
* Use new TimeBound name throughout the treeIan Jackson2026-07-161-2/+2
|
* Merge branch 'remove-lint' into 'main'Jim Newsome2026-07-153-6/+1
|\ | | | | | | | | | | | | Removed unnecessary lint Closes #2556 See merge request tpo/core/arti!4210
| * Remove now-unneeded allow(clippy::cognitive_complexity)Jim Newsome2026-07-152-2/+0
| |
| * add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
| |
| * lib.rs: remove stale commentJim Newsome2026-07-151-2/+0
| |
| * Removed unnecessary lintpryty262026-07-151-2/+1
| | | | | | | | Removed unnecessary lint
* | Merge branch 'clippy_warning' into 'main'Jim Newsome2026-07-131-1/+1
|\ \ | | | | | | | | | | | | multiple crates: Fix clippy warnings See merge request tpo/core/arti!4203
| * | multiple crates: Fix clippy warningshjrgrn2026-07-101-1/+1
| |/
* | Merge branch 'upgrade-cipher' into 'main'gabi-2502026-07-134-14/+25
|\ \ | |/ |/| | | | | Upgrade cipher, aes, and ctr. See merge request tpo/core/arti!4195
| * Upgrade cipher, aes, and ctr.Nick Mathewson2026-07-134-14/+25
| |
* | hsclient: Support protocol negotiation for CGO and flowctrl-ccNick Mathewson2026-07-021-0/+6
| |
* | proto: Allow HsV3 to use cgo.Nick Mathewson2026-07-021-2/+8
| |
* | proto: Do not automatically disable CC with hsv3.Nick Mathewson2026-07-021-5/+0
| | | | | | | | | | | | | | We _already_ do not include FLOWCTRL_CC as a listed protocol among the capabilities we provide, when we make a virtual hop. This branch will make that behavior even more certain, by not looking at required-client-protocols any longer.
* | proto: log virtual hop additions at trace.Nick Mathewson2026-07-021-0/+2
| | | | | | | | We do something similar with non-virtual hops at !4076.
* | proto: Improve/clarify documentation on extend_virtual.Nick Mathewson2026-07-021-0/+8
| |
* | Merge branch 'stream-msg-parse' into 'main'gabi-2502026-07-022-23/+53
|\ \ | | | | | | | | | | | | | | | | | | proto: Allow BeginDir and Resolve messages in the stream reactor Closes #2613 See merge request tpo/core/arti!4188
| * | proto: Add TODO about the eventual client-side reactor rewriteGabriela Moldovan2026-07-021-0/+10
| | | | | | | | | | | | | | | See https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4188#note_3432579
| * | proto: Re-enable IncomingCmdChecker test (fmt)Gabriela Moldovan2026-07-011-2/+6
| | |
| * | proto: Re-enable IncomingCmdChecker testGabriela Moldovan2026-07-011-14/+7
| | | | | | | | | | | | | | | These assertions no longer fail now that the stream reactor is able to handle non-`BEGIN` streams.
| * | proto: Allow BeginDir and Resolve messages in the stream reactor (fmt)Gabriela Moldovan2026-07-011-1/+3
| | |
| * | proto: Allow BeginDir and Resolve messages in the stream reactorGabriela Moldovan2026-07-011-9/+30
| |/ | | | | | | | | | | | | Previously, these would fail to parse, because the (WIP) stream reactor assumed all streams would be exit (BEGIN) streams. Closes #2613
* / Upgrade to itertools 0.15.0Nick Mathewson2026-07-011-10/+9
|/ | | | | | Additionally, fix itertools usage in maybenot_padding.rs The definition of `Position` changed in 0.15.0.
* proto: Add test for the incoming stream cmd allow listGabriela Moldovan2026-06-301-0/+48
| | | | | | | Tests that the customizable `IncomingCmdChecker` added for #2606 is doing its job, by ensuring that the circuit reactor doesn't emit `IncomingStream`s for incoming streams created with commands that are not in the reactor's allow list.
* proto: Update tests to pass the incoming cmd allow list to the reactor (fmt)Gabriela Moldovan2026-06-301-12/+21
|
* proto: Update tests to pass the incoming cmd allow list to the reactorGabriela Moldovan2026-06-301-10/+12
|
* proto: Pass the allowed incoming commands to the relay reactorGabriela Moldovan2026-06-302-1/+3
| | | | | | | | The `CreateRequestHandler` now passes the list of allowed "incoming stream request" commands (i.e. BEGIN, BEGIN_DIR, or RESOLVE) to the reactor, replacing the hard-coded command list. Closes #2606
* proto: Pass the allowed incoming commands to CreateRequestHandlerGabriela Moldovan2026-06-302-0/+14
| | | | | | | | | | | This enables us to make these configurable: any relays that are not configured to be an exit will exclude BEGIN and RESOLVE from their list of allowed commands, causing exit and DNS streams to be rejected as soon as the BEGIN/RESOLVE cell is received in the circuit reactor. Context: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4145#note_3430345 Part of #2606
* proto: Remove confusing blurb about IncomingStream handlingGabriela Moldovan2026-06-291-3/+5
|
* proto: Clarify wording in relay reactor constructorGabriela Moldovan2026-06-291-1/+5
|
* proto: Say why INCOMING_BUFFER is set to STREAM_READER_BUFFERGabriela Moldovan2026-06-291-0/+5
|