summaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
| * | tor-proto: Simplify expression using is_ok_and.Gabriela Moldovan2025-02-261-1/+1
| | | | | | | | | | | | As suggested by opara in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2804#note_3165059
| * | tor-proto: Rename Circuit variable to circ.Gabriela Moldovan2025-02-261-4/+4
| | | | | | | | | | | | | | | It used to be a Reactor, but the `reactor` variable name no longer makes sense.
| * | tor-proto: Avoid using Reactor in the circuit extender.Gabriela Moldovan2025-02-262-12/+9
| | | | | | | | | | | | | | | | | | This helps us get rid of some unnecessary error handling. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2804#note_3165058
| * | tor-proto: Begin documenting the circuit removal behavior.Gabriela Moldovan2025-02-261-1/+17
| | |
| * | tor-proto: Forbid CtrlMsg::Extend* on multipath tunnels.Gabriela Moldovan2025-02-251-0/+20
| | | | | | | | | | | | We definitely don't want to ever allow this.
| * | tor-proto: Avoid panicking on double CtrlMsg::Create.Gabriela Moldovan2025-02-252-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, sending two `CtrlMsg::Create` to the reactor would cause it to panic. This makes it so that the double `Create` just leads to the caller receiving an error response via the completion channel. Note: this was not triggerable via the network, only via the tor-proto API. Moreover, the panic was unreachable from the public client API, because the `PendingClientCirc`/`ClientCirc` typestate makes it impossible to send a second `Create` (the `PendingClientCirc` becomes `ClientCirc` after the `Create` completes, and `PendingClientCirc` doesn't have an API for sending `Create` control messages to the reactor).
| * | tor-proto: Update docs to refer to Circuit instead of Reactor.Gabriela Moldovan2025-02-251-3/+3
| | |
| * | tor-proto: Add some more conflux-related TODOs.Gabriela Moldovan2025-02-251-0/+10
| | |
| * | tor-proto: Use a ConfluxSet in the circuit reactor.Gabriela Moldovan2025-02-254-48/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first step toward supporting traffic splitting in the circuit reactor. While the logic has changed slightly to support handling circuits instead of just one, the reactor still only supports `ConfluxSet`s of size 1, so this should effectively be a no-op. In the future, this code will be extended to support the conflux-specific cells and to implement the conflux proto. The code uses `ConfluxSet::primary_leg()` and `ConfluxSet::single_leg()` somewhat interchangeably. This is not *currently* a problem because`primary_leg()` is the same as `single_leg()` for single path tunnels, but we will need to adjust some of these call sites when we add support for multipath tunnels (I have left a `TODO(conflux)` for every dubious call site). This commit also makes `CtrlMsg::FirstHopClockSkew` fallible: if the reactor is multipath, it will return `Err(Bug(..))` to the caller (this error is returned to the caller over the `answer` channel; it does *not* shut down the reactor)
| * | tor-proto: Add a ConfluxSet type.Gabriela Moldovan2025-02-253-0/+78
| | |
| * | tor-proto: Move most of the reactor impl to Circuit (fmt).Gabriela Moldovan2025-02-252-8/+24
| | |
| * | tor-proto: Move most of the reactor impl to Circuit.Gabriela Moldovan2025-02-254-70/+60
| | | | | | | | | | | | | | | | | | | | | This is an intermediate step in rewriting the reactor to manage a "conflux set" (a set of linked circuits) rather than a single circuit. This commit contains no functional changes.
| * | tor-proto: Factor out stream management functionality.Gabriela Moldovan2025-02-252-21/+43
| | | | | | | | | | | | | | | These will soon be functions on `Circuit`, so it's a good time to pull them out of the reactor impl.
| * | tor-proto: Shuffle reactor impl in preparation for refactoring.Gabriela Moldovan2025-02-251-466/+466
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reorders the functions from the `Reactor` implementation in preparation for moving some of them to `Circuit`. This commit contains no functional changes and should be reviewed with `git diff --color-moved`. A future commit will move part of the `Reactor` impl block to `Circuit`.
| * | tor-proto: Move cell handlers into a separate type (fmt).Gabriela Moldovan2025-02-251-3/+10
| | |
| * | tor-proto: Move cell handlers into a separate type.Gabriela Moldovan2025-02-252-44/+56
| | | | | | | | | | | | | | | I am moving these handlers into a separate type because they'll need to be shared with the active `Circuit`, for handling incoming cells.
| * | tor-proto: Add a reactor-internal Circuit type.Gabriela Moldovan2025-02-251-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | This represents a circuit "leg", in the conflux sense. The `Circuit` type will be a helper for implementing tunnel reactors that contain multiple `Circuit`s forming a conflux set. The fields from `Circuit` were extracted from the `Reactor` struct. A future commit will part of the `Reactor` implementation to `Circuit`.
| * | tor-proto: Add line breaks between impl blocks.Gabriela Moldovan2025-02-251-0/+4
| | | | | | | | | | | | For readability
| * | tor-proto: Implement From<Bug> for ReactorError.Gabriela Moldovan2025-02-251-1/+6
| |/ | | | | | | | | | | | | | | | | | | We will soon have a `ConfluxSet` type. Some of its operations will return `Bug` (for example, the method for getting the *only* leg of the conflux set will return a `Bug` if the set has no legs, or more than 1 leg). This conversion function will make it easier these errors to `ReactorError`.
* / Upgrade to derive_more 2Nick Mathewson2025-02-261-1/+1
|/ | | | | This took a little refactoring, since derive_more::Foo no longer re-exports std::ops::Foo.
* tor-proto: add variants to `HopLocation` behind `conflux` featureSteven Engler2025-02-242-7/+10
|
* tor-proto: add experimental 'conflux' featureSteven Engler2025-02-241-1/+2
|
* tor-proto: add `HopLocation` and `TargetHop`Steven Engler2025-02-241-0/+29
|
* tor-proto: Add a tunnel module.David Goulet2025-02-2027-210/+242
| | | | | | | | | | | | | Move StreamTarget to the tunnel module and the circuit module. From now on streams will be implemented on tunnels, not circuits. This moves `StreamTarget` to the tunnel module. A future change will replace `ClientCirc` with `ClientTunnel` inside `StreamTarget`. This is mostly code motion, best reviewed with `--color-moved`. Signed-off-by: David Goulet <[email protected]>
* tor-proto: Change the visibility of a series of structGabriela Moldovan2025-02-203-17/+17
| | | | | | | We're about to need this in `tor_proto::tunnel` which is from the Conflux work. In the spirit of upstreaming as much as possible, it is done now.
* tor-proto: Add a newtype wrapper for LegId.Gabriela Moldovan2025-02-201-4/+12
| | | | | We will eventually need to expose this in `tor-proto`'s public API, so it'll need to be an opaque type.
* tor-proto: Add LegId type that can be used as a slotmap key.Gabriela Moldovan2025-02-201-0/+8
| | | | | This will soon be used by the reactor-internal `ConfluxSet` as a unique identifier for the circuit legs stored in its `SlotMap`.
* tor-proto: Move CreateHandshakeWrap to reactor module (fmt).Gabriela Moldovan2025-02-181-3/+1
|
* tor-proto: Move CreateHandshakeWrap to reactor module.Gabriela Moldovan2025-02-183-57/+67
| | | | | This moves the `CreateHandshakeWrap` and its implementors to `reactor::create` (none of these are used outside of the reactor).
* tor-proto: Remove deprecated DataStream API.Gabriela Moldovan2025-02-131-32/+0
| | | | | Reducing `ClientCirc` proliferation will make our lives easier when implementing !2790.
* Update to derive-deftly 1.0Ian Jackson2025-02-121-1/+1
| | | | | | | | | This is released now. Prepared with: cargo upgrade -i -p derive-deftly There is some new duplication now I think mostly because pwd-grp uses old derive-deftly.
* tor-proto: Fold the CommandHandler into ControlHandler.Gabriela Moldovan2025-02-112-95/+79
| | | | | | | | This gets rid of a bit of a duplicated code. It also moves `CtrlCmd` closer to `CtrlMsg`. Offshoot from my WIP conflux branch for #1838
* tor-proto: added 'semver.md' fileSteven Engler2025-02-101-0/+1
|
* tor-proto: remove `ClientCirc::channel`Steven Engler2025-02-101-26/+2
|
* tor-proto: add `ClientCirc::first_hop_clock_skew`Steven Engler2025-02-103-0/+33
|
* conflux: Split off `time_provider` from `channel` in `ClientCirc`Neel Chauhan2025-02-101-2/+7
|
* Merge branch 'remove-reactor-param' into 'main'David Goulet2025-02-102-18/+5
|\ | | | | | | | | tor-proto: Remove unnecessary param in handshake handler. See merge request tpo/core/arti!2774
| * tor-proto: Remove unnecessary param in handshake handler (fmt).Gabriela Moldovan2025-02-061-12/+3
| |
| * tor-proto: Remove unnecessary param in handshake handler.Gabriela Moldovan2025-02-062-6/+2
| | | | | | | | | | | | | | | | | | The `Reactor` argument is never used, so we can just remove it from the trait. Removing this arg also simplifies #1838 for me (I am moving some code around, and the calls to `handle_sever_aux_data` no longer have access to the `Reactor`).
* | Remove semver.md files post releaseIan Jackson2025-02-071-5/+0
| |
* | Merge branch 'versions' into 'main'Ian Jackson2025-02-061-18/+18
|\ \ | | | | | | | | | | | | Version bumps for 1.4.0 See merge request tpo/core/arti!2773
| * | Version bumps to 0.27.0Ian Jackson2025-02-061-18/+18
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See Release.md. maint/list_crates | grep -P '^tor-|^arti-' | xargs -n1 nailing-cargo -Eu set-version --bump minor -p This completes the version bumps. The report of changed crates, before I started the release work, is: $ maint/changed_crates -v "arti-v$LAST_VERSION" oneshot-fused-workaround: No change. slotmap-careful: No change. test-temp-dir: No change. fslock-guard: No change. hashx: No change. equix: No change. tor-basic-utils: No change. caret: No change. fs-mistrust safelog: No change. retry-error: No change. tor-error tor-general-addr: No change. tor-geoip: No change. tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim: No change. tor-rpcbase tor-memquota: No change. tor-units tor-llcrypto: No change. tor-protover: No change. tor-bytes tor-checkable: No change. tor-cert tor-key-forge tor-hscrypto: No change. tor-socksproto: No change. tor-linkspec: No change. tor-cell: No change. tor-proto tor-netdoc: No change. tor-consdiff: No change. tor-netdir tor-relay-selection: No change. tor-persist tor-chanmgr tor-ptmgr: No change. tor-guardmgr: No change. tor-circmgr tor-dirclient: No change. tor-dirmgr: No change. tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy: No change. tor-relay-crypto arti-client arti-relay arti-rpcserver arti arti-rpc-client-core $
* | Fix Cargo.toml features formattingIan Jackson2025-02-061-1/+3
| | | | | | | | Manual line breaks which fixup-features doesn't know how to add.
* | Add some missing "full" featuresIan Jackson2025-02-061-1/+1
|/ | | | | | | Precisely the results of maint/fixup-features. Some crates end up with slightly odd formatting, which I will fix in a moment.
* tor-proto: remove `use asynchronous_codec as futures_codec`Neel Chauhan2025-02-063-18/+18
| | | | Closes #1690.
* tor-proto: Make ControlHandler::handler return non-optional result.Gabriela Moldovan2025-02-062-14/+14
| | | | | | The commands for which the function returned `Ok(None)` have been refactored into `CtrlCmd`, so we no longer need `handle()` to return an `Option`.
* tor-proto: Turn some CtrlMsgs into CtrlCmds.Gabriela Moldovan2025-02-063-147/+166
| | | | | | | All `CtrlMsg`s to which the reactor did not respond by sending a cell down the channel are now `CtrlCmd`s. Most of this is code motion, best reviewed with `--color-moved`.
* tor-proto: Make shutdown a CtrlCmd.Gabriela Moldovan2025-02-063-26/+58
|
* proto: Fix feature gated importDavid Goulet2025-02-041-2/+5
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Move the begin cell handling into CircHopDavid Goulet2025-02-042-47/+38
| | | | | | | Move the BEGIN cell handling into CircHop following the previous commit that move more code into CircHop. Signed-off-by: David Goulet <[email protected]>