aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
* | | tor-proto: replace a tuple with a dedicated structSteven Engler2026-04-092-18/+29
| | |
* | | tor-proto: give our ed ident to the channel reactorSteven Engler2026-04-096-5/+48
| | | | | | | | | | | | This will be needed for ntor handshakes.
* | | proto: Apply deferred rustfmtGabriela Moldovan2026-04-091-1/+1
| | |
* | | proto: Add method for installing ntor keys in the create handlerGabriela Moldovan2026-04-091-2/+27
| | | | | | | | | | | | | | | This also updates the key rotation task to call the setter whenever the ntor keys get updated.
* | | arti-relays: Pass a CreateRequestHandler to the crypto taskGabriela Moldovan2026-04-091-0/+1
| | | | | | | | | | | | This will need to be updated each time the ntor keys change.
* | | relay: Pass advertise SocketAddr to channel builder instead of IpAddrDavid Goulet2026-04-092-8/+8
|/ / | | | | | | | | | | | | | | | | | | This trickles down to the tor-proto channel handshake code. But, the real need is in the channel builder in order to validate the outbound channel target. Fixes #2440 Signed-off-by: David Goulet <[email protected]>
* | Merge branch 'create-fast' into 'main'gabi-2502026-04-092-56/+71
|\ \ | | | | | | | | | | | | tor-proto: Move CREATE_FAST handling to a helper See merge request tpo/core/arti!3869
| * | tor-proto: take `CreateRequest` message by referenceSteven Engler2026-04-082-6/+5
| | | | | | | | | | | | | | | Clippy has started warning about this since we moved the CREATE_FAST handling to a helper, so this resolves that.
| * | tor-proto: move a TODOSteven Engler2026-04-081-2/+1
| | |
| * | tor-proto: remove old TODOSteven Engler2026-04-081-4/+1
| | |
| * | tor-proto: rustfmtSteven Engler2026-04-081-6/+3
| | | | | | | | | | | | Fix formatting from previous code movement.
| * | tor-proto: move CREATE_FAST handlingSteven Engler2026-04-081-45/+43
| | | | | | | | | | | | | | | This moves the code, changes the indentation, and wraps the result in an `Ok()`.
| * | tor-proto: prepare to move CREATE_FAST handling to a helperSteven Engler2026-04-081-8/+34
| | |
| * | tor-proto: remove old TODOSteven Engler2026-04-081-1/+0
| | | | | | | | | | | | This had already been resolved.
* | | proto: Bring back AuthLogDigest and explicitly convert to SLOG/CLOGDavid Goulet2026-04-084-36/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From opara's comment: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3844#note_3388789 Keep the low level AuthLogDigest type alias and return it. The callsite is the one deciding if the returned digest is a Clog or a Slog. Related to #2441 Signed-off-by: David Goulet <[email protected]>
* | | proto: Add ClogDigest and SlogDigest typesDavid Goulet2026-04-087-38/+80
|/ / | | | | | | | | | | | | | | | | Introduce those types in order to avoid mixing them up as the previous AuthLogDigest was just a type alias over [u8; 32] Fixes #2441 Signed-off-by: David Goulet <[email protected]>
* | Merge branch 'create-fast' into 'main'opara2026-04-0816-99/+834
|\ \ | | | | | | | | | | | | Add support for handling CREATE_FAST cells and launching a circuit reactor See merge request tpo/core/arti!3846
| * | tor-proto: replace use of `ChannelDirection` with `CircIdRange`Steven Engler2026-04-084-25/+16
| | |
| * | Revert "tor-proto: change `CreateResponse` to `restricted_msg!`"Steven Engler2026-04-082-29/+20
| | | | | | | | | | | | This reverts commit 9c38daf2d3548feca2ff555f5bd52165add0d20c.
| * | tor-proto: add a `From<$ttype>` impl for `RestrictedChanMsgSet`Steven Engler2026-04-081-0/+8
| | | | | | | | | | | | This is needed for the revert in the following commit.
| * | tor-{proto,chanmgr}: change how channels accept a CREATE* handlerSteven Engler2026-04-088-85/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of giving the `CreateRequestHandler` to the channel after it's constructed, we integrate it into the handshake so that we can give it to the channel constructor. The `ChannelType` is no longer part of the `Channel`. Some of the tests could be cleaned up slightly now that the channel doesn't need the `ChannelType`, but I don't want to conflict with !3853.
| * | tor-proto: simplify error handling in `CreateRequestHandler::handle_create()`Steven Engler2026-04-081-71/+85
| | |
| * | tor-proto: rename `CircIdRange::is_allowed_by_peer()` to `is_allowed_for_peer()`Steven Engler2026-04-081-2/+2
| | |
| * | tor-proto: remove TODO about `UniqId` overflowSteven Engler2026-04-081-2/+2
| | |
| * | tor-proto: handle incoming RELAY_EARLY messagesSteven Engler2026-04-081-2/+10
| | |
| * | tor-chanmgr: add support for a `CreateRequestHandler`Steven Engler2026-04-081-0/+3
| | |
| * | tor-proto: add `Channel::set_create_request_handler()`Steven Engler2026-04-082-2/+62
| | | | | | | | | | | | | | | | | | We can't pass the request handler during the `Channel` constructor since it would require conditionally compiled function arguments, which aren't nice.
| * | tor-proto: add `CreateRequestHandler`Steven Engler2026-04-084-0/+442
| | | | | | | | | | | | for handling CREATE* messages on channels.
| * | tor-proto: extend `RelayHandshakeError`Steven Engler2026-04-081-1/+27
| | |
| * | tor-proto: add a `CreateRequest` restricted msg setSteven Engler2026-04-081-1/+11
| | |
| * | tor-proto: change `CreateResponse` to `restricted_msg!`Steven Engler2026-04-082-19/+29
| | | | | | | | | | | | | | | This better fits with existing code that uses `restricted_msg!` and is a bit more flexible.
| * | tor-proto: derive `strum::EnumDiscriminants` for `Algorithm`Steven Engler2026-04-082-1/+5
| | |
| * | tor-proto: small cleanup of legacy codeSteven Engler2026-04-081-6/+1
| | | | | | | | | | | | | | | | | | | | | I think it was written like this because earlier versions of rust didn't allow references to temporaries like `&mut rand::rng()` and needed them to be bound to a variable. But this isn't necessary anymore and so the comment doesn't make sense.
| * | tor-proto: change channel to use `Runtime`Steven Engler2026-04-086-26/+44
| | | | | | | | | | | | | | | When used for relay channels, the channel reactor will soon need to spawn relay circuit reactors.
| * | tor-proto: support relay circs in channel's `CircMap`Steven Engler2026-04-082-11/+87
| | |
| * | tor-proto: rename `CircEnt::Open` to `CircEnt::OpenOrigin`Steven Engler2026-04-082-18/+20
| | | | | | | | | | | | And rename `CircMap::add_ent()` to `add_origin_ent()`.
| * | tor-proto: add `CircIdRange::is_allowed_by_peer()`Steven Engler2026-03-311-0/+8
| | |
| * | tor-proto: add `CircIdRange::integer_range()`Steven Engler2026-03-311-6/+15
| | |
* | | Merge branch 'memquota-add-parent' into 'main'gabi-2502026-04-081-6/+4
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | memquota: Add new add_parent() API Closes #2427 See merge request tpo/core/arti!3829
| * | proto: Link the memquota circ acc with the outbound chan accGabriela Moldovan2026-03-301-6/+4
| | | | | | | | | | | | Closes #2427
* | | Merge branch 'closed-stream-err' into 'main'opara2026-04-071-3/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Change an error from `CircuitClosed` to `NotConnected` Closes #2421 See merge request tpo/core/arti!3825
| * | | tor-proto: change an error to `NotConnected`Steven Engler2026-03-291-3/+7
| |/ / | | | | | | | | | | | | Returning `CircuitClosed` isn't right here since the circuit may not have closed.
* | | tor-proto: lower log level of "removing circuit leg"Steven Engler2026-04-061-1/+1
| | | | | | | | | | | | This appears often in the arti logs, but is a normal thing to happen.
* | | Merge branch 'stream-close' into 'main'opara2026-04-021-6/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Allow sending DATA cells on closed streams Closes #2434 See merge request tpo/core/arti!3824
| * | | tor-proto: allow sending DATA cells on closed streamsSteven Engler2026-03-291-6/+12
| |/ / | | | | | | | | | | | | Previously we would close the circuit, which isn't great because there can be other streams in use on the circuit.
* | | Update to derive-deftly 0.11.0 to pick up `meta_quoted rigorous`Ian Jackson2026-04-021-1/+1
| | |
* | | Merge branch 'ticket_2428' into 'main'Nick Mathewson2026-04-012-7/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Prefer runtime.now/wallclock to SystemTime/Instant::now, when available. Closes #2428 See merge request tpo/core/arti!3845
| * | | proto: Take current time as an argument when constructing padder.Nick Mathewson2026-03-312-7/+12
| | |/ | |/| | | | | | | | | | | | | | | | Previously we'd get the time by calling Instant::now, but that would lead to a mismatch with the runtime if we were mocking. Part of #2428.
* | | proto: Run cargo-sortGabriela Moldovan2026-04-011-3/+3
| | |
* | | proto: Make tor-relay-crypto an optional dependency (fmt)Gabriela Moldovan2026-04-011-1/+7
| | |