summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src
Commit message (Collapse)AuthorAgeFilesLines
* *: suppress cognitive_complexity warnings from nightlyNick Mathewson2025-05-294-0/+6
| | | | | | | | | | | | | 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.
* tor-hsservice: Fix typo.Wesley Aptekar-Cassels2025-05-271-1/+1
|
* tor-hsservice: Warn instead of panic on KeyMgr error in PowManager.Wesley Aptekar-Cassels2025-05-271-4/+8
|
* tor-hsservice: Refactor PoW error handling.Wesley Aptekar-Cassels2025-05-272-17/+35
| | | | | | This adds a error type for internal errors, and in error cases where we previously panicked, returns a Result instead. The publisher then simply doesn't publish the pow_params line and warns the user.
* tor-hsservice: Make PoW publisher_update_tx closed a warning.Wesley Aptekar-Cassels2025-05-271-4/+3
| | | | | This shouldn't happen, but there's not a good reason to panic if it does.
* tor-hsservice: Make PowManager persist state.Wesley Aptekar-Cassels2025-05-274-12/+74
|
* tor-hsservice: Add ReplayLog to PowManager.Wesley Aptekar-Cassels2025-05-274-15/+71
|
* tor-hsservice: Add PowNonceReplayLog.Wesley Aptekar-Cassels2025-05-272-0/+37
|
* tor-hsservice: Explicitly don't use memquota for publisher update queue.Wesley Aptekar-Cassels2025-05-271-1/+5
|
* tor-hsservice: Add PoW priority queue and checking of solves.Wesley Aptekar-Cassels2025-05-273-25/+242
|
* Add methods for getting proof-of-work extension from intro request.Wesley Aptekar-Cassels2025-05-272-1/+6
|
* tor-hsservice: Use Pin<Box<dyn Stream>>> instead of mpsc::Receiver.Wesley Aptekar-Cassels2025-05-274-8/+9
| | | | | This will allow us to more easily switch out the implementation of this queue as is needed for PoW.
* tor-hsservice: Initial parts of PowManager.Wesley Aptekar-Cassels2025-05-277-7/+519
| | | | | | | This adds PowManager, as described in doc/dev/notes/service-side-pow.md, hooks it into IptManager and Publisher, and adds code to publish and rotate seeds, and to keep a updated list of Verifier instances for currently active seeds.
* *: use std::io::Error::other in many placesNick Mathewson2025-05-151-1/+1
| | | | | | | The `IoError::other` function is an easier way to say `IoError::new(IoErrorKind::Other, ...)`. It's been around since 1.74, but clippy started warning about the more verbose version in 1.87.
* tor-proto: Update the TunnelMutableState when a circuit is removed.Gabriela Moldovan2025-05-151-3/+11
| | | | | | | | This is messy, because `ClientCirc::{path_ref, n_hops, ..}` become fallible (we can't unwrap the result, because when a circuit is closed, its state gets removed from the `TunnelSharedState`, but its `ClientCirc` handle continues to exist, so any attempt to retrieve the state will result in an `Err`).
* Resolve clippy warnings from 1.83Nick Mathewson2025-05-131-2/+1
| | | | | Now that our MSRV is 1.83, clippy is happy to make more recommendations for us.
* Include "bug" in all bug error messagesNick Mathewson2025-04-281-2/+2
|
* Merge branch 'todos-msrv' into 'main'Jim Newsome2025-04-241-1/+1
|\ | | | | | | | | various crates: MSRV TODO standardization and cleanup of an old TODO See merge request tpo/core/arti!2945
| * tor-hsservice: standardized MSRV TODOhashcatHitman2025-04-161-1/+1
| | | | | | | | | | - Part of a series of commits aimed at replacing all MSRV-related TODOs with a standardized format, which should be easier to find when the MSRV is bumped.
* | protover, *: Add documentation about what "supported" means.Nick Mathewson2025-04-161-1/+2
| |
* | Add warnings about removing supported protocols.Nick Mathewson2025-04-161-0/+2
| |
* | New functions to report supported subprotocolsNick Mathewson2025-04-161-0/+21
|/ | | | | | | | | | | | | | | Part of #1849. Note that these functions are distributed across crates, so that if (in the future) we stop doing API breaks with every release, we will get the right outputs. Note also that these functions build the list of protocols out of specific symbolic features, rather than numbers: this makes it easier to avoid errors about "which feature was Relay=4 again", and easier to avoid accidentally referring to a protocol that doesn't exist, like "Consensus" (should be "Cons") or "HsDir" (case is wrong).
* Use an EntropicRng trait to enforce key generation rules.Nick Mathewson2025-03-242-2/+6
| | | | | | | | | | | We want to require that whenever we generate a key that's persistent (stored in KeyMgr), it's going to be made from a stronger-than-usual Rng. This trait helps us enforce that. We also add a FakeEntropicRng struct to use for testing. Note that this turned up a case that we'd missed, which required an internal change in tor-hsservice.
* Use CautiousRng for keys going into the KeyMgr.Nick Mathewson2025-03-242-3/+2
|
* Merge branch 'named_protovers' into 'main'David Goulet2025-03-201-2/+3
|\ | | | | | | | | | | | | protover: Add support for subprotocol version mnemonics. Closes #1891 See merge request tpo/core/arti!2854
| * Use named subprotocol versions throughout arti.Nick Mathewson2025-03-121-2/+3
| |
* | squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-183-3/+3
| | | | | | | | - The Rng::gen() functions have been renamed to Rng::random().
* | squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | | | | | - The Standard distribution has been renamed to StandardUniform.
* | squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | | | | | - The rand::distributions module has been renamed to rand::distr
* | squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-185-5/+5
| | | | | | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* | Merge branch 'dev/cve/is_fully_reachable' into 'main'gabi-2502025-03-141-0/+10
|\ \ | |/ |/| | | | | | | | | tor-hsservice: Add is_fully_reachable() method Closes #1890 See merge request tpo/core/arti!2850
| * tor-hsservice: Add is_fully_reachable() methodClara Engler2025-03-131-0/+10
| | | | | | | | | | | | | | | | | | This commit adds a `is_fully_reachable()` method to `tor_hsservice::status::State` in order to check whether the hidden service is believed to be fully reachable. See #1887 Fixes #1890
* | Deprecate --onion-name; introduce --onion-addressdisha2025-03-121-6/+22
|/
* tor-rt*: Apply deferred formatting churnIan Jackson2025-03-041-1/+1
| | | | rustfmt.
* tor-rtcompat: Rename BlockOn to ToplevelBlockOnIan Jackson2025-03-044-5/+5
| | | | | | | | | | We're going to distinguish top-level runtime entry, from *re*-entry to an existing executor. It is most convenient to rename this trait first. Documentation of the distinction will come later. (We're going to retain the function name `block_on`, but we want the trait to be more obviously a top-level only thing, though, so we give it a name that will hopefully avoid it peroulating throughout the codebase..)
* Upgrade to derive_more 2Nick Mathewson2025-02-261-4/+8
| | | | | This took a little refactoring, since derive_more::Foo no longer re-exports std::ops::Foo.
* tor-hsservice: Change replay/mod.rs to replay.rs.Wesley Aptekar-Cassels2025-02-101-0/+0
| | | | We have a new lint that requires this.
* tor-hsservice: Change unclear names in ReplayLog.Wesley Aptekar-Cassels2025-02-102-21/+21
|
* tor-hsservice: Assert that hash length is correct in ReplayLog.Wesley Aptekar-Cassels2025-02-101-0/+3
|
* tor-hsservice: Change ReplayLog parse_log_leafname API.Wesley Aptekar-Cassels2025-02-103-8/+11
| | | | | This previously returned a &str for sort of unclear reasons, which was only used in logging. Remove that.
* tor-hsservice: Fix some comments in ReplayLog.Wesley Aptekar-Cassels2025-02-101-2/+5
|
* tor-hsservice: Make TODOs not doccomments.Wesley Aptekar-Cassels2025-02-101-2/+2
|
* tor-hsservice: Rename some variables to reflect refactor.Wesley Aptekar-Cassels2025-02-101-22/+22
| | | | | | Get rid of anything talking about hashes or "h" in mod.rs, since that should now be relegated to ipt.rs. Fix some other things to use generic names as well.
* tor-hsservice: Add whitespace.Wesley Aptekar-Cassels2025-02-101-0/+1
|
* tor-hsservice: Update comment in replay log code.Wesley Aptekar-Cassels2025-02-101-1/+3
|
* tor-hsservice: Remove ReplayLog::check_inner.Wesley Aptekar-Cassels2025-02-101-9/+2
| | | | | | This didn't really need to be a helper, we can just do everything in check_for_replay. It was a helper since we previously couldn't test the check_for_replay function, but now that this is generic we can.
* tor-hsservice: Remove ReplayLog HASH_LEN constant.Wesley Aptekar-Cassels2025-02-101-9/+8
| | | | | This needed to be the same as the MESSAGE_LEN constant, so we should just use the same constant for both.
* tor-hsservice: Clean up replay::ipt::hash types.Wesley Aptekar-Cassels2025-02-101-9/+6
| | | | | I don't think a newtype here was really buying us anything. Might as well get rid of it.
* tor-hsservice: Move replay::hash into replay::ipt::hash.Wesley Aptekar-Cassels2025-02-102-75/+83
| | | | The IPT log is the only one that will need hashing, so move that code.
* tor-hsservice: Move ReplayLog hashing out of generic code.Wesley Aptekar-Cassels2025-02-102-19/+20
|