summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | tor-netdoc: Move some Microdesc methodsIan Jackson2026-06-221-20/+23
| | | | | | | | | | | | | | | | | | | | Code motion, plus adding a new impl block, to make the next commit clearer.
* | | | Merge branch 'trivial-encode-string-slice' into 'main'Clara Engler2026-06-251-2/+1
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | tor-netdoc: Replace trivial string slice See merge request tpo/core/arti!4143
| * | | tor-netdoc: Replace trivial string sliceClara Engler2026-06-241-2/+1
| | | |
* | | | tor-cell: remove `derive_more::Into` for `RelayEarly`Steven Engler2026-06-242-1/+2
| | | | | | | | | | | | | | | | | | | | We don't use this anymore, and it can lead to subtle bugs since we lose the original channel message command.
* | | | tor-proto: pass correct chan msg cmd to `decrypt_outbound()`Steven Engler2026-06-242-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of converting the `RelayEarly` message to a `Relay` message, we add a new `RelayMaybeEarlyChanMsg` restricted message set that can hold either. Previously we were passing the wrong channel message command to `decrypt_outbound()`, which would cause the decryption to fail for relay crypto algorithms that use the command.
* | | | tor-netdoc: Replace string slices with str::get() in doc (fmt)Clara Engler2026-06-243-5/+19
| | | | | | | | | | | | | | | | No functional change, just reformatting.
* | | | tor-netdoc: Replace string slices with str::get() in docClara Engler2026-06-245-14/+9
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces the use of string slices with str::get() in all document related code. While this is not a perfect replacement for it, the relevant parts in the code heavily depend upon the byte offsets returned by the low level (legacy) parser where changing it would lead to a very big refactoring. Nonetheless, this approach is better because returning a bug is better than crashing.
* | | Merge branch 'intern' into 'main'Clara Engler2026-06-2417-59/+200
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Introduce Intern<T> Closes #2587 See merge request tpo/core/arti!4130
| * | tor-netdoc: Fix rs.rs cache commentsClara Engler2026-06-241-1/+1
| | | | | | | | | | | | Removes a blocking comment and replaces it with a TODO DIRAUTH.
| * | Make &Arc comment less controverisalClara Engler2026-06-241-1/+1
| | |
| * | Improve GloballyInternable::intern_cache() rustdocClara Engler2026-06-241-0/+3
| | |
| * | Fix GloballyInternable rustdoc commentClara Engler2026-06-241-1/+1
| | |
| * | Remove no longer required AsRef implClara Engler2026-06-241-9/+0
| | | | | | | | | | | | This is no longer required due to Deref
| * | Derive Clone for InternClara Engler2026-06-241-7/+1
| | | | | | | | | | | | We can do so now directly.
| * | Derive Deref for InternClara Engler2026-06-241-10/+2
| | | | | | | | | | | | If we derive it, we get access to Arc<T>, which is okay.
| * | Add Intern::new_uncached_uninterned()Clara Engler2026-06-241-1/+13
| | | | | | | | | | | | If one really wants to circumvent the guarantees ...
| * | tor-basic-utils: Add GloballyInternable::into_intern() (fmt)Clara Engler2026-06-241-2/+1
| | | | | | | | | | | | No functional change.
| * | tor-basic-utils: Add GloballyInternable::into_intern()Clara Engler2026-06-245-6/+16
| | | | | | | | | | | | As a shorthand for T::intern_cache().intern(value).
| * | Derive From Intern for Arc using derive-moreClara Engler2026-06-241-11/+2
| | |
| * | tor-netdoc: Intern rational improvementClara Engler2026-06-241-2/+5
| | |
| * | Add missing semver.md entriesClara Engler2026-06-242-0/+5
| | |
| * | tor-protover: Make blocking TODO non-blockingClara Engler2026-06-241-1/+1
| | | | | | | | | | | | Let's leave this untouched for now as it is not urgent right now.
| * | tor-netdoc: Wrap port policies in InternClara Engler2026-06-247-20/+22
| | | | | | | | | | | | This commit wraps the port policies in an Intern.
| * | tor-netdoc: Wrap family in InternClara Engler2026-06-245-12/+16
| | | | | | | | | | | | This commit wraps the relay family in an Intern instead of an Arc.
| * | tor-netdoc: Implement encode traits for Intern wrappersClara Engler2026-06-241-0/+35
| | | | | | | | | | | | Just a boilerplate implementation.
| * | tor-netdoc: Implement parse2 traits for Intern wrappersClara Engler2026-06-242-1/+18
| | | | | | | | | | | | | | | This commit implements ItemValueParseable and ItemArgumentParseable for Intern<T> types. This should be sufficient for the time being.
| * | tor-netdoc: GloballyInternable for PortPolicyClara Engler2026-06-241-10/+6
| | |
| * | tor-netdoc: GloballyInternable for RelayFamilyClara Engler2026-06-241-10/+5
| | |
| * | Add derive-deftly for GloballyInternableClara Engler2026-06-241-0/+16
| | | | | | | | | | | | | | | | | | Adds a derive-deftly based macro so that interfacing code can derive GloballyInternable on structs in order to save redundant and repetitive implementation calls.
| * | Add derive-deftly to tor-basic-utilsClara Engler2026-06-242-0/+4
| | | | | | | | | | | | We will make use of it in the next commit.
| * | Define GloballyInternable traitClara Engler2026-06-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | This defines a trait called GloballyInternable with a single method `.intern_cache()` returning a static reference to the globally available cache. The next commit will add a derive-deftly based macro for it.
| * | Use Intern<T> (fmt)Clara Engler2026-06-241-1/+3
| | | | | | | | | | | | No functional change.
| * | Use Intern<T>Clara Engler2026-06-245-16/+20
| | | | | | | | | | | | | | | This commit modifies the codebase to actually return Intern<T> in InternCache<T> and adds calls to .into() accordingly.
| * | Introduce Intern<T>Clara Engler2026-06-241-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new type for use with InternCache<T>: Intern<T>. Right now, we have the problem that this cache returns a general Arc<T>, which leads to the issue that we quickly loose overview from where values originate. With this type, it becomes clearer from where they come. In the next commit, we will adjust InternCache and the remaining codebase accordingly.
* | | Merge branch 'incoming-reject' into 'main'gabi-2502026-06-248-85/+272
|\ \ \ | |/ / |/| | | | | | | | | | | | | | proto: Add circ reactor scaffolding for rejecting pending streams Closes #2590 See merge request tpo/core/arti!4139
| * | proto: Rename LocalApplicationStream for clarityGabriela Moldovan2026-06-231-4/+4
| | | | | | | | | | | | | | | See https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4139#note_3429586
| * | proto: Rework error handling in `HopMgr::get_or_spawn_reactor()`Gabriela Moldovan2026-06-232-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks `get_or_spawn_reactor()` to return `Error` instead of `ReactorError`. The main change here is that we now have a dedicated `Error::Spawn` variant for `SpawnError`s, instead of mapping these to `ReactorError` (which actually triggers a clean shutdown, which is not quite what we want here).
| * | proto: Simplify StreamEvent::LocalStreamClosed (fmt)Gabriela Moldovan2026-06-231-1/+6
| | |
| * | proto: Simplify StreamEvent::LocalStreamClosedGabriela Moldovan2026-06-231-15/+4
| | | | | | | | | | | | | | | This doesn't need to contain the `CloseStreamBehavior` or `TerminateReason`, because we always use the same ones.
| * | proto: Rename StreamEvent::Closed to LocalStreamClosedGabriela Moldovan2026-06-231-5/+5
| | | | | | | | | | | | | | | | | | | | | I realized the previous naming was ambiguous. Hopefully this makes it clear that this `StreamEvent` triggers when the MPSC channel connecting the reactor to the local application stream (for example the local TCP connection of the stream, in the case of exit streams) is dropped.
| * | proto: Remove unnecessary result mappingGabriela Moldovan2026-06-231-1/+1
| | | | | | | | | | | | This already returns `()` in the `Ok` case.
| * | proto: Implement ClosePendingStream in the stream reactorGabriela Moldovan2026-06-233-5/+40
| | | | | | | | | | | | Closes #2590
| * | proto: Add a helper function for handling closed streams (fmt)Gabriela Moldovan2026-06-231-10/+10
| | |
| * | proto: Add a helper function for handling closed streamsGabriela Moldovan2026-06-231-6/+22
| | | | | | | | | | | | This will soon be reused for implementing `CtrlMsg::ClosePendingStream`.
| * | proto: Add a new StreamReactor control message for closing streamsGabriela Moldovan2026-06-231-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be sent by the FWD reactor. Essentially, this going to be the final control message in the chain `IncomingStream::reject()` -> `RelayCirc::reject()` -> `forward::CtrlCmd::ClosePendingStream`-> `HopMgr::close_pending()` -> `stream::CtrlCmd::ClosePendingStream` -> stream gets removed from the stream map, END sent Part of #2590
| * | proto: Update docs to clarify where the StreamReactor cell sender isGabriela Moldovan2026-06-231-1/+2
| | |
| * | proto: Implement RelayCirc::close_pending()Gabriela Moldovan2026-06-231-4/+17
| | | | | | | | | | | | Closes #2590
| * | proto: Add a control message for closing pending streams (fmt)Gabriela Moldovan2026-06-231-3/+4
| | |
| * | proto: Add a control message for closing pending streamsGabriela Moldovan2026-06-232-1/+41
| | |
| * | proto: Replace StreamMsg with a new CtrlMsg typeGabriela Moldovan2026-06-234-26/+32
| | | | | | | | | | | | | | | | | | | | | This replaces the `StreamMsg` `StreamReactor` sender with a new `CtrlMsg` type. This `CtrlMsg` currently only has a `DeliverStreamMsg` variant (which is the same as the old `StreamMsg` type), but will soon grow another variant, for terminating a stream.