aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | tor-chanmgr: add support for a `CreateRequestHandler`Steven Engler2026-04-081-0/+3
| | |
| * | tor-proto: add `Channel::set_create_request_handler()`Steven Engler2026-04-082-2/+62
| | | | | | | | | | | | | | | | | | We can't pass the request handler during the `Channel` constructor since it would require conditionally compiled function arguments, which aren't nice.
| * | tor-proto: add `CreateRequestHandler`Steven Engler2026-04-084-0/+442
| | | | | | | | | | | | for handling CREATE* messages on channels.
| * | tor-proto: extend `RelayHandshakeError`Steven Engler2026-04-081-1/+27
| | |
| * | tor-proto: add a `CreateRequest` restricted msg setSteven Engler2026-04-081-1/+11
| | |
| * | tor-proto: change `CreateResponse` to `restricted_msg!`Steven Engler2026-04-082-19/+29
| | | | | | | | | | | | | | | This better fits with existing code that uses `restricted_msg!` and is a bit more flexible.
| * | tor-proto: derive `strum::EnumDiscriminants` for `Algorithm`Steven Engler2026-04-081-1/+4
| | |
| * | tor-proto: small cleanup of legacy codeSteven Engler2026-04-081-6/+1
| | | | | | | | | | | | | | | | | | | | | I think it was written like this because earlier versions of rust didn't allow references to temporaries like `&mut rand::rng()` and needed them to be bound to a variable. But this isn't necessary anymore and so the comment doesn't make sense.
| * | tor-proto: change channel to use `Runtime`Steven Engler2026-04-086-26/+44
| | | | | | | | | | | | | | | When used for relay channels, the channel reactor will soon need to spawn relay circuit reactors.
| * | tor-proto: support relay circs in channel's `CircMap`Steven Engler2026-04-082-11/+87
| | |
| * | tor-proto: rename `CircEnt::Open` to `CircEnt::OpenOrigin`Steven Engler2026-04-082-18/+20
| | | | | | | | | | | | And rename `CircMap::add_ent()` to `add_origin_ent()`.
| * | tor-proto: add `CircIdRange::is_allowed_by_peer()`Steven Engler2026-03-311-0/+8
| | |
| * | tor-proto: add `CircIdRange::integer_range()`Steven Engler2026-03-311-6/+15
| | |
* | | Merge branch 'memquota-add-parent' into 'main'gabi-2502026-04-081-6/+4
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | memquota: Add new add_parent() API Closes #2427 See merge request tpo/core/arti!3829
| * | proto: Link the memquota circ acc with the outbound chan accGabriela Moldovan2026-03-301-6/+4
| | | | | | | | | | | | Closes #2427
* | | Merge branch 'closed-stream-err' into 'main'opara2026-04-071-3/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Change an error from `CircuitClosed` to `NotConnected` Closes #2421 See merge request tpo/core/arti!3825
| * | | tor-proto: change an error to `NotConnected`Steven Engler2026-03-291-3/+7
| |/ / | | | | | | | | | | | | Returning `CircuitClosed` isn't right here since the circuit may not have closed.
* | | tor-proto: lower log level of "removing circuit leg"Steven Engler2026-04-061-1/+1
| | | | | | | | | | | | This appears often in the arti logs, but is a normal thing to happen.
* | | Merge branch 'stream-close' into 'main'opara2026-04-021-6/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Allow sending DATA cells on closed streams Closes #2434 See merge request tpo/core/arti!3824
| * | | tor-proto: allow sending DATA cells on closed streamsSteven Engler2026-03-291-6/+12
| |/ / | | | | | | | | | | | | Previously we would close the circuit, which isn't great because there can be other streams in use on the circuit.
* | / proto: Take current time as an argument when constructing padder.Nick Mathewson2026-03-312-7/+12
| |/ |/| | | | | | | | | | | Previously we'd get the time by calling Instant::now, but that would lead to a mismatch with the runtime if we were mocking. Part of #2428.
* | proto: Add debug_assert_eq() when building AuthenticateDavid Goulet2026-03-301-0/+4
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | cell: Add Authenticate::BODY_LEN as a public constDavid Goulet2026-03-301-2/+1
| | | | | | | | | | | | | | We use this constant value when building the AUTHENTICATE cell to optimize the memory allocation as this won't ever change. Signed-off-by: David Goulet <[email protected]>
* | proto: Import read_msg() instead of refering to itDavid Goulet2026-03-301-19/+4
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | proto: Improve check_relay_identities() documentationDavid Goulet2026-03-301-3/+7
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | proto: Rename RelayIdentities to RelayChannelAuthMaterialDavid Goulet2026-03-305-48/+64
| | | | | | | | | | | | | | | | | | | | | | | | This object contains a melting pot of public keys, private keys and certificates. Rename it to reflect that it is channel authentication material and not "identities. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374454 Signed-off-by: David Goulet <[email protected]>
* | proto: Remove noop function for initiator channelDavid Goulet2026-03-301-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | No need to call `set_authenticated()` for a relay initiator channel because relay initiator channel are always authenticated and thus the underlying channel cell codec will always use the R2R restricted message set. This is only useful to a relay responder channel. The naming of that function is not great actually and should probably change. Signed-off-by: David Goulet <[email protected]>
* | proto: Rename many variables with more fine grained namingDavid Goulet2026-03-306-120/+137
| | | | | | | | | | | | | | | | | | | | Mostly, identity a `ChanTarget` as a "target" since we juggle with PeerInfo and OwnedChanTarget nowadays. All certificate and keys have very specific names which attempts to match the spec as much as possible. Signed-off-by: David Goulet <[email protected]>
* | proto: Transform inner into verified after verificationDavid Goulet2026-03-302-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Only get the inner generic unverified channel into a verified channel after the actual verification in the relay responder handshake. Some variables needed a rename as this was dangerously named. No behavior change. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374481 Signed-off-by: David Goulet <[email protected]>
* | proto: Add documentation for the channel verify()David Goulet2026-03-302-2/+31
| | | | | | | | | | | | | | | | https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374476 and https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374478 Signed-off-by: David Goulet <[email protected]>
* | proto: Remove duplicate use of read_msg() helperDavid Goulet2026-03-302-82/+58
| | | | | | | | | | | | | | | | | | | | Make read_msg() into a helper and use it accross the handshake code. No behavior change. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374466 Signed-off-by: David Goulet <[email protected]>
* | proto: Add names to ignored variablesDavid Goulet2026-03-301-1/+1
| | | | | | | | | | | | https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374465 Signed-off-by: David Goulet <[email protected]>
* | proto: Set a hardcoded number into a constDavid Goulet2026-03-301-2/+3
| | | | | | | | | | | | https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374462 Signed-off-by: David Goulet <[email protected]>
* | proto: Fix a set of commentsDavid Goulet2026-03-304-11/+10
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | proto: Add AuthLogAction enum helperDavid Goulet2026-03-303-13/+30
| | | | | | | | | | | | | | | | | | We can remove the "/* take_slog */ true" pattern and instead have an explicit type at the callsite for semantic. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374457 Signed-off-by: David Goulet <[email protected]>
* | proto: Add a type alias for SLOG/CLOG digestDavid Goulet2026-03-307-29/+30
| | | | | | | | | | | | https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374457 Signed-off-by: David Goulet <[email protected]>
* | chanmgr: Always use MaybeSensitive<PeerAddr> when building a channelDavid Goulet2026-03-301-3/+3
|/ | | | Signed-off-by: David Goulet <[email protected]>
* Merge branch 'webtime-v3' into 'main'Nick Mathewson2026-03-2619-37/+44
|\ | | | | | | | | | | | | Port to use web-time for compatibility with wasm32 Closes #2356 See merge request tpo/core/arti!3820
| * tor-proto: Port to web-time-compatNick Mathewson2026-03-2619-37/+44
| |
* | proto: Add TODO about relay memquota setupGabriela Moldovan2026-03-261-0/+6
| |
* | proto: Use the inbound CircuitAccount when extending circuit (fmt)Gabriela Moldovan2026-03-262-2/+9
| |
* | proto: Use the inbound CircuitAccount when extending circuitGabriela Moldovan2026-03-263-4/+11
|/ | | | | This was previously creating a new CircuitAccount in `new_outbound_circ()`, and then immediately dropping it.
* proto: Update reactor docs to reflect ForwardHandler changeGabriela Moldovan2026-03-251-6/+37
|
* proto: Move handle_unrecognized_cell() out of ForwardHandlerGabriela Moldovan2026-03-252-50/+40
| | | | | | | | | | The `ForwardHandler` trait is meant for implementation-dependent functions that are called from the implementation-agnostic `ForwardReactor`. Previously `handle_unrecognized_cell()` was called directly by the generic `ForwardReactor`, but that's no longer the case, so it doesn't belong in the trait anymore. This commit is just code motion. Best reviewed with `--color-moved`
* proto: Forward unrecognized RELAY_EARLY as RELAY_EARLYGabriela Moldovan2026-03-253-4/+8
| | | | Closes #2417
* proto: Add tests for the relay circuit reactorGabriela Moldovan2026-03-251-0/+536
| | | | | | | | | This adds an initial set of tests for the circuit reactor. We will, of course, add more tests as we continue working on the implementation. Closes #2353
* proto: Use AllowAllStreamsFilter in relay builds tooGabriela Moldovan2026-03-251-2/+2
|
* proto: Move AllowAllStreamsFilter to crate-pub test moduleGabriela Moldovan2026-03-252-15/+19
| | | | This will soon be used by the relay tests too.
* proto: Add option to create RELAY_EARLY via rmsg_to_ccmsg() (fmt)Gabriela Moldovan2026-03-252-13/+43
|
* proto: Add option to create RELAY_EARLY via rmsg_to_ccmsg()Gabriela Moldovan2026-03-252-38/+47
| | | | This will be needed for the relay circuit reactor tests.