aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/ipt_mgr.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'remove-lint' into 'main'Jim Newsome2026-07-151-4/+1
|\ | | | | | | | | | | | | Removed unnecessary lint Closes #2556 See merge request tpo/core/arti!4210
| * Remove now-unneeded allow(clippy::cognitive_complexity)Jim Newsome2026-07-151-3/+0
| |
| * Removed unnecessary lintpryty262026-07-151-1/+1
| | | | | | | | Removed unnecessary lint
* | multiple crates: Fix clippy warningshjrgrn2026-07-101-3/+3
|/
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-0/+2
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* tor-hsservice: Make OpenReplayLog error transparent.Wesley Aptekar-Cassels2025-08-131-1/+1
|
* tor-hsservice: Add PowManager to OnionServiceStatus.Wesley Aptekar-Cassels2025-08-131-1/+1
|
* tor-hsservice: Change ReplayLog error type.Wesley Aptekar-Cassels2025-08-131-9/+3
| | | | | | | | This disentangles the ReplyLog from the IptManager. This will allow us to make the InternalPowError type more public (in order to use it in the OnionServiceStatus code) without also having to make the CreateIptError type more public.
* Fix warnings and errors from edition 2024.Nick Mathewson2025-08-071-3/+2
| | | | | | | | | | The two main causes of errors were: - Since some of the lifetime rules have changed, we no longer need to do as many "bind a variable and immediately return it" patterns, and so clippy now warns about them. - We needed to adjust the explicit captures (`use<...>`) in a couple of our RPIT instances.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | 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.
* Update code for Edition 2024Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | | | | | 1. Run cargo fix --edition 2. Selectively revert the "if let"->"match" changes. These changes are meant to protect us from the lifetime changes for "if let" bindings in Rust 2024. But we're not actually relying on the old lifetime rules anywhere, and the match syntax here is quite ugly. 3. Automatically revert `$pat:expr_2021` to `$pat:expr`. (We don't actually want to restrict the expression syntax that our macros accept). Done with `git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'` 4. Run cargo fmt.
* *: suppress cognitive_complexity warnings from nightlyNick Mathewson2025-05-291-0/+1
| | | | | | | | | | | | | Apparently clippy nightly is better (or worse?) about detecting complex functions than before, so I'm suppressing these warnings where they occur. I have mixed feelings about these warnings: On the plus side, they really do help to detect functions that are twistier than they need to be. On the minus side, they get confused by tracing macros, and the "allows" do pile up. But on the plus side, those "allows" do provide a way to find functions that need to be refactored, and they are never uglier than the functions they decorate.
* Include "bug" in all bug error messagesNick Mathewson2025-04-281-2/+2
|
* Use CautiousRng for keys going into the KeyMgr.Nick Mathewson2025-03-241-2/+1
|
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* tor-hsservice: Change ReplayLog parse_log_leafname API.Wesley Aptekar-Cassels2025-02-101-2/+5
| | | | | This previously returned a &str for sort of unclear reasons, which was only used in logging. Remove that.
* tor-hsservice: Make ReplayLog generic.Wesley Aptekar-Cassels2025-02-101-2/+2
|
* Convert a few crates to slotmap-carefulNeel Chauhan2024-10-171-2/+2
|
* Introduce mpsc_channel_no_memquota and use it in the places it's wantedIan Jackson2024-10-151-1/+3
| | | | | These are the call sites where using this fucntion is correct. (Outside tor-rtmock, which we'll do separately.)
* tor-keymgr: Rename the primary keystore for clarity.Gabriela Moldovan2024-09-231-1/+1
| | | | | | | | | | Previously, arti's primary keystore was referred to as its "default" keystore. However, "default" is inaccurate here: there is no way to meaningfully override this "default" (the "default" store acts as the main keystore). Throughout the codebase, we query all keystores for keys (including the secondary ones), but only ever write to the default/primary keystore. This is OK for now, because it enables us to have one mutable keystore, and multiple secondary, read-only stores.
* tor-hsservice: Add Degraded{Unr,R}eachable onion svc states.Gabriela Moldovan2024-09-091-1/+1
| | | | | | | | | Currently, the `DegradedReachable` status is only reported by the the IPT manager and `DegradedUnreachable` is unused. Soon we'll the publisher reporting `DegradedReachable` or `DegradedUnreachable` or `Running`, depending on how the descriptor uploads went.
* tor-hsservice: Remove outdated IPT manager TODOs.Gabriela Moldovan2024-09-091-4/+0
| | | | | These TODOs were addressed a while ago (when we introduced `IptManager::ipt_errors`).
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* ipt_mgr: convert to use RelaySelector.Nick Mathewson2024-03-121-10/+17
|
* tor-hsservice: ipt_mgr: Put file in a sensible order (defeat rustfmt)Ian Jackson2024-03-051-1/+1
|
* tor-hsservice: ipt_mgr: Put file in a sensible orderIan Jackson2024-03-051-220/+235
| | | | Fixes #1212
* Run rustfmtIan Jackson2024-03-051-1/+1
| | | | | This alphabetises the imports, ready for us to do some more manual tidying.
* tor-hsservice: prelude: Move imports from ipt_mgr.rsIan Jackson2024-03-051-49/+1
|
* tor-hsservice: Move svc.rs contents into lib.rsIan Jackson2024-03-051-2/+2
|
* tor-hsservice: Move IptLocalId into a moduleIan Jackson2024-03-051-6/+0
|
* tor-hsservice: Move ipt_establish.rs out of svcIan Jackson2024-03-051-3/+3
|
* Merge branch 'label_todo_504' into 'main'Nick Mathewson2024-02-221-0/+1
|\ | | | | | | | | Mark code with "TODO 504" and "TODO 789". See merge request tpo/core/arti!1992
| * Mark code with "TODO #504" and "TODO #789".Nick Mathewson2024-02-221-0/+1
| | | | | | | | | | | | | | | | I've done this by looking for every non-test instance of pick_relays or pick_n_relays, and for every non-test usage of any non-ID-related method on Relay or UncheckedRelay. Part of #504.
* | tor-hsservice: reconfigure: Allow changing rate_limit_at_introIan Jackson2024-02-211-0/+20
|/
* tor-hsservice: Run cargo fmt.Gabriela Moldovan2024-02-191-3/+7
|
* tor-hsservice: Report IPT errors from all the IPTs we are maintaining.Gabriela Moldovan2024-02-191-1/+1
| | | | | | | We should be reporting all IPT errors, not just the ones coming from the IPTs that are "current". Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1966#note_2996978
* tor-hsservice: Replace placeholder IptError with the real IptError type.Gabriela Moldovan2024-02-191-16/+31
|
* tor-hsservice: Include the IptError in IptStatusStatus::Faulty.Gabriela Moldovan2024-02-191-1/+1
| | | | | | This will enable the `IptManager` to more accurately report its status. Part of #1083
* tor-hsservice: Remove TODO about setting IptManager status.Gabriela Moldovan2024-02-191-2/+0
| | | | Closes #1083
* tor-hsservice: Set the IptManager state to Bootstrapping on startup.Gabriela Moldovan2024-02-191-0/+3
| | | | Part of #1083
* tor-hsservice: Include the IptManager errors in the onion service status.Gabriela Moldovan2024-02-191-1/+22
| | | | | | | | | | | | | The `IptManager` now reports its status as `Recovering` (with the `latest_error` set to `IptError::FaultyIpt`) if it doesn't have enough good IPTs to publish. Its status is `Degraded` if it has published some IPTs, but needs to establish more. Note: unconditionally setting `latest_error` to `IptError::FaultyIpt` is not entirely correct. We will need to get the actual errors, if any, from the `IptEstablisher`. Part of #1083
* tor-hsservice: Add an IptError type for status reporting.Gabriela Moldovan2024-02-191-0/+10
| | | | | | | The `OnionServiceStatus` API can now report errors coming from `IptManager`. Part of #1083
* tor-hsservice: Rename note_<status> to send_<status>.Gabriela Moldovan2024-02-191-2/+2
| | | | | Since these are `*StatusSender` APIs, it seems more idiomatic to call them `send*`.
* tor-keymgr: Rename KeyMgr::remove_with_type to KeyMgr::remove_entry.Gabriela Moldovan2024-02-191-1/+1
| | | | Part of #1271
* tor-keymgr: Make KeyMgr::remove_with_type take a KeystoreEntry.Gabriela Moldovan2024-02-191-7/+1
| | | | | | | NB: `KeyMgr::remove_with_type` will need to be renamed to `KeyMgr::remove_entry`. Part of #1271
* tor-keymgr: Make KeyMgr::list_matching return `KeystoreEntry`s.Gabriela Moldovan2024-02-191-3/+5
| | | | Part of #1271
* tor-hsservice: ipt mgr: Remove/downgrade two allowsIan Jackson2024-02-131-2/+1
|