summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | proto: remove unused cpu_time dev-dependencyLionel Goffaux2025-05-221-1/+0
| | |
| * | proto: remove bench pub wrappersLionel Goffaux2025-05-2214-409/+232
| | |
* | | ./maint/cargo_sort: Run cargo-sort on the entire workspace.Gabriela Moldovan2025-05-2725-77/+194
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The [latest version] of `cargo-sort` is more opinionated than the previous one, and is now causing the `rust-checks` job to fail on `main`. This commit applies the fixes needed to satisfy the new `cargo-sort` rules. These changes were generated by running `cargo sort --workspace` several times, until `cargo sort --check --workspace` finally succeeded (it couldn't fix all the errors in one go, for some reason). I have omitted the changes `cargo-sort` made to the top-level `Cargo.toml`, to preserve the topological ordering of the workspace members. Closes #2014 [latest version]: https://github.com/DevinR528/cargo-sort/blob/f066ae80e5e6f5c1d8f0e2b8099461dcb97d9656/changelog.md#200
* | Merge branch 'stuck_in_the_middle_with_you' into 'main'Nick Mathewson2025-05-2213-161/+400
|\ \ | |/ |/| | | | | | | | | Don't use MiddleOnly relays for rend points or intro points Closes #1911 See merge request tpo/core/arti!3007
| * hspool: Explain _why_ ClientRend is Guarded.Nick Mathewson2025-05-221-4/+12
| | | | | | | | (text from Gabi)
| * hspool: refactor path match to be exhaustive.Nick Mathewson2025-05-221-7/+11
| |
| * hspool: ClientRend first should be GuardedNick Mathewson2025-05-221-4/+5
| | | | | | | | On !3007, @gabi-250 says that it was a mistake to have it be Naive.
| * Apply 1 suggestion(s) to 1 file(s)Nick Mathewson2025-05-221-1/+1
| | | | | | Co-authored-by: gabi-250 <[email protected]>
| * circmgr: Apply last-hop-in-stem usage when retrieving a stem circ.Nick Mathewson2025-05-201-20/+85
| | | | | | | | Closes #1911.
| * circmgr: when building client rend stems, make sure last hop has new_rend usage.Nick Mathewson2025-05-202-28/+72
| |
| * guardmgr, circmgr: Make vanguard selection take a RelaySelector.Nick Mathewson2025-05-206-52/+89
| | | | | | | | | | | | This is the preferred type for choosing a relay, since unlike a RelayExclusion, it lets us add multiple restrictions, and a relay usage.
| * circmgr: Propagate Option<HsCircKind> down to path selection functionsNick Mathewson2025-05-204-46/+103
| | | | | | | | | | | | We'll need this in order to build paths that are specifically for client rend circuits. I thought of using a boolean here, but that had potential to get ugly in the future.
| * circmgr: Change get_or_launch_stem to take a HsCircKindNick Mathewson2025-05-201-13/+22
| | | | | | | | | | | | We're going to be looking at this a little more closely in order to decide whether the last hop of a stem can be used as a rendezvous point.
| * circmgr: rename ensure_circuit_{compatible_with => can_extend_to}_targetNick Mathewson2025-05-201-6/+3
| | | | | | | | | | There are two other functions called "compatible_with_target" that check a different property, so this one was confusing.
| * relay-selection: Rename RendPoint usage to NewRendPoint.Nick Mathewson2025-05-201-8/+10
| | | | | | | | | | | | | | This mirrors NewIntroPoint, and helps us to remember that we only want to use this usage when we're a client that's picking a rendezvous point; we don't want to enforce it when we're a relay connecting to a client-selected rendezvous point.
| * relay-selection: tweak messages about rejection reasonsNick Mathewson2025-05-203-8/+8
| | | | | | | | | | | | "Useless as xyz" implies that the relay wouldn't work at all as a middle relay, but that's not true: it _would_ work somewhat, but be can't use it for some other reason.
| * netdir, relay-selection: require Fast and Stable for rendpoints.Nick Mathewson2025-05-202-2/+4
| | | | | | | | | | | | Since we don't know what kind of traffic we'll use a rendezvous point for, we don't want to use it if it isn't "Fast" (reasonably high bw) and "Stable" (unlikely to crash soon).
| * hs: Prevent a client from using a `MiddleOnly` relay for onion servicesNeel Chauhan2025-05-204-10/+23
| | | | | | | | | | | | > The actual impact of this patch is to prevent usage of MiddleOnly > relays as Introduction Points. The Rendezvous Point logic isn't > hooked up yet - nick
* | Merge branch 'drop-rustls-letsencrypt-kludge' into 'main'Nick Mathewson2025-05-213-48/+13
|\ \ | | | | | | | | | | | | | | | | | | rtcompat: remove Letsencrypt/Rustls kludge Closes #2004 See merge request tpo/core/arti!3006
| * | rtcompat: remove Letsencrypt/Rustls kludgeretort-dev2025-05-203-48/+13
| | |
* | | Merge branch 'extend_ntor-fix' into 'main'Nick Mathewson2025-05-211-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | tor-proto: Prevent sink and rx from being dropped in-place. Closes #2005 See merge request tpo/core/arti!3005
| * | tor-proto: Prevent sink and rx from being dropped in-place.Gabriela Moldovan2025-05-201-1/+1
| |/ | | | | | | | | | | | | | | | | This was supposed to be fixed in 164d6b4d6c5, but that change failed to bind `sink` and `rx in `futures::join!`, causing `sink` and `rx` to get dropped, which would, in turn, cause the channel and circuit reactors to shut down, sometimes leading to intermittent failures (#2005). Closes #2005
* | tor-proto: Add TODO about multipath rend circuits.Gabriela Moldovan2025-05-201-0/+6
| |
* | tor-proto: Clarify that we need HopLocation, not TargetHop.Gabriela Moldovan2025-05-201-2/+2
| | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3002#note_3200935
* | tor-proto: Remove now-unused ConfluxSet::legs().Gabriela Moldovan2025-05-201-5/+0
| |
* | Revert "tor-proto: add a non-pub `ClientCirc::legs()` method"Gabriela Moldovan2025-05-202-32/+4
| | | | | | | | | | | | | | | | This reverts commit c2d9ea952b4dcb91d05ee754e8d1a6ec6a0689b2. `QueryLegs` is now unused. We also decided we won't need it for implementing `Tunnel::path_ref()` as we are keeping the `MutableState` between `ClientCirc` and the reactor (see !2996).
* | tor-proto: Remove multi-path check from allow_stream_requests() (fmt).Gabriela Moldovan2025-05-201-1/+8
| |
* | tor-proto: Remove multi-path check from allow_stream_requests().Gabriela Moldovan2025-05-203-23/+35
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, `ClientCirc:allow_stream_requests()` would return an error when called on a multi-path tunnel. My main reason for removing the conflux set length check is because it enables us to remove the `QueryLegs` control command (which is something we were planning on doing anyway). Note that now that we've removed `ClientCirc::legs(), there's no way for a multi-path `ClientCirc` to access its circuit legs, but that is fine, because it's currently impossible to build multi-path `ClientCirc`s in arti anyway. This issue will be addressed in the fork, in the new `ClientTunnel` type that will be used for multi-path tunnels (a `ClientCirc` will only ever be single-path, so it won't need to have a `legs()` function at all). I am also removing the `TODO(conflux)` that justifies the now-removed check, because it's outdated (nowadays the `CellHandlers` are shared between the tunnel reactor and its circuits). That said, we *still* don't support onion service conflux, but that will be tackled separately because there are a bunch of issues that still need to be resolved to make it work (which I'll document separately). Note that I've also made some changes to pass the `LegId` of the circuit that received the incoming stream request to `StreamReqInfo` and `StreamTarget`. This is in preparation for supporting multipath onion service conflux, and because the `HopLocation` from `StreamTarget` *needs* a `LegId`.
* Merge branch 'todo1' into 'main'Ian Jackson2025-05-201-78/+57
|\ | | | | | | | | arti: Fix TODO + Minor Refactor See merge request tpo/core/arti!2935
| * arti: cfg::test Rework refactorplaybahn2025-05-191-9/+8
| |
| * arti: cfg::test: Fix TODO + Minor refactorplaybahn2025-04-261-76/+56
| |
* | Merge branch 'arti-ureq-remove-early-return' into 'main'Ian Jackson2025-05-192-5/+1
|\ \ | | | | | | | | | | | | | | | | | | arti-ureq: Remove obsolete early return in await_input Closes #1952 See merge request tpo/core/arti!2997
| * | arti-ureq: Remove obsolete early return in await_inputNiel Duysters2025-05-192-5/+1
| | |
* | | *: use std::io::Error::other in many placesNick Mathewson2025-05-1512-39/+19
| | | | | | | | | | | | | | | | | | | | | The `IoError::other` function is an easier way to say `IoError::new(IoErrorKind::Other, ...)`. It's been around since 1.74, but clippy started warning about the more verbose version in 1.87.
* | | arti: resolve a variant-size-difference warning.Nick Mathewson2025-05-152-2/+2
| | |
* | | rtmock: use Option::replace instead of mem::replaceNick Mathewson2025-05-151-8/+6
| | | | | | | | | | | | | | | Option::replace has been around since 1.31, but the clippy warning is new.
* | | proto: temporarily suppress warning; see #2003.Nick Mathewson2025-05-152-2/+3
| | |
* | | netdir: fix warning about an opportunity to use saturating_subNick Mathewson2025-05-151-5/+1
| | |
* | | guardmgr: Fix clippy warning about needlessly owned cow.Nick Mathewson2025-05-151-1/+1
| | |
* | | tor-proto: Future-proof some comments about path_ref() errors.Gabriela Moldovan2025-05-151-2/+2
| | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2996#note_3199590
* | | tor-proto: Return Error::Protocol if ClientCirc accessors return an error.Gabriela Moldovan2025-05-151-32/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `ClientCirc` accessors will only return an error if the underlying circuit is closed, so it doesn't make sense to map these errors to `Bug`. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2996#note_3199072 and https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2996#note_3199073
* | | tor-proto: Make TunnelMutableState docs link to MutableState.Gabriela Moldovan2025-05-151-11/+3
| | | | | | | | | | | | | | | These `TunnelMutableState` impls just delegate to `MutableState`, so we might as well link to the corresponding docs.
* | | tor-proto: Add note about raciness of last_hop_num.Gabriela Moldovan2025-05-151-0/+15
| | |
* | | tor-proto: Add TODO about possibly replacing LegIdKey with UniqId.Gabriela Moldovan2025-05-151-0/+3
| | |
* | | tor-proto: Remove the CircuitSharedState type alias.Gabriela Moldovan2025-05-151-6/+2
| | | | | | | | | | | | Hiding the underlying type makes the code less readable.
* | | tor-proto: Clarify the MutableState::path() docs.Gabriela Moldovan2025-05-151-1/+1
| | |
* | | tor-proto: Update the TunnelMutableState when a circuit is removed.Gabriela Moldovan2025-05-1510-38/+88
| | | | | | | | | | | | | | | | | | | | | | | | This is messy, because `ClientCirc::{path_ref, n_hops, ..}` become fallible (we can't unwrap the result, because when a circuit is closed, its state gets removed from the `TunnelSharedState`, but its `ClientCirc` handle continues to exist, so any attempt to retrieve the state will result in an `Err`).
* | | tor-proto: Rework MutableState to work with multi-path circuits.Gabriela Moldovan2025-05-154-31/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have a new `TunnelSharedState` type for storing the shared state of a tunnel. It consists of the `MutableState`s of all the circuits in the tunnel, which are shared between it and `Circuit` (the circuit subcomponent of the reactor). The `TunnelSharedState` itself is shared between `ConfluxSet` (which manages the `Circuits`), and `ClientCirc` (the reactor handle used to access information about circuits, such as their `Path`).
* | | tor-proto: Add From<LegIdKey> impl for LegId.Gabriela Moldovan2025-05-151-0/+6
| | | | | | | | | | | | This will simplify some callsites.
* | | tor-proto: Encapsulate MutableState operations inside impl.Gabriela Moldovan2025-05-153-42/+66
| | | | | | | | | | | | | | | Not locking the `MutableState` mutex outside of this impl makes it easier to see it's currently impossible deadlock.