summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | arti-bench: Use is_multiple_of() instead of manual checkGabriela Moldovan2026-02-161-1/+1
| | | | | | | | | | | | As suggested by clippy
| * | proto: Use is_multiple_of() as suggested by clippyGabriela Moldovan2026-02-163-3/+3
| | |
| * | hashx: Use .is_multiple_of() as recommended by clippyGabriela Moldovan2026-02-161-1/+1
| | | | | | | | | | | | | | | | | | I'm applying the clippy suggestion, even though in this case, using `is_multiple_of()` instead of `%` is a bit questionable IMO, because the `% 3` operation can never panic.
| * | arti-client: Allow collapsible_if in examplesGabriela Moldovan2026-02-161-0/+1
| | |
| * | Allow clippy::collapsible_if to triggerGabriela Moldovan2026-02-1667-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | `clippy::collapsible_if` started triggering after bumping the MSRV to 1.88. Since this triggers from a lot of places, and since there even are a couple of instances where we explicitly allow `clippy::collapsible_ifs`, I've opened #2342 for deciding what to do about it.
| * | Bump MSRV from 1.86 to 1.89Gabriela Moldovan2026-02-1666-66/+66
| | | | | | | | | | | | | | | | | | | | | As agreed at our last team meeting. See https://gitlab.torproject.org/tpo/core/arti/#minimum-supported-rust-version
| * | Bump time to 0.3.47Gabriela Moldovan2026-02-166-6/+6
| |/ | | | | | | | | | | This enables us to un-ignore RUSTSEC-2026-0009. See #2341 for analysis of impact.
* | Merge branch 'relay-own-cert' into 'main'David Goulet2026-02-164-7/+26
|\ \ | | | | | | | | | | | | relay: Pass our TLS cert to the responder verify process See merge request tpo/core/arti!3665
| * | relay: Pass our TLS cert to the responder verify processDavid Goulet2026-02-124-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the responder to build the authentication data, it needs its own certificate of the TLS handshake that it is responding to (as a TLS server). This resolves an important TODO(relay) in the code. Signed-off-by: David Goulet <[email protected]>
* | | Merge branch 'chan-target-addr' into 'main'David Goulet2026-02-162-2/+33
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | tor-chanmgr: Add additional `get_or_launch()` tests and update doc comment Closes #2344 See merge request tpo/core/arti!3676
| * | tor-chanmgr: add doc comment to `ChanMgr::get_or_launch()`Steven Engler2026-02-121-0/+6
| | |
| * | tor-chanmgr: add `get_or_launch()` tests using different addrsSteven Engler2026-02-121-2/+27
| | | | | | | | | | | | | | | When there are two channel requests with the same identities and different socket addresses, we return the same channel.
* | | arti: Use ErrorSources in extract_proto_errRobert Bartlensky2026-02-141-12/+5
| | |
* | | tor-basic-utils: Add utility to iterate over error sourcesRobert Bartlensky2026-02-142-0/+113
| | |
* | | Merge branch 'ed25519-from' into 'main'wesleyac2026-02-121-0/+42
|\ \ \ | | | | | | | | | | | | | | | | tor-llcrypto: Add `Ed25519Identity::from_base64()` See merge request tpo/core/arti!3667
| * | | tor-llcrypto: add `Ed25519Identity::from_base64()`Steven Engler2026-02-101-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is intended to be analogous to `RsaIdentity::from_hex()`. I've found myself wanting this a few times, and it makes it easy to grab a `master-key-ed25519` from the consensus and paste it into the code without needing to do extra conversions.
* | | | Merge branch 'nonblocking-rpc-part1' into 'main'Nick Mathewson2026-02-1215-337/+900
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | RPC: Replace backend with nonblocking IO See merge request tpo/core/arti!3644
| * | | | rpc: re-run cbindgen to capture new warnings.Nick Mathewson2026-02-121-0/+2
| | | | |
| * | | | rpc nb: Fix documentation link.Nick Mathewson2026-02-121-1/+1
| | | | |
| * | | | rpc nb: Capitalize a letterNick Mathewson2026-02-121-1/+1
| | | | |
| * | | | rpc: Use vec::drain.Nick Mathewson2026-02-121-3/+4
| | | | |
| * | | | rpc: Flush after write.Nick Mathewson2026-02-121-1/+4
| | | | |
| * | | | rpc: Handle eintr in NonblockingStream.Nick Mathewson2026-02-121-13/+18
| | | | |
| * | | | rpc: Add "Io Safety" documentation.Nick Mathewson2026-02-121-2/+31
| | | | |
| * | | | rpc nb: Documentation improvements from diziet.Nick Mathewson2026-02-121-5/+27
| | | | |
| * | | | rpc: Clean up pub items in nb_stream.Nick Mathewson2026-02-044-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | (We don't need as many of these to be public as I had originally thought.)
| * | | | RPC: Fix documentation about "readers".Nick Mathewson2026-02-042-10/+14
| | | | |
| * | | | rpc: Replace llconn backend with nb_stream backend.Nick Mathewson2026-02-048-313/+88
| | | | | | | | | | | | | | | | | | | | All the tests still pass!
| * | | | rpc: New nonblocking backend for interacting with streamsNick Mathewson2026-02-043-0/+706
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two levels here. At the lower level, the caller is responsible for providing their own select/poll wrapper. At the higher level, we use mio to provide our own. Before the end of this branch, this new module will replace llconn.
| * | | | rpc: Move responsibility for wrapping streams to rpc-client-coreNick Mathewson2026-02-045-32/+54
| | | | | | | | | | | | | | | | | | | | | | | | | This will be necessary since, in order to make the RPC stuff nonblocking, we'll need a better API than just `Box<dyn Read>` etc.
* | | | | Merge branch 'early-relay' into 'main'gabi-2502026-02-128-133/+154
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | proto: Pass *all* cells to handle_forward_cell() Closes #2339 See merge request tpo/core/arti!3674
| * | | | Revert "proto: Add a new ToRelayMsg util"Gabriela Moldovan2026-02-127-57/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 04ab3cd848d7977baf58dd64ebfcad6aa54ecb17. Reverted because we no longer need to "peek" into the opaque `CircChanMsg` of a circuit reactor: now the implementation-dependent part of the reactor is in charge of handling the channel messages, and extracting `Relay` objects out of RELAY/RELAY_EARLY cells, which then get processed in the base reactor.
| * | | | proto: Remove unused function in relay FWD reactorGabriela Moldovan2026-02-121-7/+1
| | | | |
| * | | | proto: Move decode_relay_cell() out of ForwardHandlerGabriela Moldovan2026-02-122-43/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't need to be part of the `ForwardHandler` trait anymore, because the base reactor no longer calls it directly (instead implementations are supposed to handle it internally). No functional changes here, just code motion.
| * | | | proto: Forbid EXTEND2 from RELAY cellsGabriela Moldovan2026-02-122-2/+11
| | | | | | | | | | | | | | | | | | | | Closes #2339
| * | | | proto: Pass the early flag to handle_relay_msg() (fmt)Gabriela Moldovan2026-02-121-1/+3
| | | | |
| * | | | proto: Pass the early flag to handle_relay_msg()Gabriela Moldovan2026-02-121-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Needed because some messages are handled differently depending on the cell type they originated from (RELAY vs RELAY_EARLY).
| * | | | proto: Return a protocol error if we get too many RELAY_EARLYGabriela Moldovan2026-02-121-1/+20
| | | | |
| * | | | proto: Overhaul forward cell handlingGabriela Moldovan2026-02-122-21/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pushes the RELAY/REALY_EARLY handling inside `handle_forward_cell()`, which now decodes the relay cells and * handles them internally, if they are unrecognized (`handle_unrecognized_cell()`), or * returns them back to the base reactor if they are recognized (RELAY and RELAY_EARLY cells are handled the same way by the base reactor)
| * | | | proto: Give handle_forward_cell() a handle to the hopmgrGabriela Moldovan2026-02-122-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Soon this function will be in charge of decoding the cell too, so it will need a handle to the `HopMgr` (see `decode_relay_cell()`)
| * | | | proto: Pass *all* cells to handle_forward_cell()Gabriela Moldovan2026-02-121-6/+3
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the implementation-dependent `handle_forward_cell()` handled all forward cells *except* for RELAY cells, which were handled in the generic base reactor. This changes the implementation to pass *all* cells, including RELAY cells, to `handle_forward_cell()` too. This is needed because both RELAY and RELAY_EARLY cells need to be handled very similarly: both can be either recognized or unrecognized, with unrecognized cells being handled by the implementation-dependent code, and the recognized ones being sent to the base reactor for handling. A future commit will update `handle_forward_cell()` to extract `Relay` object out of RELAY/RELAY_EARLY cells, and return it back to the base reactor for handling.
* | | | Merge branch 'channel-canonical' into 'main'David Goulet2026-02-1214-66/+276
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Implement channel canonicity See merge request tpo/core/arti!3668
| * | | proto: Client channel need to consider PT for the targetDavid Goulet2026-02-121-6/+21
| | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | chan: Use Canonicity when choosing a channelDavid Goulet2026-02-125-6/+59
| | | | | | | | | | | | | | | | Signed-off-by: David Goulet <[email protected]>
| * | | proto: Enforce that channel method as unique SocketAddrDavid Goulet2026-02-124-28/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the channel handshake, we require the peer IP address for the canonicity check which requires the exact peer IP we are connected to. This commit adds a function that enforces this requirement on a ChannelMethod so anything else results in an error. It is to basically have stronger guarantee on the channel method we use in the handshake. Signed-off-by: David Goulet <[email protected]>
| * | | chanmgr: Use the actual channel target used on connect()David Goulet2026-02-121-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When connecting, we pass an OwnedChanTarget that can contain a list of IPs of the relay we want to connect to. The connect() picks one and return the actual OwnedChanTarget used as in the real IP address we are using. From that point on, we must only use that as the channel canonicity requires to check against the IP we believe we are connected to. This also is much better to use for error handling considering the error is on the actual channel target, not the hypothetical one. Signed-off-by: David Goulet <[email protected]>
| * | | proto: Channel finish() now handles canonicityDavid Goulet2026-02-129-32/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All handshake pass the NETINFO cell, the advertised addresses (if any) and the peer address in order to build the Canonicity and build the channel with it. In order to pull this off, the "my_addrs" were added to several object along the NETINFO cell. We also pass the channel method when connecting (initiator) to a relay as we need this for this canonicity build. Signed-off-by: David Goulet <[email protected]>
| * | | proto: Implement a Canonicity structDavid Goulet2026-02-122-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This struct will be put in a Channel and derived from the received NETINFO cell. This follows the C-tor implementation for which we have two indicator of canonicity: 1. Peer is canonical: the address they advertise in the NETINFO cell matches the one we see on the TCP connection. 2. Canonical to peer: the peer sees us as canonical. Those flag will get used to select "the best" channel. Signed-off-by: David Goulet <[email protected]>
* | | | Merge branch 'avoid-truncate-panic' into 'main'David Goulet2026-02-121-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | proto: Return internal error on TRUNCATE See merge request tpo/core/arti!3675
| * | | | proto: Return internal error on TRUNCATEGabriela Moldovan2026-02-121-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not yet implemented, so we should just return an error for now (`todo!()` will cause a panic, shutting down the thread the reactor is running on. We don't want this happening when we start manually testing our WIP impl, because depending on which thread it happens on, it can make the entire relay process unusable).