summaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/tunnel.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-041-1/+0
| | | | | | | | | Fixes part of #2193. (Edits from nickm: I selected the cases here that I could verify were correct from immediate context.) Edited-by: Nick Mathewson <[email protected]>
* opentelemetry: Add some instrument macros.Wesley Aptekar-Cassels2025-09-241-0/+2
| | | | | I've added these in places that are useful for the debugging that I've been doing.
* proto: Add a circuit module shared between client and relay impls.Gabriela Moldovan2025-08-281-2/+3
| | | | | | | This is just code motion (I suggest reviewing with `--color-moved`). This also moves the implementation-agnostic parts from `tor_proto::client::circuit` to a new `tor_proto::circuit` module.
* proto: Move the `stream` module under `client` (fmt).Gabriela Moldovan2025-08-181-1/+3
|
* proto: Move the `stream` module under `client` (breaking).Gabriela Moldovan2025-08-181-3/+3
| | | | | | | | | | | | The `stream` module is client-specific, for the most part, so I am moving it under `client`. Later on, we will factor out the parts that can be shared with the relay implementation. Note: this is a breaking change as the deleted `stream` module was `pub`. We could've kept the module and reexported from it the public types from `tor_proto::client::stream`, but I think it's better to have this `client` namespacing, because it makes the separation between the client and relay parts clearer.
* Fix warnings and errors from edition 2024.Nick Mathewson2025-08-071-4/+7
| | | | | | | | | | The two main causes of errors were: - Since some of the lifetime rules have changed, we no longer need to do as many "bind a variable and immediately return it" patterns, and so clippy now warns about them. - We needed to adjust the explicit captures (`use<...>`) in a couple of our RPIT instances.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* Update code for Edition 2024Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | | | | | 1. Run cargo fix --edition 2. Selectively revert the "if let"->"match" changes. These changes are meant to protect us from the lifetime changes for "if let" bindings in Rust 2024. But we're not actually relying on the old lifetime rules anywhere, and the match syntax here is quite ugly. 3. Automatically revert `$pat:expr_2021` to `$pat:expr`. (We don't actually want to restrict the expression syntax that our macros accept). Done with `git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'` 4. Run cargo fmt.
* circmgr: Feature gate multi path tunnel with conflux flagDavid Goulet2025-08-051-0/+4
| | | | Signed-off-by: David Goulet <[email protected]>
* Revert "circmgr: Feature-gate all the onion service tunnel types."Gabriela Moldovan2025-08-051-9/+1
| | | | This reverts commit 9dca6010d17e2a4b9deee34c9bb66e523a6ac834.
* circmgr: Feature-gate all the onion service tunnel types.Gabriela Moldovan2025-08-051-1/+9
| | | | | We shouldn't be exposing these unless `hs-service`/`hs-client` is enabled.
* conflux: Adjust docs and fix doc links.Gabriela Moldovan2025-08-051-2/+3
|
* proto: abolish path_ref() in favor of all_paths().Gabriela Moldovan2025-08-051-12/+1
| | | | | | | | | | | | | Until now, we've been using `ClientCirc::path_ref()` to get the *only* path of a circuit. Now that `ClientCirc` is a handle to a tunnel reactor (which may or may not be multi-path), we need to decide for each call site of `path_ref()`, if we actually want *all* paths in the tunnel, or if we expect the tunnel to be single-path and thus want the *only* path in the tunnel. I've added two new APIs to address this: `all_paths()`, for getting all the paths in the tunnel, and `single_path()` for getting the only path in the tunnel, or an error if the tunnel is single-path.
* circmgr: Feature-gate ServiceOnionServiceIntroTunnel to fix compile errors.Gabriela Moldovan2025-08-051-0/+1
|
* circmgr: Feature-gate send_raw_msg.Gabriela Moldovan2025-08-051-0/+1
|
* circmgr: Gate tor_proto::handshake usage behind hs-common.Gabriela Moldovan2025-08-051-1/+6
|
* proto, circmgr: Fix feature-gating.Gabriela Moldovan2025-08-051-1/+2
|
* circmgr: Fully-qualify types in macro.Gabriela Moldovan2025-08-051-4/+2
|
* tunnel: Implement start_conversation() for all tunnel typesDavid Goulet2025-08-051-9/+15
| | | | | | | | | | 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]>
* 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-051-0/+481
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]>