aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
* proto: Split out DataCmdChecker into multiple types (fmt).Gabriela Moldovan2025-10-161-1/+1
|
* proto: Split out DataCmdChecker into multiple types.Gabriela Moldovan2025-10-163-13/+51
| | | | | | | | | | | The incoming one will be used for the exit relay implementation too. Also, with this change, receiving `CONNECTED` on an incoming stream will result in a clearer error message. Previously, the check against receiving `CONNECTED` on an incoming stream was bundled with the double-CONNECTED check for client data streams, so in the incoming stream case, the error message was misleading ("Received CONNECTED twice on a stream.").
* proto: Do not fully-qualify Arc.Gabriela Moldovan2025-10-161-3/+3
| | | | | `Arc` is already in scope, and not fully-qualifying it makes it more readable.
* proto: Replace fully-qualified paths with use (fmt).Gabriela Moldovan2025-10-162-8/+2
|
* proto: Replace fully-qualified paths with use.Gabriela Moldovan2025-10-162-8/+8
|
* proto: Reformat imports post-move.Gabriela Moldovan2025-10-1610-12/+11
|
* proto: Avoid crate-pub reexports of shared types from the client module.Gabriela Moldovan2025-10-1611-20/+19
| | | | | This makes it easier to see which parts are implementation-agnostic (i.e. do not import from crate::client).
* proto: Move cmdchecker under top-level stream module.Gabriela Moldovan2025-10-163-2/+2
| | | | | The CmdChecker will be used by relays too, so I am moving it to the shared `stream` module.
* Merge branch 'outbound-relay-doc-fix' into 'main'Nick Mathewson2025-10-161-1/+1
|\ | | | | | | | | proto: Fix typo in OutboundRelayLayer docs. See merge request tpo/core/arti!3346
| * proto: Fix typo in OutboundRelayLayer docs.Gabriela Moldovan2025-10-081-1/+1
| | | | | | | | | | `OutboundRelayLayer::decrypt_outbound()` is for decrypting cells moving *away* from the client (in the "forward direction").
* | tor-proto: update unit testSteven Engler2025-10-141-27/+24
| |
* | tor-proto: relax XON limitsSteven Engler2025-10-141-3/+13
| |
* | tor-proto: remove `StreamEndpointType`Steven Engler2025-10-143-31/+12
| |
* | tor-proto: relax XOFF limitsSteven Engler2025-10-141-22/+30
| |
* | tor-proto: add derives for `CellCount`Steven Engler2025-10-141-1/+1
| |
* | Merge branch 'rm-allow' into 'main'Ian Jackson2025-10-141-1/+0
|\ \ | | | | | | | | | | | | proto: Remove an allow that is no longer needed See merge request tpo/core/arti!3356
| * | proto: Remove an allow that is no longer neededGabriela Moldovan2025-10-141-1/+0
| | |
* | | Merge branch 'celltypes' into 'main'gabi-2502025-10-1410-11/+13
|\ \ \ | | | | | | | | | | | | | | | | proto: Move celltypes out of client See merge request tpo/core/arti!3355
| * | | proto: Move celltypes out of clientGabriela Moldovan2025-10-1310-11/+13
| |/ / | | | | | | | | | | | | Some of these are relay-specific, so it makes more sense to pull this into a top-level module.
* | | Merge branch 'unique-id' into 'main'David Goulet2025-10-142-19/+30
|\ \ \ | | | | | | | | | | | | | | | | proto: Stop using tunnel IDs in relay reactor. See merge request tpo/core/arti!3353
| * | | proto: Stop using tunnel IDs in relay reactor.Gabriela Moldovan2025-10-132-19/+30
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using a tunnel ID here doesn't make much sense right now, because we don't yet support exit-side conflux (and when we will, it's unclear whether the concept of "tunnel" will be applicable, especially if we refactor things such that multi-path circuits are handled without a ConfluxSet-like type like we have for clients). This change forces us to stop using the client-specific `unwrap_or_shutdown` (because this macro expects `self` to have a tunnel ID), but IMO that is okay.
* / / proto: Use a small vec for the hop list.Gabriela Moldovan2025-10-131-1/+7
|/ / | | | | | | | | We can optimize for the general (N <= 3) case, and avoid a heap allocation.
* | tor-proto: bring back comparison chain w/ allowhashcatHitman2025-10-081-9/+14
| | | | | | | | | | | | | | | | It was decided that the comparison chain was actually preferrable for readability. So instead, we're just `allow`ing it until it stops being a problem. Signed-off-by: hashcatHitman <[email protected]>
* | tor-proto: replace comparison chain with matchhashcatHitman2025-10-081-8/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | There was a comparison chain in `tor_proto::util::poll_all::test::ResolveAfter::poll` which was causing a clippy warning. The lint in question, `clippy::comparison_chain`, was a `clippy::style` lint in 1.85.1 and got moved to `clippy::pedantic` in 1.87.0 (see [rust-clippy!14219]). Since some of us (like me) develop on MSRV, I'm fixing this lint now. Gabi didn't have any strong opinions on whether I did it like this or with an `allow` attribute, so I decided this was better since it means we don't have to come back later just to remove the `allow`. It should be noted that using a match like this can sometimes be a performance regression (see [rust-clippy#5354] and [rust-clippy!6390]). I would expect in this case the effect will be very little, if any, but if tests in `tor_proto::util::poll_all::test` start taking much longer and having an impact on CI or something, this could be why. [rust-clippy!14219]: https://github.com/rust-lang/rust-clippy/pull/14219 [rust-clippy#5354]: https://github.com/rust-lang/rust-clippy/issues/5354 [rust-clippy!6390]: https://github.com/rust-lang/rust-clippy/pull/6390 Signed-off-by: hashcatHitman <[email protected]>
* Merge branch 'mv-flow-ctrl' into 'main'gabi-2502025-10-0820-30/+32
|\ | | | | | | | | proto: Move flow_ctrl module under stream. See merge request tpo/core/arti!3335
| * proto: Fix flow control docs post-move.Gabriela Moldovan2025-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | `StreamFlowCtrl` is no longer accessible via `tor_proto::client`, so I had to update one of the (doc) imports with its new path Also, I had to change a couple of imports to use `DataWriter` and `DataStream` from `crate::client::stream` instead of `crate::client::stream::data`, because the latter is not visible from `flow_ctrl` anymore.
| * proto: Move flow_ctrl module under stream (fmt).Gabriela Moldovan2025-10-0711-22/+18
| |
| * proto: Move flow_ctrl module under stream.Gabriela Moldovan2025-10-0720-24/+25
| | | | | | | | This will be used by exits too, so I am moving it out of `client`.
| * proto: Add a top-level stream module.Gabriela Moldovan2025-10-072-0/+5
| | | | | | | | | | This will house the implementation-agnostic stream types and functionality.
* | tor-proto: deprecate handshake-specific create/extend variantsNick Mathewson2025-10-071-0/+10
|/ | | | | | | Everybody should use create_firsthop() and extend(), and let tor-proto decide which handshake is best. Closes #1990.
* Merge branch 'chan_padder' into 'main'Nick Mathewson2025-10-068-52/+346
|\ | | | | | | | | Apply maybenot padding to channels See merge request tpo/core/arti!3314
| * proto: Add a comment to note a naming issue.Nick Mathewson2025-10-021-0/+4
| |
| * proto: experimental API to install a per-channel padder.Nick Mathewson2025-10-022-0/+44
| |
| * proto: Implement channel padding with maybenot padders.Nick Mathewson2025-10-023-14/+95
| | | | | | | | With this commit we now actually generate padding when we're told to.
| * proto: start implementing logic for padding actions.Nick Mathewson2025-10-024-3/+48
| |
| * Add a blocker to channel outbound sink.Nick Mathewson2025-10-023-1/+20
| |
| * proto: Make DynTimeProvider explicit in channel padder types.Nick Mathewson2025-10-021-2/+6
| |
| * proto: Trigger maybenot events for channel-level padding.Nick Mathewson2025-10-023-7/+44
| |
| * proto: Generate per-sender NormalSent events from circuits.Nick Mathewson2025-10-012-4/+14
| |
| * proto: Propagate PaddingCtrl into ChannelSender.Nick Mathewson2025-10-011-43/+68
| | | | | | | | We'll need it to tell the channel padder when padding is queued.
| * proto: Add maybenot padding objects to the channel reactorNick Mathewson2025-10-012-1/+26
| |
* | Merge branch 'release-1.6.0-remove-semver-md' into 'main'Ian Jackson2025-10-061-3/+0
|\ \ | | | | | | | | | | | | release: Remove old semver.md files. See merge request tpo/core/arti!3323
| * | release: Remove old semver.md files.Wesley Aptekar-Cassels2025-10-021-3/+0
| | |
* | | release: Bump versions.Wesley Aptekar-Cassels2025-10-021-23/+23
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we've updated our MSRV, we must bump the minor version for every package. This was done as follows: cargo set-version -p arti 1.6.0 cargo set-version -p oneshot-fused-workaround 0.4.0 cargo set-version -p slotmap-careful 0.4.0 cargo set-version -p test-temp-dir 0.5.0 cargo set-version -p fslock-guard 0.4.0 cargo set-version -p hashx 0.5.0 cargo set-version -p equix 0.4.0 cargo set-version -p caret 0.7.0 cargo set-version -p fs-mistrust 0.12.0 cargo set-version -p safelog 0.6.0 cargo set-version -p retry-error 0.8.0 xargs -I P <<END cargo set-version -p P 0.35.0 tor-basic-utils tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-keymgr tor-chanmgr tor-ptmgr tor-dircommon tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-dirserver tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* / tor-proto: fix comment related to validating stream messagesSteven Engler2025-09-301-3/+4
|/ | | | | | | | | | I don't think the previous comment is correct. The main flow control checks are about receiving SENDME/XON/XOFFs, and ensuring that we don't receive too many of them. This all happens in the reactor. In theory the stream should be checking that we don't receive too many DATA messages for how many stream SENDMEs we've sent. But this is broken due to arti#2100. We do check this in the halfstream code though.
* Merge branch 'ticket_2190' into 'main'Nick Mathewson2025-09-303-40/+34
|\ | | | | | | | | | | | | padding: Remove post-queue blocker. Closes #2190 See merge request tpo/core/arti!3293
| * padding: Remove post-queue blocker.Nick Mathewson2025-09-303-37/+31
| | | | | | | | | | | | | | We no longer want to _ever_ block non-DATA cells, per discussion in circuit-padding.md. Closes #2190.
| * padding: be less dogmatic in a TODO about where a buffer would go.Nick Mathewson2025-09-301-4/+4
| |
* | Merge branch 'doc_features_no_longer_there' into 'main'Nick Mathewson2025-09-301-1/+1
|\ \ | |/ |/| | | | | | | | | Remove check_doc_features and doc_auto_cfg. Closes #1514 See merge request tpo/core/arti!3294
| * Remove "doc_auto_cfg" incantation from all crates.Nick Mathewson2025-09-291-1/+1
| | | | | | | | This feature has been removed from nightly, in favor of doc_cfg.