summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src
Commit message (Collapse)AuthorAgeFilesLines
* tor-guardmgr: Port to web_time_compat.Nick Mathewson2026-03-2610-62/+68
|
* tor-guardmgr: fix some duration string formattingSteven Engler2026-03-242-2/+2
| | | | | | Old text would say something like: > Retrying in FormattedDuration(29.999861026s).
* Fix word duplicate typosTobias Stoeckmann2026-03-152-3/+3
|
* guardmgr: Migrate config to derive_deftly.Nick Mathewson2026-02-171-7/+5
|
* Allow clippy::collapsible_if to triggerGabriela Moldovan2026-02-161-0/+1
| | | | | | | | | `clippy::collapsible_if` started triggering after bumping the MSRV to 1.88. Since this triggers from a lot of places, and since there even are a couple of instances where we explicitly allow `clippy::collapsible_ifs`, I've opened #2342 for deciding what to do about it.
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-041-1/+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]>
* opentelemetry: Instrument a bunch of functions.Wesley Aptekar-Cassels2025-11-243-1/+12
| | | | | These are all aimed at figuring out in more detail what's going on in #2079 and related issues.
* RelayFlags: Use RelayFlag enum variant names everywhereIan Jackson2025-11-181-1/+1
| | | | | | | 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-181-2/+2
| | | | | | | | | | | | | | 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-181-1/+2
| | | | I would do `#[deprecated]` but empirically that has no effect...
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-0611-12/+12
| | | | Run maint/add_warning
* Conditionalise a test-only `use`Ian Jackson2025-11-061-1/+4
|
* all: run cargo fmtSteven Engler2025-11-042-2/+2
|
* all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-042-2/+2
|
* tor-guardmgr: Add more tracing to update_guardset_internal.Wesley Aptekar-Cassels2025-10-221-3/+7
| | | | This would have been useful in looking into #2224.
* tor-guardmgr: Ignore cognitive_complexity lint.Wesley Aptekar-Cassels2025-10-161-0/+1
| | | | | While this is fairly nested, it's short, and most of the complexity is just in the logging code.
* tor-guardmgr: Use humantime for some logging.Wesley Aptekar-Cassels2025-10-162-2/+2
|
* tor-guardmgr: Add retry time to guard failure warning.Wesley Aptekar-Cassels2025-10-161-7/+14
| | | | | The "Next retry time unknown" message can't be hit right now, but could be if the code changes in the future.
* tor-guardmgr: Include retry time in AllGuardsDown error message.Wesley Aptekar-Cassels2025-10-161-1/+6
| | | | | I don't love shoving such a complicated expression in thiserror, but it seems nicer than writing the implementation by hand...
* tor-linkspec: Change HasAddrs::addrs to return an Iterator (fmt)Ian Jackson2025-10-061-1/+4
|
* tor-linkspec: Change HasAddrs::addrs to return an IteratorIan Jackson2025-10-064-17/+17
| | | | | | | | 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-242-1/+7
| | | | | I've added these in places that are useful for the debugging that I've been doing.
* Move `FallbackDir` into `tor-dircommon`Clara Engler2025-09-115-577/+402
|
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-0711-98/+126
| | | | | | | | | | | | | | 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.
* Typo fixes (automatic and hand-verified)Nick Mathewson2025-07-092-2/+2
| | | | Made with https://crates.io/crates/typos-cli
* tor-dirmgr, tor-guardmgr: Use std::slice::from_ref as suggested by clippy.Gabriela Moldovan2025-07-071-2/+2
|
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* guardmgr, circmgr: Make vanguard selection take a RelaySelector.Nick Mathewson2025-05-202-20/+26
| | | | | | This is the preferred type for choosing a relay, since unlike a RelayExclusion, it lets us add multiple restrictions, and a relay usage.
* guardmgr: Fix clippy warning about needlessly owned cow.Nick Mathewson2025-05-151-1/+1
|
* Resolve clippy warnings from 1.83Nick Mathewson2025-05-131-1/+1
| | | | | Now that our MSRV is 1.83, clippy is happy to make more recommendations for us.
* Run cargo fmtNick Mathewson2025-03-181-11/+3
|
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-3/+3
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-182-2/+2
| | | | - Several methods have been moved out of SliceRandom.
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-187-9/+9
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* guardmgr: flag to indicate whether a FirstHop is a BridgeNick Mathewson2025-02-251-0/+9
| | | | | This will affect some details of path selection as we provide more info about families.
* clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* Disable a lot of dead code warningsIan Jackson2024-10-171-0/+3
| | | | | | | Now cargo check --workspace --no-default-features --all-targets cargo build -p arti --no-default-features --features=memquota,tokio,native-tls are both clean.
* Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-252-6/+6
| | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* tor-guardmgr: Convert a TODO into a NOTE.Gabriela Moldovan2024-09-101-1/+2
| | | | | | | | | This behavior is OK, so this doesn't need to be a TODO. See the discussion at https://gitlab.torproject.org/tpo/core/arti/-/issues/1352#note_3015217 Closes #1352
* tor-netdir: Allow access to the `ConsensusBuilder` when building test netdirs.Gabriela Moldovan2024-09-093-8/+8
| | | | | This allows us to set SRVs for example (needed because by default, the test `NetDir` is built from a consensus that doesn't contain any SRVs).
* Fix typosDimitris Apostolou2024-09-033-3/+3
|
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-283-3/+3
| | | | | | | | | | | | | | 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-guardmgr: Make some vanguard test helpers public (fmt).Gabriela Moldovan2024-06-201-10/+5
|
* tor-guardmgr: Make some vanguard test helpers public.Gabriela Moldovan2024-06-201-50/+67
| | | | | | We will soon need these helpers outside of `tor-guardmgr` too. This commit is mainly code motion.
* tor-guardmgr: Add test for vanguards state file deserialization.Gabriela Moldovan2024-06-031-2/+104
| | | | This checks that we can read `vanguards.json` state files.
* tor-config: Apply deferred cargo fmt.Gabriela Moldovan2024-06-031-1/+1
|
* tor-config: Add macro for implementing NotAutoValue.Gabriela Moldovan2024-06-031-2/+2
|