<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-proto/src/relay.rs, branch main</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=main</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2026-07-30T21:34:23Z</updated>
<entry>
<title>tor-cell: rename `XonKbpsEwma` to `XonKBpsEwma`</title>
<updated>2026-07-30T21:34:23Z</updated>
<author>
<name>Steven Engler</name>
<email>opara@torproject.org</email>
</author>
<published>2026-07-30T21:01:27Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0fecfa9a0102ff58676bcb0c5e36eed4996a68f4'/>
<id>urn:sha1:0fecfa9a0102ff58676bcb0c5e36eed4996a68f4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>proto: Add newtype wrapper for incoming stream receiver</title>
<updated>2026-07-22T12:12:10Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2026-07-16T15:07:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2c27e7ea39a373036775a2d3e540a5f66d1dbb8d'/>
<id>urn:sha1:2c27e7ea39a373036775a2d3e540a5f66d1dbb8d</id>
<content type='text'>
The inner type is an eyesore, and doesn't really need to be exposed
outside of tor-proto (we might even replace it at some point).
</content>
</entry>
<entry>
<title>proto: Remove RelayCirc::allow_stream_requests()</title>
<updated>2026-06-29T13:52:57Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2026-06-23T14:27:34Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=da3d14fcc3dc771140e3131d3ec087588b767d64'/>
<id>urn:sha1:da3d14fcc3dc771140e3131d3ec087588b767d64</id>
<content type='text'>
We don't need it anymore now that `RelayCirc`s always allow incoming
stream requests.

The previous design, where you could build a `RelayCirc` that didn't
allow stream requests, was a leftover from the onion service
`ClientCirc` implementation that this was inspired from (onion services
*do* need the two to be decoupled, because incoming stream requests are
only allowed on the virtual hop, after it's established).

Closes #2582
</content>
</entry>
<entry>
<title>proto: Pass an IncomingStreamRequestFilter factory to the create handler</title>
<updated>2026-06-29T13:52:56Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2026-06-12T11:06:31Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6b1881af1785c61022a320c40399406e0682d37a'/>
<id>urn:sha1:6b1881af1785c61022a320c40399406e0682d37a</id>
<content type='text'>
This implements what we discussed in
`doc/dev/notes/relay-streams.md` (lines 218-234):

&gt; Currently, to allow incoming stream requests on a circuit,
&gt; you first need to call `RelayCirc::allow_stream_requests()`
&gt; to install a `CmdChecker` and `IncomingStreamRequestFilter`.
&gt; This is not ideal, because `allow_stream_requests()` will need to be
&gt; called unconditionally, on each `RelayCirc`,
&gt; right after it's created in the `CreateHandler` impl
&gt; (which in turn, would mean making `handle_create()` async too,
&gt; because `allow_stream_requests()` is async, which wouldn't be great).
&gt;
&gt; So, the first step here is to rework the `RelayCirc` API to make relay circuits
&gt; be constructable with a list of allowed `RelayCmd`s and `IncomingStreamRequestFilter`
&gt; from the get-go ([#2582]), and to get rid of `allow_stream_requests()`,
&gt; which will enable the `CREATE*` handler to remain non-`async`.
&gt;
&gt; In any case, the `CREATE*` handler will still require some changes,
&gt; because it needs to be initialized with an `IncomingStreamRequestFilter`,

I am not sure using an `IncomingStreamRequestFilter` "factory" is
necessarily the right approach here, but the circuit `Reactor`'s
constructor needs to take an `IncomingStreamRequestFilter`, and
`IncomingStreamRequestFilter` is not `Clone` (and FWIW, I think it's
better if we don't make it `Clone`).

One obvious limitation is that the `IncomingStreamRequestFilter` of the
circuit reactor is fixed for the entire lifetime of the circuit.
In practice, I don't think this is going to be a problem,
because the arti-relay `IncomingStreamRequestFilter` is only going
be used for

  * preventing single-hop exit streams
  * per-circuit rate-limiting.

Both of these checks will require the filter to have access to a recent
`NetDir`, which is straightforward if the filter has an Arc&lt;dyn
NetDirProvider&gt; (as mentioned in doc/dev/notes/relay-streams.md,
`NetDirProvider` has a handy non-async `timely_netdir()` function we can
use). And since these checks are based on consensus params, we don't
really need to ever update an already-built circuit with a new
`IncomingStreamRequestFilter` (because all `IncomingStreamRequestFilter`
will have the ability to obtain a fresh `NetDir` as needed).

Nevertheless, I left a TODO about this, because I expect this type to
change once we figure out all the other pieces needed for #1448.
</content>
</entry>
<entry>
<title>proto: Implement RelayCirc::close_pending()</title>
<updated>2026-06-23T15:58:29Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2026-06-18T17:21:29Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=14d3812b5b799cb57e3b865633c4a6ac647b5c29'/>
<id>urn:sha1:14d3812b5b799cb57e3b865633c4a6ac647b5c29</id>
<content type='text'>
Closes #2590
</content>
</entry>
<entry>
<title>proto: Add a control message for closing pending streams</title>
<updated>2026-06-23T15:58:29Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2026-06-18T17:09:24Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=8c2be592ec3f30c14cac6322f332c83b9a62d890'/>
<id>urn:sha1:8c2be592ec3f30c14cac6322f332c83b9a62d890</id>
<content type='text'>
</content>
</entry>
<entry>
<title>maint: Run maint/add_warning to deny string slices</title>
<updated>2026-06-09T15:36:01Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-06-09T15:36:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9f5752a77fb57052c06ead0eeae606831f1e8e97'/>
<id>urn:sha1:9f5752a77fb57052c06ead0eeae606831f1e8e97</id>
<content type='text'>
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.

I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.

This commit makes cargo clippy fail.  We will add exceptions in the next
commit.
</content>
</entry>
<entry>
<title>tor-proto: have `StreamReqInfo` store a `ReactorStreamComponents`</title>
<updated>2026-05-21T16:35:59Z</updated>
<author>
<name>Steven Engler</name>
<email>opara@torproject.org</email>
</author>
<published>2026-05-21T15:13:07Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=3ae295c879f773b8c6e922436fb96c020777555a'/>
<id>urn:sha1:3ae295c879f773b8c6e922436fb96c020777555a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-chanmgr: add support for a `CreateRequestHandler`</title>
<updated>2026-04-08T15:29:26Z</updated>
<author>
<name>Steven Engler</name>
<email>opara@torproject.org</email>
</author>
<published>2026-04-01T01:34:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6da87aa397c881bd5042e1eea57e409ffaec7246'/>
<id>urn:sha1:6da87aa397c881bd5042e1eea57e409ffaec7246</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revert "proto: Add a new ToRelayMsg util"</title>
<updated>2026-02-12T16:35:14Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2026-02-11T14:02:06Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ac562cbef392108c1a9a723f4fb336a6831eb809'/>
<id>urn:sha1:ac562cbef392108c1a9a723f4fb336a6831eb809</id>
<content type='text'>
This reverts commit 04ab3cd848d7977baf58dd64ebfcad6aa54ecb17.

Reverted because we no longer need to "peek" into the opaque
`CircChanMsg` of a circuit reactor: now the implementation-dependent
part of the reactor is in charge of handling the channel messages,
and extracting `Relay` objects out of RELAY/RELAY_EARLY cells,
which then get processed in the base reactor.
</content>
</entry>
</feed>
