summaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
| * proto: Upgrade to latest polyval.Nick Mathewson2026-03-042-3/+10
| | | | | | | | | | | | This will improve performance for CGO. Closes #2390.
* | tor-cell: rename `RestrictedMsg::restricted_cmds()` to `cmds_for_logging()`Steven Engler2026-03-042-2/+2
| |
* | tor-proto: small code cleanupSteven Engler2026-03-032-18/+6
| |
* | tor-proto: improve error messages using `RestrictedMsg`Steven Engler2026-03-032-35/+17
| |
* | tor-proto: improve error messages during handshakeSteven Engler2026-03-032-5/+7
|/
* tor-proto: during handshake ensure circ id is 0Steven Engler2026-03-032-4/+18
|
* tor-proto: require cells from initiator to be orderedSteven Engler2026-03-031-61/+112
|
* tor-proto: require cells from responder to be orderedSteven Engler2026-03-032-61/+97
|
* tor-proto: make receiving AUTH_CHALLENGE non-optionalSteven Engler2026-03-032-8/+3
|
* tor-proto: remove `is_expecting_auth_challenge()`Steven Engler2026-03-033-14/+1
| | | | The responder always sends an AUTH_CHALLENGE cell.
* tor-proto: send an AUTH_CHALLENGE during testsSteven Engler2026-03-031-0/+2
| | | | | | | As far as I know, a responder will always send an AUTH_CHALLENGE cell since it doesn't yet know if the initiator is a client or relay. The spec also doesn't have any mention about the AUTH_CHALLENGE being optional. So we should send it in our tests as well.
* safelog: Rename MaybeSensitive::hidden/visible()David Goulet2026-03-036-10/+14
| | | | | | Rename them to respectively sensitive() and not_sensitive(). Signed-off-by: David Goulet <[email protected]>
* linkspec: Implement a RelayIdsBuilder::from_relay_ids()David Goulet2026-03-031-6/+2
| | | | | | | | | This is used when we build an OwnedChanTarget using the builder. Instead of going identities by identities at the callsite, we can use this helper to get us a RelayIds builder and set it in the OwnedChanTargetBuilder. Signed-off-by: David Goulet <[email protected]>
* proto: Channel handshake minor cleanupDavid Goulet2026-03-033-11/+12
| | | | | | | | | | To make the code a bit better here. Also, at this commit, the UnverifiedChannel::finish() and VerifiedChannel::finish() are basically the exact same. A refactoring to use a finish() helper would work nicely. Signed-off-by: David Goulet <[email protected]>
* proto: Setup the channel PeerInfo in the specialized finish()David Goulet2026-03-036-67/+73
| | | | | | | | | | | Every specific types know if the peer is sensitive or not so now the finish() of each of these channel types builds the right PeerInfo with MaybeSensitive. This is passed on the Channel so from that point on, the Channel will never leak peer data in the logs. Signed-off-by: David Goulet <[email protected]>
* proto: Make PeerInfo accessors pub(crate)David Goulet2026-03-031-2/+8
| | | | | | | | And implement Display as well. This is for the upcoming changes to be able to wrap PeerInfo into a MaybeSensitive<> container which can be logged safely hence the Display. Signed-off-by: David Goulet <[email protected]>
* proto: Implement Display for PeerAddrDavid Goulet2026-03-031-1/+1
| | | | | | This required to implement Display for PtTarget. Signed-off-by: David Goulet <[email protected]>
* proto: Make channel PeerAddr sensitiveDavid Goulet2026-03-035-25/+33
| | | | | | | Only the R2R channel that the PeerAddr becomes unsensitive. The rest, we keep it sensitive as it can be a client or a client's guard/bridge. Signed-off-by: David Goulet <[email protected]>
* Merge branch 'slog-clog' into 'main'opara2026-03-032-54/+84
|\ | | | | | | | | tor-proto: rename 'SLOG'/'CLOG' and related code See merge request tpo/core/arti!3732
| * tor-proto: rename 'SLOG'/'CLOG' and related codeSteven Engler2026-03-022-54/+84
| |
* | Remove semver.md files post-releaseGabriela Moldovan2026-03-031-3/+0
| |
* | Bump all the unstable tor- and arti- crates to 0.40.0.Gabriela Moldovan2026-03-021-20/+20
| | | | | | | | | | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.40.0 done
* | Bump the versions of the non-{arti-,tor-} cratesGabriela Moldovan2026-03-021-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list-crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy ``` Because this release bumps the MSRV, I am bumping the minor version of all of them. MINOR=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* Merge branch 'relay-channel-fixes' into 'main'David Goulet2026-02-263-5/+4
|\ | | | | | | | | relay: Couple fixes related to channel creation See merge request tpo/core/arti!3726
| * proto: Remove/fix some very minor TODO(relay)David Goulet2026-02-262-5/+0
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * proto: Add 'CreateFast/CreatedFast' to relay message filterSteven Engler2026-02-261-0/+4
| |
* | proto: The AUTHENTICATE cell requires the SHA256 RSA identity digestDavid Goulet2026-02-262-27/+36
|/ | | | | | | Before this commit, we would use the RsaIdentity which is a SHA1 digest. We do the same for the peer RSA key. Signed-off-by: David Goulet <[email protected]>
* proto: Implement the build_certs_cell() helperDavid Goulet2026-02-253-27/+13
| | | | | | | It was all commented out until now that we have a final RelayIdentities. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Use CircIdRange::Low for relay channelsDavid Goulet2026-02-251-1/+5
| | | | | | Closes #1601 Signed-off-by: David Goulet <[email protected]>
* tor-proto: improve debug tracing messageSteven Engler2026-02-241-2/+2
| | | | | | | | | | | | | | Before: ```text Completed handshake with Ed25519Identity { ClByyE4zT+p3dudeCVkUfVA1zp2y2sOUe7u/HHLliWU } [(RsaIdentity { $547bb37f9cd8079eaf1cfcb73fff5887d6f58138 }, [9, 111, 131, 62, 212, 144, 149, 88, 211, 87, 175, 114, 18, 111, 189, 36, 205, 21, 66, 205, 217, 176, 139, 130, 70, 211, 40, 130, 79, 29, 144, 179])] ``` After: ```text Completed handshake with ed25519:wo9NA5RXkPAc7sB2301JBpvdk1RvSOGZEzgwuWP/msA [$feebaba2b6faf53ae1dc8dda8681ce026537dfa4] ```
* tor-proto: split field into two fieldsSteven Engler2026-02-242-7/+11
| | | | | These were previously in a single `Option`, but now that the `Option` was removed, I think it's nicer to make these separate fields.
* tor-proto: remove unnecessary `Option`sSteven Engler2026-02-242-26/+10
| | | | | | I don't think that the `Option`s are needed anymore, since unauthenticated channels no longer transition through the `VerifiedChannel` state.
* chanmgr: Don't allow to build relay channel to ourselfDavid Goulet2026-02-241-2/+12
| | | | | | | | | | The validate_relay_target() is meant to probably have more checks in the future hence the vagueness of it instead of being specific to the goal of this patch. Closes #1699 Signed-off-by: David Goulet <[email protected]>
* proto: Modify RelayIdentities to have encodable certDavid Goulet2026-02-231-13/+16
| | | | | | | This commit also adds the TlsKeyAndCert to the identities so the TLS acceptor can set it up. Signed-off-by: David Goulet <[email protected]>
* proto: Filter the IP address in the channel's OwnedChanTargetDavid Goulet2026-02-191-23/+35
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Reuse the RelayIds builder during the handshakeDavid Goulet2026-02-191-18/+11
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Pass PeerAddr at the channel handshake finish for initiatorsDavid Goulet2026-02-197-68/+35
| | | | | | | | | | Responder relay handshake requires the peer address at the very start as it sends its NETINFO right away. For initiators, we only need it during the finalization process which is when the NETINFO is sent and the Channel is created. Signed-off-by: David Goulet <[email protected]>
* proto: Use constructor for PeerInfo instead of BuilderDavid Goulet2026-02-192-18/+16
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Remove Default of PeerInfo/Addr and use const insteadDavid Goulet2026-02-194-31/+41
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Fix clippy errorsDavid Goulet2026-02-191-3/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Put a PeerInfo in ChannelDavid Goulet2026-02-193-3/+40
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Use the PeerAddr accross channel handshakeDavid Goulet2026-02-198-69/+76
| | | | | | | This is a large change but it is basically using PeerAddr in the channel builder through the channel handshake code and into the Channel itself. Signed-off-by: David Goulet <[email protected]>
* proto: Add PeerInfo and PeerAddr in src/peer.rsDavid Goulet2026-02-193-0/+163
| | | | | | | | | | | | | | The plan is to create PeerInfo when we do a transport connect() which indicates the exact values that are being used for to connect to the peer. We'll then put this struct in the Channel so we can use it when picking the best channel in the ChanMgr. Unfortunately, the OwnedChanTarget has a confusing and even possibly wrong API from which we can't have guarantees. Signed-off-by: David Goulet <[email protected]>
* proto: Remove unused ChannelBuilderDavid Goulet2026-02-192-77/+4
| | | | Signed-off-by: David Goulet <[email protected]>
* Merge branch 'circ-sync-view-streams' into 'main'gabi-2502026-02-1610-117/+45
|\ | | | | | | | | | | | | proto: Replace circuit-scoped `CircSyncView` with per-hop alternative Closes #2351 See merge request tpo/core/arti!3680
| * proto: Remove unfinished sentence from docsGabriela Moldovan2026-02-161-2/+0
| |
| * proto: Update IncomingStreamRequestFilter docsGabriela Moldovan2026-02-161-2/+3
| | | | | | | | | | The `CircHopSyncView` is now the view of a hop, not of the whole circuit.
| * proto: Rename CircSyncView to CircHopSyncView (fmt)Gabriela Moldovan2026-02-161-1/+1
| |
| * proto: Rename CircSyncView to CircHopSyncViewGabriela Moldovan2026-02-167-23/+15
| | | | | | | | And update the docs
| * proto: Remove unused n_open_streams() functionsGabriela Moldovan2026-02-161-17/+0
| |