aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
* | | proto: Make tor-relay-crypto an optional dependencyGabriela Moldovan2026-04-011-2/+2
|/ / | | | | | | | | | | We only need this for `relay` builds. Closes #2450
* | Merge branch 'fixes_mr3791' into 'main'David Goulet2026-03-319-335/+369
|\ \ | | | | | | | | | | | | Address post-merge comments from nickm's review in mr 3791 See merge request tpo/core/arti!3802
| * | 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]>
* | Update to derive-deftly 0.10.0.Ian Jackson2026-03-311-1/+1
| | | | | | | | There are no breaking changes.
* | Bump versions: tor-* and arti-* unstable cratesIan Jackson2026-03-301-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with nailing-cargo -Eu set-version -p arti-client 0.41.0 nailing-cargo -Eu set-version -p arti-relay 0.41.0 nailing-cargo -Eu set-version -p arti-rpcserver 0.41.0 nailing-cargo -Eu set-version -p arti-ureq 0.41.0 nailing-cargo -Eu set-version -p arti-rpc-client-core 0.41.0 nailing-cargo -Eu set-version -p tor-basic-utils 0.41.0 nailing-cargo -Eu set-version -p tor-error 0.41.0 nailing-cargo -Eu set-version -p tor-general-addr 0.41.0 nailing-cargo -Eu set-version -p tor-geoip 0.41.0 nailing-cargo -Eu set-version -p tor-memquota-cost 0.41.0 nailing-cargo -Eu set-version -p tor-llcrypto 0.41.0 nailing-cargo -Eu set-version -p tor-cert-x509 0.41.0 nailing-cargo -Eu set-version -p tor-rtcompat 0.41.0 nailing-cargo -Eu set-version -p tor-rtmock 0.41.0 nailing-cargo -Eu set-version -p tor-async-utils 0.41.0 nailing-cargo -Eu set-version -p tor-config 0.41.0 nailing-cargo -Eu set-version -p tor-config-path 0.41.0 nailing-cargo -Eu set-version -p tor-rpc-connect 0.41.0 nailing-cargo -Eu set-version -p tor-log-ratelim 0.41.0 nailing-cargo -Eu set-version -p tor-rpcbase 0.41.0 nailing-cargo -Eu set-version -p tor-memquota 0.41.0 nailing-cargo -Eu set-version -p tor-units 0.41.0 nailing-cargo -Eu set-version -p tor-bytes 0.41.0 nailing-cargo -Eu set-version -p tor-protover 0.41.0 nailing-cargo -Eu set-version -p tor-checkable 0.41.0 nailing-cargo -Eu set-version -p tor-cert 0.41.0 nailing-cargo -Eu set-version -p tor-key-forge 0.41.0 nailing-cargo -Eu set-version -p tor-hscrypto 0.41.0 nailing-cargo -Eu set-version -p tor-socksproto 0.41.0 nailing-cargo -Eu set-version -p tor-linkspec 0.41.0 nailing-cargo -Eu set-version -p tor-cell 0.41.0 nailing-cargo -Eu set-version -p tor-persist 0.41.0 nailing-cargo -Eu set-version -p tor-keymgr 0.41.0 nailing-cargo -Eu set-version -p tor-relay-crypto 0.41.0 nailing-cargo -Eu set-version -p tor-proto 0.41.0 nailing-cargo -Eu set-version -p tor-netdoc 0.41.0 nailing-cargo -Eu set-version -p tor-consdiff 0.41.0 nailing-cargo -Eu set-version -p tor-netdir 0.41.0 nailing-cargo -Eu set-version -p tor-relay-selection 0.41.0 nailing-cargo -Eu set-version -p tor-chanmgr 0.41.0 nailing-cargo -Eu set-version -p tor-ptmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dircommon 0.41.0 nailing-cargo -Eu set-version -p tor-guardmgr 0.41.0 nailing-cargo -Eu set-version -p tor-circmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirclient 0.41.0 nailing-cargo -Eu set-version -p tor-dirmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirserver 0.41.0 nailing-cargo -Eu set-version -p tor-hsclient 0.41.0 nailing-cargo -Eu set-version -p tor-hsservice 0.41.0 nailing-cargo -Eu set-version -p tor-hsrproxy 0.41.0
* | Bump versions: patchlevel, with dependenciesIan Jackson2026-03-301-1/+1
| | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with cargo set-version --offline --bump patch -p safelog
* | Plumb web-time-compat/full dependency through everywhere.Ian Jackson2026-03-301-0/+1
|/ | | | As generated by maint/fixup-features.
* Merge branch 'webtime-v3' into 'main'Nick Mathewson2026-03-2620-37/+45
|\ | | | | | | | | | | | | 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-2620-37/+45
| |
* | 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.
* proto: Move rmsg_to_ccmsg to crate-pub test moduleGabriela Moldovan2026-03-252-10/+34
| | | | We'll soon need this for the relay reactor tests too.
* proto: Replace fully-qualified path with import aliasGabriela Moldovan2026-03-251-1/+1
|
* tor-proto: change `dyn ChannelProvider` to also be `Sync`Steven Engler2026-03-242-3/+3
| | | | | An `Arc<T>` is only `Send` if `T` is `Send + Sync`, which is needed by the runtime.
* tor-proto: change relay circ reactor `new()` to `pub(crate)`Steven Engler2026-03-241-1/+1
| | | | | I plan to call this from `crates/tor-proto/src/channel/reactor.rs`.
* Fix typosTobias Stoeckmann2026-03-2412-13/+13
| | | | Typos found with codespell
* Merge branch 'half-stream-expiry3' into 'main'gabi-2502026-03-233-53/+55
|\ | | | | | | | | | | | | proto: Replace TimeoutEstimator with opaque handler Closes #2410 See merge request tpo/core/arti!3794
| * proto: Remove now-unused TimeoutEstimator argumentGabriela Moldovan2026-03-191-2/+0
| |
| * proto: Replace TimeoutEstimator with opaque handlerGabriela Moldovan2026-03-193-50/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the client-specific half-stream expiry calculation from the stream reactor (which is meant to be implementation agnostic) with a call to the new `StreamHandler::halfstream_expiry()`, which abstracts away the implementation-specific half-stream expiry calculation (for example, on the client-side, the calculation takes into account the CBT, which we don't have on the relay side). Note that there is currently no `StreamHandler` implementation on the client-side (because we haven't ported the client circuit reactor to the new reactor yet). Closes #2410
| * proto: Implement StreamHandler for relaysGabriela Moldovan2026-03-191-1/+29
| |
| * proto: Add a trait for customizing StreamReactor behaviorGabriela Moldovan2026-03-191-0/+13
| | | | | | | | | | This will enable us to handle half-stream expiry differently on the client side vs the exit side.
* | Merge branch 'build_certs_refactor' into 'main'Nick Mathewson2026-03-232-20/+11
|\ \ | | | | | | | | | | | | cell, proto, cert: Simplify CERTS cell building. See merge request tpo/core/arti!3795
| * | cell: Feature-gate API using the possibly absent EncodedCert type.Nick Mathewson2026-03-231-1/+1
| | |
| * | cell, proto, cert: Simplify CERTS cell building.Nick Mathewson2026-03-191-19/+10
| |/ | | | | | | | | | | | | | | Formerly we required the caller for push_cert_body to specify the type of the cert that they were pushing. But in nearly every case, the certificate object that the caller is holding knows what its own type is! This makes the tor_proto build_certs_cell function a bit less error-prone, since we don't have to worry about mismatch.
* | Merge branch 'gating-cleanup' into 'main'Ian Jackson2026-03-232-5/+1
|\ \ | | | | | | | | | | | | proto: Remove unnecessary test-gating See merge request tpo/core/arti!3796
| * | proto: Remove unnecessary feature-gatingGabriela Moldovan2026-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | `test_utils` is not exposed outside of `tor-proto`, so the feature gating here isn't needed (we typically use the `testing` feature for exposing testing utilities outside the current crate, but that's not the case here).