summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
|
* Removed unnecessary lintpryty262026-07-151-1/+1
| | | | Removed unnecessary lint
* hsservice: Advertise flowctrl and cgo as appropriate.Nick Mathewson2026-07-021-0/+1
| | | | | We put this behind a feature because we probably want to test this out before we enable it.
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+2
| | | | | | | | | | | | 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.
* 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.
* Merge branch 'disable-hidden-service' into 'main'wesleyac2025-11-121-2/+8
|\ | | | | | | | | | | | | arti/arti-client/tor-hsservice: Support disabling onion services in the config Closes #2133 See merge request tpo/core/arti!3253
| * arti(-client)/tor-hsservice: return None for disabled servicehashcatHitman2025-10-161-3/+5
| | | | | | | | | | | | | | | | | | | | There is no longer a hard error anywhere for trying to launch a service which is disabled in the config. Instead, it always means returning `Ok(None)`. The axum and hyper examples were updated again as a consequence. Signed-off-by: hashcatHitman <[email protected]>
| * arti/tor-hsservice: don't warn on autostarthashcatHitman2025-10-161-8/+2
| | | | | | | | | | | | | | The "enabled" config option is back to using a regular `bool`. When unset, it defaults to true, and the service runs as if it had been set. Signed-off-by: hashcatHitman <[email protected]>
| * arti/tor-hsservice: warn on service autostarthashcatHitman2025-10-161-2/+8
| | | | | | | | | | | | | | The "enabled" config option now uses `tor_config::BoolOrAuto`. When unset (which defaults to "Auto"), the service will run with a warning. Signed-off-by: hashcatHitman <[email protected]>
| * tor-hsservice: add config to disable servicehashcatHitman2025-10-161-0/+4
| | | | | | | | | | | | | | | | | | Added the `enabled` field to the config options for hidden services. The default is `true`. If it is set to `false`, the service won't start. As of this specific commit, it's a hard error; it'll be checked again at an earlier stage where it won't be once the feature is ready. Signed-off-by: hashcatHitman <[email protected]>
* | Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-2/+2
|/ | | | Run maint/add_warning
* 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.
* hsservice: Remove misleading OnionService note.Gabriela Moldovan2025-09-121-1/+1
| | | | | | | | An `OnionService` represents a not-yet-running service. To launch it, you have to call `OnionService::launch()`, which consumes the `OnionService` and returns `RunningOnionService`, so the part of the docs saying that an `OnionService` "may or may not be running" was somewhat misleading.
* hsservice: Say how a RunningOnionService is constructed.Gabriela Moldovan2025-09-121-1/+3
| | | | | | | This adds some extra docs to `RunningOnionService`. This also removes the TODO about #1228, because that ticket was closed in !1945.
* hsservice: Remove an already-addressed TODO.Gabriela Moldovan2025-09-121-1/+0
| | | | In #1247 we decided to stick with the current names.
* arti: keys: Add `keys check-integrity` CLI toolhjrgrn2025-09-041-0/+69
|
* tor-hsservice: Move check for enable_pow without hs-pow-full feature.Wesley Aptekar-Cassels2025-08-141-11/+0
| | | | This also make this check a error rather than a warning.
* tor-hsservice: Warn when enable_pow is set on a non hs-pow-full build.Wesley Aptekar-Cassels2025-08-131-0/+11
|
* tor-hsservice: Implement enable_pow option.Wesley Aptekar-Cassels2025-08-131-1/+2
| | | | | | This does not currently allow this option to be changed at runtime, although the code is structured so that allowing it to be changed at runtime won't be too hard. This is tracked by #2082.
* tor-hsservice: Add PowManager to OnionServiceStatus.Wesley Aptekar-Cassels2025-08-131-2/+3
|
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-8/+10
| | | | | | | | | | | | | | 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.
* tor-hsservice: Add consensus params for Prop 362.Wesley Aptekar-Cassels2025-08-051-0/+1
| | | | | | | | | | | This adds the three new parameters specified in Prop 362 [0]. Two of these replace hardcoded defaults in the code. The third, HiddenServiceProofOfWorkV1ServiceIntroTimeoutSeconds, is not implemented yet, but will be in a future commit. [0]: https://spec.torproject.org/proposals/362-update-pow-control-loop.html
* Use new DisplayRedacted/DebugRedacted code for HsId.Nick Mathewson2025-07-311-2/+2
| | | | Closes #2012.
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* tor-hsservice: Make PowManager persist state.Wesley Aptekar-Cassels2025-05-271-1/+5
|
* tor-hsservice: Add ReplayLog to PowManager.Wesley Aptekar-Cassels2025-05-271-1/+9
|
* tor-hsservice: Use Pin<Box<dyn Stream>>> instead of mpsc::Receiver.Wesley Aptekar-Cassels2025-05-271-1/+4
| | | | | 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-271-3/+15
| | | | | | | 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.
* 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 CautiousRng for keys going into the KeyMgr.Nick Mathewson2025-03-241-1/+1
|
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* Deprecate --onion-name; introduce --onion-addressdisha2025-03-121-6/+22
|
* 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.
* Move helpers from tor-hsservice to tor-netdir.Wesley Aptekar-Cassels2024-11-251-2/+0
| | | | | These helpers seem potentially broadly useful, and only really discoverable if they're here.
* tor-hsservice: pass through the `CfgPathResolver`Steven Engler2024-11-181-0/+2
|
* Disable a lot of dead code warnings (fmt)Ian Jackson2024-10-171-1/+4
|
* 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.
* Introduce mpsc_channel_no_memquota and use it in the places it's wantedIan Jackson2024-10-151-1/+4
| | | | | These are the call sites where using this fucntion is correct. (Outside tor-rtmock, which we'll do separately.)
* tor-hsservice: Move HsNickname to tor-persist.Gabriela Moldovan2024-10-081-2/+1
| | | | | | | We are about to need this in `tor-keymgr`, where we're about to add a config for C Tor service keystores (the C Tor keystore config will have an associated `HsNickname` that specifies which of the arti hidden services it's supposed to be used with).
* tor-hsservice: Update docs to reflect KeystoreSelector renaming.Gabriela Moldovan2024-09-231-1/+1
|
* tor-keymgr: Rename the primary keystore for clarity.Gabriela Moldovan2024-09-231-7/+7
| | | | | | | | | | 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 API for generating the hsid for a service.Gabriela Moldovan2024-09-171-2/+30
| | | | This also reexports `HsId` from the `tor-hsservice` crate.
* tor-hsservice: Make maybe_generate_hsid take a selector (fmt).Gabriela Moldovan2024-09-171-3/+14
|
* tor-hsservice: Make maybe_generate_hsid take a selector.Gabriela Moldovan2024-09-171-6/+8
| | | | | | | | | | | We will soon add a new `OnionService` function for generating an HsId for the service without launching it (#1621). This new API will be implemented using `maybe_generate_hsid`, which will need to take the user-provided keystore selector as an argument. (the selector exists for future-proofing reasons; we're not yet exposing it in the CLI, but it will be part of the new `OnionService` API)
* tor-hsservice: Do not generate the HsId until the service is launched.Gabriela Moldovan2024-09-171-8/+10
| | | | | | | This defers generating an HsId until `OnionService::launch`, enabling us to use APIs like `OnionService::onion_name` to e.g. check for the existence of an HsId (previously, you couldn't do that because creating an `OnionService` would auto-generate the `HsId`).