summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src
Commit message (Collapse)AuthorAgeFilesLines
* tor-hsservice: Suppress false-positive clippy::useless_concat.Gabriela Moldovan2025-07-071-1/+4
|
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* hspow: Add a clippy::cognitive_complexity exceptionNick Mathewson2025-07-031-0/+1
|
* hsservice: Stop using HopNum and use TargetHopDavid Goulet2025-06-261-1/+1
| | | | | | | | | | | This requires some changes to the tor-proto crate to handle the inbound TargetHop from the HS subsystem and then resolve it into a HopNum for a single circuit. It is expected that this will change again with Conflux to only use HopLocation internally in a Tunnel and then use HopNum into a Circuit. Signed-off-by: David Goulet <[email protected]>
* proto: Make send_raw_msg() use a TargetHopDavid Goulet2025-06-261-1/+1
| | | | | | | | | | | | | | | In order for this to work, a last_target_hop() function is added to ClientCirc in order to return a precise hop location as a TargetHop of the last hop. This is needed because in the HS subsystem, we need such value in order to get a location on the last physical hop before adding the virtual hop. The RDV1 cell is sent to that last target hop while the allow_stream_request() is done on the virtual target hop. Signed-off-by: David Goulet <[email protected]>
* hs: Remove the use of HopNum and instead use TargetHopDavid Goulet2025-06-261-4/+1
| | | | | | | | | | This is in the spirit of making everything going inbound the tor-proto crate to use a TargetHop. This becomes much easier for the HS subsystem as it only uses the last hop for its conversation and setup. Signed-off-by: David Goulet <[email protected]>
* proto: Add a control command to get the binding keyDavid Goulet2025-06-261-1/+3
| | | | | | | | | | | | | This allows us to use TargetHop instead of HopNum but also to get one step closer to not depend on a mutable state. We prefer resolving a TargetHop within the Reactor object in order to use the circuit list instead of the MutableState path. The HS service subsystem is modified to use this modified function that is now async and uses a TargetHop. Signed-off-by: David Goulet <[email protected]>
* proto: Move NegotiatedHopSettings to a higher levelNick Mathewson2025-06-101-1/+5
| | | | | | We will construct this object based on the circuit parameters _and_ on the target's supported protocol versions, so we need to do so when we have both pieces of info.
* *: 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
|