aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-circmgr
Commit message (Collapse)AuthorAgeFilesLines
...
* | circmgr: Fully-qualify types in macro.Gabriela Moldovan2025-08-051-4/+2
| |
* | circmgr: Add back cognitive_complexity allows.Gabriela Moldovan2025-08-052-0/+2
| | | | | | | | | | These were removed somewhere along the way (which is now causing the clippy checks to fail).
* | circmgr: Fix unit testsDavid Goulet2025-08-052-15/+15
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | tunnel: Implement start_conversation() for all tunnel typesDavid Goulet2025-08-052-9/+17
| | | | | | | | | | | | | | | | | | | | The BaseTunnel now has a start_conversation() which takes a TargetHop meaning it can be used with a multi path tunnel. The Conversation object has been moved into the tunnel namespace out of the circuit one. Signed-off-by: David Goulet <[email protected]>
* | hs: Use the new Tunnel interface for onion serviceDavid Goulet2025-08-054-12/+90
| |
* | circmgr: Return more type specific tunnelDavid Goulet2025-08-052-8/+12
| | | | | | | | | | | | | | | | | | | | This is the first step towards making the circmgr return high level tunnel types (wrappers around ClientTunnel). Future commits will then modify each subsystems to use those specific types. They are split in order to reduce complexity. Signed-off-by: David Goulet <[email protected]>
* | tunnel: Implement Buildable for ClientTunnelDavid Goulet2025-08-055-84/+88
| | | | | | | | | | | | | | | | | | | | | | | | In order to pull this off, the Arc requirement needs to go away because the Arc<ClientCirc> is now within the ClientTunnel. This commit also has a rename of the CircuitBuilder to TunnelBuilder in order to reflect the change that it now builds a ClientTunnel. There is a slight rename in tor-proto as well just for accuracy. Signed-off-by: David Goulet <[email protected]>
* | proto: Change PendingClientCirc to yield back a ClientTunnelDavid Goulet2025-08-051-3/+3
| | | | | | | | | | | | And rename it in the process to "PendingClientTunnel". Signed-off-by: David Goulet <[email protected]>
* | circmgr: Major rename for the new Tunnel namespaceDavid Goulet2025-08-058-625/+635
| | | | | | | | | | | | | | | | | | | | | | | | The CircMgr will no longer yield circuits but tunnels (src/tunnel.rs). This is a first step to rename most circuit related objects to use "tunnel" instead. Some "circuit" names have been kept for more precise definitions. No behavior changes. Signed-off-by: David Goulet <[email protected]>
* | proto: Add last_hop() to Tunnel interfaceDavid Goulet2025-08-051-0/+14
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | circmgr: New Tunnel object interfaceDavid Goulet2025-08-053-0/+492
| | | | | | | | | | | | | | | | | | | | Introduce the new Tunnel structs that is planned to expose publicly as a replacement to `ClientCirc`. Future commits will make those tunnel objects be used accross the code base up until tor-proto which than handles Circuit directly. Signed-off-by: David Goulet <[email protected]>
* | Bump version of tor-basic-utilsIan Jackson2025-08-051-1/+1
| | | | | | | | This was accidentally omitted from my version bump script.
* | Version bumps for 1.4.6Ian Jackson2025-08-051-24/+24
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made with the following shell script: export CARGO='nailing-cargo -Eu' # Non-functional changes only maint/bump_nodep hashx # Special $CARGO set-version -p arti 1.4.6 # Additional features, no breaking changes, depended on in tree $CARGO set-version -p safelog 0.4.8 # Unconditional bump to 0.33.0 xargs -I P <<END $CARGO set-version -p P 0.33.0 tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* circmgr: Apply incoming cell limits to hsdir connectionsNick Mathewson2025-07-101-1/+12
|
* Bump all the unstable tor- and arti- crates to 0.32.0.Gabriela Moldovan2025-07-071-24/+24
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.32.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ``` We split them in the following categories: * crates with no changes (no version bumps): None ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` * crates that only have non-functional changes (bump the patch version): - oneshot-fused-workaround - slotmap-careful - test-temp-dir - fslock-guard - hashx - equix - caret - safelog - retry-error * crates where APIs were broken (bump minor): - fs-mistrust (the implicit once_cell feature was removed) The bumps from this commit were created using this script: ``` PATCH=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret safelog retry-error " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" fs-mistrust " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* Improve descriptions of rejected relays: omit "rejected 0/X"Nick Mathewson2025-06-251-3/+3
| | | | | | | | Now instead of saying "rejected 0/40 as not usable as middle relay; 28/40 as in same family as already selected", we say "rejected 28/40 as in same family as already selected". Closes #2006.
* tor-circmgr: Reduced dependency on `once_cell`hashcatHitman2025-06-141-2/+2
| | | | | | - Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`. Signed-off-by: hashcatHitman <[email protected]>
* proto: Refactor cc fallback.Nick Mathewson2025-06-101-9/+13
| | | | | The fallback CC algorithm is _always_ fixed-window, and we should only use it when the selected CC algorithm is not supported.
* Move responsibility for choosing extensions into tor-protoNick Mathewson2025-06-101-19/+3
| | | | | | | | | Now tor-circmgr no longer needs to check which Protover capabilities are enabled, or construct a separate CircParameters for each hop. Instead, tor-proto decides whether to use the fallback CC mode, based on whether the target supports FLOWCTRL_CC. Closes #1967.
* tor-circmgr: fix docs failureSteven Engler2025-06-091-2/+2
|
* release: Delete semver.md files after release.Alexander Hansen Færøy2025-06-051-1/+0
|
* release: Bump all tor-/arti- crates to 0.31.0.Alexander Hansen Færøy2025-06-051-24/+24
| | | | | | | | This was done using: for crate in $(./maint/list_crates | grep -P '^tor-|^arti-'); do cargo set-version -p $crate 0.31.0 done
* *: suppress cognitive_complexity warnings from nightlyNick Mathewson2025-05-293-0/+5
| | | | | | | | | | | | | Apparently clippy nightly is better (or worse?) about detecting complex functions than before, so I'm suppressing these warnings where they occur. I have mixed feelings about these warnings: On the plus side, they really do help to detect functions that are twistier than they need to be. On the minus side, they get confused by tracing macros, and the "allows" do pile up. But on the plus side, those "allows" do provide a way to find functions that need to be refactored, and they are never uglier than the functions they decorate.
* ./maint/cargo_sort: Run cargo-sort on the entire workspace.Gabriela Moldovan2025-05-271-1/+6
| | | | | | | | | | | | | | | | | | | 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
* 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-203-32/+62
| | | | | | 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: tweak messages about rejection reasonsNick Mathewson2025-05-201-3/+3
| | | | | | "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.
* 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: Update the TunnelMutableState when a circuit is removed.Gabriela Moldovan2025-05-155-13/+36
| | | | | | | | 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`).
* Resolve clippy warnings from 1.83Nick Mathewson2025-05-131-2/+1
| | | | | Now that our MSRV is 1.83, clippy is happy to make more recommendations for us.
* All crates: bump rust-version to 1.83.Nick Mathewson2025-05-131-1/+1
|
* Merge branch 'clientcirc_extend' into 'main'Nick Mathewson2025-05-065-19/+11
|\ | | | | | | | | | | | | tor-proto: New extend() and create_firsthop() to pick between ntor and ntor3 Closes #1970 See merge request tpo/core/arti!2967
| * proto: Provide and use a create_firsthop() wrapper too.Nick Mathewson2025-04-281-7/+2
| |
| * circmgr: Rename AbstractCirc::{extend_ntor => extend}Nick Mathewson2025-04-284-6/+5
| | | | | | | | | | We don't want to be thinking about ntor vs ntor3 in circmgr.
| * tor-proto: New extend() to pick between ntor and ntor3Nick Mathewson2025-04-282-7/+5
| | | | | | | | | | | | | | | | | | In the future, when we add more circuit handshakes (PQ anyone?) we'll want to have the logic for choosing which to use be unified. Almost nobody calling tor-proto should need to care which circuit handshake is going to be used. Closes #1970.
* | circmgr: Make path module public on "--features=experimental-api"Nick Mathewson2025-05-051-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Back in 4c1eb94173521bc5104449327650e20ffe32afa7, for sensible reasons, we made `tor_circmgr::path` a crate-private module. But when we did that, we lost the ability for callers to construct circuits with custom paths. This will make it possible for callers to build custom circuits again, without committing to a very-long-term API for that. Closes #1981.
* | release: Bump all unstable tor/arti crates to 0.30.0Wesley Aptekar-Cassels2025-05-012-25/+24
| | | | | | | | | | | | | | | | ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.30.0 done ```
* | maint: Update semver.md files from semver-checksWesley Aptekar-Cassels2025-04-301-0/+1
| |
* | Update rand requirement to 0.9.1Nick Mathewson2025-04-291-1/+1
| | | | | | | | | | (This is going to be a _requirement_, since rand 0.9.1 has a behavioral change from 0.9.0)