summaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src
Commit message (Collapse)AuthorAgeFilesLines
* fix: preserve timestamps when flattening RetryErrorsNihal2025-12-171-7/+1
|
* fix: use wallclock timestamps in all push_timed callsNihal2025-12-172-22/+27
|
* fix: semver labels and extend() with push_timed loopNihal2025-12-171-3/+6
|
* refactor: convert Extend to inherent method, forbid push/extend, fix ↵Nihal2025-12-172-0/+10
| | | | rend_handshake time
* refactor: clean codeNihal2025-12-171-4/+4
|
* feat(retry-error): add timestamps to retry errorsNihal2025-12-171-7/+26
|
* Demonstration: convert tor-circmgr to use derive_deftly(TorConfig)Nick Mathewson2025-12-091-98/+32
| | | | | (We could tighten this up even more by inlining some of the default values.)
* Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-043-5/+0
| | | | | | | | | Fixes part of #2193. (Edits from nickm: I selected the cases here that I could verify were correct from immediate context.) Edited-by: Nick Mathewson <[email protected]>
* 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.
* circmgr: Add missing docs for RestrictionFailedGabriela Moldovan2025-12-011-0/+1
|
* circmgr: allow unstable_name_collisions lint for exactly_one()Gabriela Moldovan2025-12-011-0/+4
| | | | This silences a new nightly warning.
* tor-circmgr: simplify `CircMgrConfig`Steven Engler2025-11-261-9/+2
| | | | | | | Now that `vanguard_config()` is no longer conditional, we can handle `vanguard_config` just like other accessors. This is a breaking change, but I think we may as well make this change while we've already made another breaking change in the previous commit.
* tor-circmgr,arti-client: `CircMgrConfig::vanguard_config` is always builtSteven Engler2025-11-261-4/+0
|
* opentelemetry: Instrument a bunch of functions.Wesley Aptekar-Cassels2025-11-2410-5/+72
| | | | | These are all aimed at figuring out in more detail what's going on in #2079 and related issues.
* tor-circmgr: fix incorrect match on `HsOnly`Steven Engler2025-11-191-0/+1
| | | | | | | | | | | | | | | | | | | Rust was treating this as a wildcard match if the `hs-common` feature wasn't enabled. This shouldn't have caused any bugs since the other match arms were already exhaustive, but this could have lead to a bug if new enum variants were added to `SupportedTunnelUsage`. ```text warning: variable `HsOnly` should have a snake case name --> crates/tor-circmgr/src/usage.rs:600:13 | 600 | HsOnly => { | ^^^^^^ help: convert the identifier to snake case: `hs_only` | = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default warning: `tor-circmgr` (lib) generated 1 warning ```
* RelayFlags: Use RelayFlag enum variant names everywhereIan Jackson2025-11-182-7/+7
| | | | | | | Abolish the constants with the transitional names. This also abolishes the controversial name `H_S_DIR`, which Rust case transformation rules generated from `HSDir`.
* RelayFlags: Use the singular RelayFlag for naming individual flagsIan Jackson2025-11-182-9/+9
| | | | | | | | | | | | | | We're going to separate RelayFlag from RelayFlags. We could continue to provide a bunch of constant values for RelayFlags, for each individual type, but that would involve an ad-hoc derive, and would still be a bit of an unusual API. Instead, we're going to make ``RelayFlag` a normal enum. In this commit, we change everyone to refer to it by its singular name. Hopefully separating out this bulk change makes both this, and the core commit, easier to review.
* tor-netdoc: Remove the RelayFlags type alias in netstatusIan Jackson2025-11-182-2/+3
| | | | I would do `#[deprecated]` but empirically that has no effect...
* tor-netdoc: Rename RelayFlags elements for regularity vs specIan Jackson2025-11-181-1/+1
| | | | | Add underscores so that the spec keywords and the flag constants correspond (according to `paste`'s case-changing rules).
* Fix another doc link.Nick Mathewson2025-11-131-1/+1
|
* Fix compilation without all-features.Nick Mathewson2025-11-121-7/+8
|
* circmgr: report errors from update_long_lived_tunnel_last_usedNick Mathewson2025-11-121-21/+54
| | | | | (The only error possible is an internal error from calling it with a non-long-lived tunnel.)
* circmgr: In expiration task, try again if we are not yet ready to expire.Nick Mathewson2025-11-121-21/+31
|
* circmgr: Add a timeout setting for long-lived circuits.Nick Mathewson2025-11-122-1/+20
|
* circmgr: Implement expiration for long-lived tunnels.Nick Mathewson2025-11-124-22/+228
| | | | | | | | | | | | | | | | | This code uses the algorithm of prop368: When a tunnel is sufficiently isolated, we want to expire it after it has been disused for a certain amount of time. The implementation is a little tricky, since we need to call an async function on ClientTunnel to look up the disused_since() check. We don't want to call async functions while holding locks, so we need to drop the TunnelList lock before we do the disused_since() calls, and the grab it again. As part of this change, I've had made expiration functions return the earliest time at which any tunnel might expire. We can use this in the future to spawn fewer expiration tasks, and scan the list of tunnels less often.
* circmgr: Add a notion of long-lived tunnels.Nick Mathewson2025-11-122-8/+77
|
* circmgr: Refactor should_expire()Nick Mathewson2025-11-121-24/+40
| | | | | Instead of a series of cutoffs, take an object with a set of lifetimes.
* circmgr: make expiration functions asyncNick Mathewson2025-11-122-31/+29
| | | | We'll need them to be async so they can call disused_since() on tunnels.
* circmgr: rename expire_tunnel to consider_expiring_tunnelNick Mathewson2025-11-121-3/+7
|
* Add a notion of isolation strong enough to enable long-lived circuits.Nick Mathewson2025-11-121-0/+38
| | | | Part of prop368.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-0614-15/+15
| | | | Run maint/add_warning
* all: run cargo fmtSteven Engler2025-11-043-3/+3
|
* all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-044-5/+5
|
* tor-linkspec: Change HasAddrs::addrs to return an IteratorIan Jackson2025-10-061-3/+4
| | | | | | | | This will let us model the actual structure of routerstatus entries in netdocs more closely. They don't have the addresses in a single list. When this code was written this would have been much more awkward, but now we have RPITIT.
* 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.
* opentelemetry: Add some instrument macros.Wesley Aptekar-Cassels2025-09-241-0/+2
| | | | | I've added these in places that are useful for the debugging that I've been doing.
* Merge branch 'expire-halfstream-cbt' into 'main'gabi-2502025-09-242-12/+38
|\ | | | | | | | | | | | | proto: Remove half-streams when they expire. Closes #264 See merge request tpo/core/arti!3267
| * proto: Use the circuit build timeout instead of the abandon timeout.Gabriela Moldovan2025-09-221-2/+2
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3267#note_3259820
| * 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).
| * circmgr: Implement TimeoutEstimator for Estimator.Gabriela Moldovan2025-09-161-0/+12
| | | | | | | | | | This will enable us to pass the timeout estimator to the circuit reactor in tor-proto.
* | circmgr: Replace BoundedVecDeque with a much smaller wrapperNick Mathewson2025-09-171-10/+79
| | | | | | | | Closes #2174. See that ticket for rationale.
* | tor-proto: use `CellCount` in `FlowCtrlParameters`Steven Engler2025-09-161-4/+4
|/
* Merge branch 'xon-xoff-checker' into 'main'David Goulet2025-09-151-1/+9
|\ | | | | | | | | tor-proto,tor-netdir: add flow control consensus parameters See merge request tpo/core/arti!3249
| * tor-proto: add `FlowCtrlParameters` to `CircParameters` and `HopSettings`Steven Engler2025-09-111-1/+9
| |
* | Move `FallbackDir` into `tor-dircommon`Clara Engler2025-09-113-3/+3
|/
* Merge branch 'the-bell-tolls-for-once_cell' into 'main'wesleyac2025-09-031-7/+1
|\ | | | | | | | | various crates: Updated MSRV TODOs for `once_cell` removal See merge request tpo/core/arti!2953
| * tor-circmgr: Modified MSRV TODOs for `once_cell` removalhashcatHitman2025-08-201-7/+1
| | | | | | | | | | | | | | | | | | - Shortened the TODO added in e9ef7bea96c2860fa81d03e8d8da2605d0661425 in the style of [this maintainer request] for consistency. [this maintainer request]: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2953#note_3197719 Signed-off-by: hashcatHitman <[email protected]>
* | tor-circmgr: Removed dependency on `static_assertions`hashcatHitman2025-09-011-3/+2
| | | | | | | | | | | | | | | | Replaced use of [`static_assertions::const_assert`] with the newly available "assert in const" pattern. This completely removes the dependency on `static_assertions` for `tor-circmgr`. Signed-off-by: hashcatHitman <[email protected]>