summaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/build.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-circmgr: small comment fixSteven Engler2025-12-031-1/+1
|
* tor-circmgr: reduce level of info reactor tracing msgSteven Engler2025-12-031-1/+1
| | | | | Since "info" is the default level, we don't want to log by default each time a circuit reactor is created.
* opentelemetry: Instrument a bunch of functions.Wesley Aptekar-Cassels2025-11-241-0/+12
| | | | | These are all aimed at figuring out in more detail what's going on in #2079 and related issues.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* all: run cargo fmtSteven Engler2025-11-041-1/+1
|
* all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-041-1/+1
|
* Merge branch 'expire-halfstream-cbt' into 'main'gabi-2502025-09-241-12/+26
|\ | | | | | | | | | | | | proto: Remove half-streams when they expire. Closes #264 See merge request tpo/core/arti!3267
| * circmgr: Pass the timeout estimator to circuit constructor (fmt).Gabriela Moldovan2025-09-161-8/+13
| |
| * circmgr: Pass the timeout estimator to circuit constructor.Gabriela Moldovan2025-09-161-7/+16
| | | | | | | | | | This enables us to read the CBT estimates from the circuit reactor (we need these to compute the half-stream timeouts for #264).
* | tor-proto: use `CellCount` in `FlowCtrlParameters`Steven Engler2025-09-161-4/+4
|/
* tor-proto: add `FlowCtrlParameters` to `CircParameters` and `HopSettings`Steven Engler2025-09-111-1/+9
|
* proto: Add a circuit module shared between client and relay impls.Gabriela Moldovan2025-08-281-1/+1
| | | | | | | This is just code motion (I suggest reviewing with `--color-moved`). This also moves the implementation-agnostic parts from `tor_proto::client::circuit` to a new `tor_proto::circuit` module.
* chanmgr: Add KeyMgr to channel builderDavid Goulet2025-08-201-0/+1
| | | | | | | This is so a relay can build authenticated channels. Several keys/cert are required for this that are within the key manager. Signed-off-by: David Goulet <[email protected]>
* circmgr: Move the body of get_channel_to_guard into its only caller.Nick Mathewson2025-08-071-33/+23
|
* circmgr: Don't count channel negotiation towards circuit built time.Nick Mathewson2025-08-071-53/+68
| | | | | | | | | | This is important, since some circuits require us to negotiate a new channel, and some don't: by adding this variability, we can easily learn a timeout based on pre-existing channels to our guards, but then later time out if it takes a while to open a TLS connection. This is a possible solution to part of #2079, a bug where we "learn" a circuit timeout that is too low for us to satisfy.
* cirmgr: extract code that opens a channel.Nick Mathewson2025-08-071-14/+26
|
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-5/+5
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* Merge branch 'use-cc' into 'main'Nick Mathewson2025-08-051-39/+24
|\ | | | | | | | | Use congestion control when "flowctl-cc" is enabled See merge request tpo/core/arti!3118
| * tor-proto: use congestion control when "flowctl-cc" is enabledSteven Engler2025-08-041-39/+24
| |
* | hs: Use the new Tunnel interface for onion serviceDavid Goulet2025-08-051-1/+1
| |
* | tunnel: Implement Buildable for ClientTunnelDavid Goulet2025-08-051-33/+39
| | | | | | | | | | | | | | | | | | | | | | | | In order to pull this off, the Arc requirement needs to go away because the Arc<ClientCirc> is now within the ClientTunnel. This commit also has a rename of the CircuitBuilder to TunnelBuilder in order to reflect the change that it now builds a ClientTunnel. There is a slight rename in tor-proto as well just for accuracy. Signed-off-by: David Goulet <[email protected]>
* | proto: Change PendingClientCirc to yield back a ClientTunnelDavid Goulet2025-08-051-3/+3
|/ | | | | | And rename it in the process to "PendingClientTunnel". Signed-off-by: David Goulet <[email protected]>
* proto: Refactor cc fallback.Nick Mathewson2025-06-101-9/+13
| | | | | The fallback CC algorithm is _always_ fixed-window, and we should only use it when the selected CC algorithm is not supported.
* Move responsibility for choosing extensions into tor-protoNick Mathewson2025-06-101-19/+3
| | | | | | | | | Now tor-circmgr no longer needs to check which Protover capabilities are enabled, or construct a separate CircParameters for each hop. Instead, tor-proto decides whether to use the fallback CC mode, based on whether the target supports FLOWCTRL_CC. Closes #1967.
* proto: Provide and use a create_firsthop() wrapper too.Nick Mathewson2025-04-281-7/+2
|
* tor-proto: New extend() to pick between ntor and ntor3Nick Mathewson2025-04-281-6/+2
| | | | | | | | | In the future, when we add more circuit handshakes (PQ anyone?) we'll want to have the logic for choosing which to use be unified. Almost nobody calling tor-proto should need to care which circuit handshake is going to be used. Closes #1970.
* tor-circmgr: put vegas cc in `CircParameters` behind `if false`Steven Engler2025-04-231-22/+42
| | | | | This means that even with the "flowctl-cc" feature enabled, we shouldn't try to negotiate congestion control.
* tor-circmgr: only use congestion control if "flowctl-cc" feature is enabledSteven Engler2025-04-231-2/+5
|
* tor-circmgr: switch from `supports_{known,named}_subver()`Steven Engler2025-04-231-3/+3
|
* circ: Don't pin CC algorithm to FixedWindow anymoreDavid Goulet2025-04-231-4/+1
| | | | | | | | | | | Circuit handshake negotiation for congestion control has been added in previous commit so stop pinning the algorithm. This commit marks the start of congestion control usage by arti client. Closes #1817 Signed-off-by: David Goulet <[email protected]>
* circ: Apply possible subprotocol changes to circ paramsDavid Goulet2025-04-231-5/+20
| | | | | | | | | | | | | Congestion control can change the circuit parameters if the relay we are negotiating with doesn't support FlowCtrl=2. This commit adds a function in the circuit builder that will apply any changes to the circuit parameters of the hop based on the hop protocol values. For now, only congestion control applies. Part of #1817 Signed-off-by: David Goulet <[email protected]>
* circ: Remove CircParameters reference in call stackDavid Goulet2025-04-231-13/+12
| | | | | | | | | | | This avoids cloning the object and instead allows us to have a CircParameters per hop on the circuit path. This will come handy with congestion control where each hop might have different congestion control parameters. Part of #1817 Signed-off-by: David Goulet <[email protected]>
* congestion: Setup a fallback algorithm in the paramsDavid Goulet2025-04-231-0/+1
| | | | | | | | | | | | | | | | CircParameters is built before path selection and thus once we start building the hops, we can't access the consensus values that were used to build it in the first place. For congestion control, we require a fallback algorithm in case the hop doesn't support FlowCtrl=2. This commit adds a "fallback_alg" to the CC parameters which will be used for this exact case. Part of #1817 Signed-off-by: David Goulet <[email protected]>
* tor-circmgr: clean up after "ntor_v3" feature flag removalSteven Engler2025-04-011-21/+13
|
* tor-circmgr: removed "ntor_v3" feature flagSteven Engler2025-04-011-11/+0
| | | | ntor v3 is now always enabled.
* Use named subprotocol versions throughout arti.Nick Mathewson2025-03-121-7/+7
|
* tor-rtmock: allow-Decorate every use of MockSleepProviderIan Jackson2025-03-061-0/+3
| | | | | | | MockSleepProvider and MockSleepRuntime have been declared deprecated by the docs for some time. We're about to mark them `#[deprecated]`. This commit has been split out for clarity of review.
* congestion: Don't use Vegas just yetDavid Goulet2025-01-161-1/+4
| | | | | | | | | | Without circuit negotiation and flow control (XON/XOFF), the Vegas algorithm can not be used. Temporarily, this commit pins the algorithm to fixed window until we have the above. Signed-off-by: David Goulet <[email protected]>
* Make cargo clippy happyDavid Goulet2025-01-161-4/+4
| | | | Signed-off-by: David Goulet <[email protected]>
* circmgr: Remove the CircParameters build .expect()David Goulet2025-01-161-44/+19
| | | | | | Instead, return an error and make all call site handle it. Signed-off-by: David Goulet <[email protected]>
* circ: Specialize the circparams from netparams functionDavid Goulet2025-01-161-49/+82
| | | | | | | | | | | | | | | Congestion control parameters have specific values depending on the circuit type. Instead of using a CircuitType, which is removed in this commit, specialize the function in this case onion and exit. This allows us to get rid of CircuitType and solely use TargetCircUsage instead. At this commit, we use .expect() on the Builder. Future commit will remove this to return a Result in case of failure. Worth noting that we don't expect one. Signed-off-by: David Goulet <[email protected]>
* congestion: Remove Default from every parametersDavid Goulet2025-01-161-0/+2
| | | | | | | Important to enforce that every field is explicitely set so we avoid forgetting fields. Signed-off-by: David Goulet <[email protected]>
* congestion: Make the cc_alg values a caret_int for better code semanticDavid Goulet2025-01-161-4/+4
| | | | Signed-off-by: David Goulet <[email protected]>
* circmgr: Modify CircParameters for congestion controlDavid Goulet2025-01-161-9/+108
| | | | | | | | | | | | | | The congestion control parameters are created from the consensus parameters (netparams) and then put into the CircParameters object that is then passed down the tor-proto crate. Because different parameters are selected depending on the circuit type (onion vs exit vs sbws), a CircuitType enum is introduced for the sole purpose of being used to select the right parameters. Related #534 Signed-off-by: David Goulet <[email protected]>
* memquota: Change ToplevelAccount to be an alias for Arc<MemoryQuotaTracker>Ian Jackson2024-10-151-1/+2
| | | | Fixes a TODO.
* memquota: Add a toplevel account in tor-chanmgrIan Jackson2024-10-031-0/+2
| | | | | | | | | Plumb through a top-level account. This doesn't have any channel-specific, circuit-specific or stream-specific accounts yet. tor-circmgr's and tor-hsclient's *tests* need fake account. In arti-relay, use a dummy account for now.
* CircMgr: Start writing tests.Wesley Aptekar-Cassels2024-10-031-0/+1
|
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-281-1/+1
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* tor-circmgr: Remove no-longer-needed dead_code allow.Gabriela Moldovan2024-04-291-1/+0
|
* tor-circmgr: Call VanguardMgr::launch_background_tasks.Gabriela Moldovan2024-04-051-1/+1
|