summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | 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`.
* | | | Merge branch 'upgrades-2025-02' into 'main'Nick Mathewson2025-02-2643-50/+55
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Upgrades for next release See merge request tpo/core/arti!2809
| * | | | Upgraede to der-parser 10Nick Mathewson2025-02-261-1/+1
| | | | |
| * | | | Upgrade to directories 6Nick Mathewson2025-02-262-2/+2
| | | | |
| * | | | Upgrade to derive_more 2Nick Mathewson2025-02-2641-45/+50
| | | | | | | | | | | | | | | | | | | | | | | | | This took a little refactoring, since derive_more::Foo no longer re-exports std::ops::Foo.
| * | | | Upgrade to notify 8.Nick Mathewson2025-02-262-2/+2
| | |_|/ | |/| |
* / | | tor-congestion: temporarily set `publish = true`Steven Engler2025-02-261-2/+3
|/ / /
* | | Merge branch 'happy-families' into 'main'Nick Mathewson2025-02-2517-47/+489
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Client implementation for happy families Closes #1848 See merge request tpo/core/arti!2792
| * | | netdir: Consider RelayFamilyIds based on family rulesNick Mathewson2025-02-254-27/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements the client side of proposal 321. It's a breaking change in netdir, since in_same_family now takes an extra argument.
| * | | relay-selection: Add FamilyRules to exclude_relays_in_same_family.Nick Mathewson2025-02-256-18/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're trying to exclude relays by family, we need to know which lists to look at. This information ultimately comes from the network parameters. We could avoid this change if we just told clients "look at all family information all the time", but that's not what the proposal says. This is a breaking change.
| * | | guardmgr: flag to indicate whether a FirstHop is a BridgeNick Mathewson2025-02-251-0/+9
| | | | | | | | | | | | | | | | | | | | This will affect some details of path selection as we provide more info about families.
| * | | netdir: Add client params related to happy families (prop321)Nick Mathewson2025-02-251-0/+10
| | | |
| * | | netdoc: Add "family-cert" entries to routerdesc parserNick Mathewson2025-02-252-3/+141
| | | |
| * | | netdoc: Add "family-ids" line to microdesc parserNick Mathewson2025-02-123-2/+64
| | | |
| * | | netdoc: Type to represent a relay family idNick Mathewson2025-02-121-1/+81
| | | | | | | | | | | | | | | | | | | | This corresponds to the entries in "family-ids" in the happy families design.
| * | | cert: reserve 0x0C for FAMILY_V_IDENTITY (happy families) certs.Nick Mathewson2025-02-111-0/+4
| | | |
* | | | Merge branch 'rtmock-thread' into 'main'Ian Jackson2025-02-251-91/+525
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | tor-rtmock: Provide a facility for handling other threads See merge request tpo/core/arti!2793
| * | | tor-rtmock: Avoid confusing "concurrently" wordIan Jackson2025-02-251-2/+2
| | | |
| * | | tor-rtmock: Explain Subthreads and compare them with bare threadsIan Jackson2025-02-251-0/+31
| | | |
| * | | tor-rtmock: Capitalise Subthread and link to the definitionIan Jackson2025-02-251-25/+29
| | | | | | | | | | | | | | | | | | | | This makes it clearer that this is a specific term, which a definition.
| * | | tor-rtmock: Fix a typoIan Jackson2025-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2793#note_3161972
| * | | tor-rtmock: Move imprecations to more prominent locationIan Jackson2025-02-251-11/+9
| | | | | | | | | | | | | | | | | | | | The rustdocs for a fn in a trait impl are rendered, but are very unobvious. Put the information in the top-level documentation.
| * | | tor-rtmock: subthread facilityIan Jackson2025-02-131-7/+381
| | | | | | | | | | | | | | | | We'll expose this with some new traits in tor_rtmock.
| * | | tor-rtmock: subthread facility (pre-fmt)Ian Jackson2025-02-131-2/+10
| | | |
| * | | tor-rtmock: Replace open-coded Debug impl with DeriveIan Jackson2025-02-131-34/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No change to output, but much less open-coding. Move the doc comment that was on the Debugg impl, to the `DebugTasks` helper struct.
| * | | tor-rtmock tests: Improve various_mock_executorsIan Jackson2025-02-131-0/+1
| | | | | | | | | | | | | | | | Show where each test sub-case is started, in stderr output.
| * | | tor-rtmock tests: Break out various_mock_executorsIan Jackson2025-02-131-5/+10
| | | | | | | | | | | | | | | | We're going to add another call site.
| * | | tor-rtmock: Break out Task::set_awakeIan Jackson2025-02-131-7/+19
| | | | | | | | | | | | | | | | We're going to add another call site.
| * | | tor-rtmock: task: Rename MockExecutor Arc<Shared> field to sharedIan Jackson2025-02-131-17/+17
| | | |
| * | | tor-rtmock: task: Replace ArcMutexData with Arc<Shared>Ian Jackson2025-02-131-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to want to add a field inside the Arc but not inside the Mutex, so make the Arc contents into a named-fields struct. We don't need ArcMutexData any more. Arc<Shared> will do fine. Previously, we needed to implement .lock() on ArcMutexData but because Arc<Shared> derefs to Shared, we can implement it on Shared just as well. The field in MockExecutor ought to be renamed, but that's textually intrusive so will come in the next commit.
| * | | tor-rtmock: Correct a commentIan Jackson2025-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | In an earlier version of this code there was a Polling state, but there isn't now.
* | | | 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
| |_|/ |/| |
* | | arti-rpcserver: Fix operator precedence warning.Gabriela Moldovan2025-02-241-1/+1
| | | | | | | | | | | | | | | This fixes an "operator precedence can trip the unwary" warning that showed up after I updated my toolchain to 1.85.