aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src
Commit message (Collapse)AuthorAgeFilesLines
...
* proto: Split CircHop into inbound and outbound componentsGabriela Moldovan2025-11-171-52/+76
| | | | | | | | | Unlike the client reactor, the relay reactor uses these components in separate tasks. Splitting `CircHop` this way enables us to reuse its parts instead of duplicating them in the relay impl. Eventually, I'd like us to rewrite the client reactor to follow a similar pattern.
* proto: Rename cell decoder field for clarityGabriela Moldovan2025-11-141-3/+3
|
* proto: Avoid exposing stream map field (fmt)Gabriela Moldovan2025-11-141-8/+11
|
* proto: Avoid exposing stream map fieldGabriela Moldovan2025-11-141-3/+3
|
* proto: Import StreamMap to reduce cognitive complexityGabriela Moldovan2025-11-141-6/+6
|
* proto: Move CloseStreamBehavior to top-level stream moduleGabriela Moldovan2025-11-145-26/+29
|
* proto: Remove extraneous backtick in CloseStreamBehavior docsGabriela Moldovan2025-11-141-1/+1
|
* Merge branch 'prop368-v4' into 'main'Nick Mathewson2025-11-139-10/+325
|\ | | | | | | | | | | | | Implement a usage-based timeout for strongly isolated circuits (prop368) Closes #2237 See merge request tpo/core/arti!3430
| * fix a documentation link.Nick Mathewson2025-11-131-1/+1
| |
| * proto: run add_warning to update tunnel_activity.rsNick Mathewson2025-11-121-1/+1
| |
| * proto: assert that no member of InTunnelActivity needs_drop.Nick Mathewson2025-11-121-1/+15
| |
| * proto: Use a ZST-token pattern to enforce correctness for TunnelActivityNick Mathewson2025-11-122-14/+58
| |
| * tor-proto: Track information on when tunnels were last usedNick Mathewson2025-11-129-1/+258
| | | | | | | | This is part of an implementation for proposal 368.
* | proto: Remove duplicated function in CircHopGabriela Moldovan2025-11-132-7/+2
| | | | | | | | | | `CircHop::relay_format()` returned the same thing as `CircHop::relay_cell_format()`.
* | proto: Remove a no longer relevant TODOGabriela Moldovan2025-11-121-3/+0
|/ | | | | | | I think this was addressed by @opara in eca15143ba80b789382ba7cbe19601d3b98e42c2. Spotted while refactoring `CircHop`.
* Merge branch 'reduce-channel-frame-high-water-mark' into 'main'Nick Mathewson2025-11-101-1/+3
|\ | | | | | | | | tor-proto: Reduce `high_water_mark` of ChannelFrame See merge request tpo/core/arti!3447
| * tor-proto: Reduce `high_water_mark` of ChannelFramenield2025-11-061-1/+3
| |
* | Merge branch 'relay-circ' into 'main'David Goulet2025-11-103-16/+24
|\ \ | | | | | | | | | | | | proto: Rename RelayReatorHandle to RelayCirc, make it pub See merge request tpo/core/arti!3410
| * | proto: Remove doc ref to private itemGabriela Moldovan2025-10-291-1/+1
| | |
| * | proto: Add RelayCirc API for checking if circuit is closedGabriela Moldovan2025-10-291-0/+7
| | |
| * | proto: Remove redundant channel from RelayCircGabriela Moldovan2025-10-292-4/+0
| | | | | | | | | | | | | | | We don't really need this channel here, because we already have control and command channels for checking if the reactor task is still alive.
| * | proto: Make RelayCirc publicGabriela Moldovan2025-10-292-2/+2
| | |
| * | proto: Rename RelayReatorHandle to RelayCircGabriela Moldovan2025-10-292-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | While this is technically a "reactor handle", I think RelayCirc sounds better, because this is essentially our only public API for interacting with a relay circuit (it will be used outside of tor-proto). (This would also be consistent with our existing ClientCirc client-side terminology).
| * | proto: Move RelayReactorHandle to relay moduleGabriela Moldovan2025-10-292-11/+16
| | | | | | | | | | | | This will soon become `pub`, so I am factoring it out of `reactor.rs`.
| * | proto: Update RelayReactorHandle docsGabriela Moldovan2025-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | BackwardReactor is an implementation detail, so it shouldn't really be mentioned in the soon-to-be-public-facing docs. And besides, the control messages are no longer handled by the BackwardReactor.
* | | Merge branch 'cell-sender' into 'main'Alexander Hansen Færøy2025-11-103-10/+10
|\ \ \ | | | | | | | | | | | | | | | | proto: Move cell_sender out of the client module See merge request tpo/core/arti!3407
| * | | proto: Move cell_sender out of the client moduleGabriela Moldovan2025-10-283-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Soon we'll use CircuitCellSender in the relay reactor too (we need to, because it provides a useful abstraction for handling block/unblock padding actions, and because it has some handy helper functions such as `congestion_signals()`).
| * | | proto: Make everything in CircuitCellSender pub(crate)Gabriela Moldovan2025-10-281-8/+8
| |/ / | | | | | | | | | | | | | | | This is in preparation for moving `CircuitCellSender` out of the client module (it makes the next commit easier to review, because `cell_sender.rs` will be moved without any modifications).
* | | Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-0630-31/+31
| | | | | | | | | | | | Run maint/add_warning
* | | Drop two use's that seem no longer to be necessaryIan Jackson2025-11-061-1/+1
| |/ |/|
* | all: run cargo fmtSteven Engler2025-11-044-4/+4
| |
* | all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-045-5/+5
| |
* | bad_extend_test_impl: Wait for message instead of a 100 ms delay.Nick Mathewson2025-11-041-8/+18
| | | | | | | | Possible fix for #2232.
* | proto: use assert_matches in circuit.rs tests.Nick Mathewson2025-11-041-5/+6
| | | | | | | | | | | | | | | | | | Unlike assert!(matches!(..)), assert_matches prints the value of the expression on a failure. Probably we should use this macro more widely in the future. This might help diagnose recurrences of #2232
* | proto: Move a TODO to CircSyncViewGabriela Moldovan2025-10-302-3/+3
| |
* | proto: Replace ClientCircSyncView in IncomingStreamRequestFilterGabriela Moldovan2025-10-304-7/+8
| |
* | proto: Add a new CircSyncView typeGabriela Moldovan2025-10-302-0/+40
| | | | | | | | | | | | This will replace ClientCircView in the IncomingStreamRequestFilter APIs, which will enable us to use IncomingStreamRequestFilter for incoming streams on the exit side too.
* | proto: Adjust a comment about a buffer size.Nick Mathewson2025-10-281-3/+3
|/
* proto: Avoid identifying relay circuits using TunnelIdGabriela Moldovan2025-10-271-3/+3
| | | | We replaced TunnelId with UniqId in the relay code a while ago.
* proto: Remove relay ChannelAuthenticationData builderDavid Goulet2025-10-232-82/+46
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Feature flag some relay specific codeDavid Goulet2025-10-232-8/+15
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Add relay todos for the handshakeDavid Goulet2025-10-231-0/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Use Arc for relay identities objectDavid Goulet2025-10-233-5/+7
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Remove LOG_PREFIX in relay handshakeDavid Goulet2025-10-231-5/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Re-arrange some importsDavid Goulet2025-10-231-3/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Add a note about channel canonicityDavid Goulet2025-10-231-0/+5
| | | | Signed-off-by: David Goulet <[email protected]>
* proto: Compute authenticate data after validating certificatesDavid Goulet2025-10-234-15/+58
| | | | | | | | | | | | | | This is only done if we kept the AUTH_CHALLENGE cell and we have relay identities. In other words, this is only when the UnverifiedChannel was created from a RelayInitiatorHandshake. Note: The check_internal() function is too large and should be refactored in smaller pieces. Note: It is also likely that we need to split UnverifiedChannel and VerifiedChannel as it is getting client or relay members. Not great. Signed-off-by: David Goulet <[email protected]>
* proto: Add a relay channel builderDavid Goulet2025-10-233-2/+37
| | | | | | | | | | The client and relay channel builder don't share anything and return different objects hence the seperation. Furthermore, this seperation avoids having the client ChanMgr ability to launch relay channels. Signed-off-by: David Goulet <[email protected]>
* proto: Add RelayIdentities object holding our keysDavid Goulet2025-10-233-1/+63
| | | | | | | | | | | | | | | This is a intermediary object between tor-chanmgr and tor-proto that is when building a relay channel, those keys/certs need to be set in the ChannelBuilder so the tor-proto can use them to authenticate. We avoid that way making tor-proto depending on tor-keymgr for the ultimate goal to avoid tor-proto to have access to all the keys in the KeyMgr. Future commits will introduce a relay channel builder which will use that object to set the keys. Signed-off-by: David Goulet <[email protected]>
* proto: Add the channel authentication dataDavid Goulet2025-10-232-2/+154
| | | | | | | | | | | This commit only adds a struct holding all the authentication data that needs to be built during the verification process after all handshake cells needed for authentication have been sent. It lives in the VerifiedChannel struct so it can be used to build the AUTHENTICATE cell and be sent before the NETINFO. Signed-off-by: David Goulet <[email protected]>