summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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`).
* tor-hsservice: Remove outdated TODO.Gabriela Moldovan2024-09-171-4/+0
| | | | | | As per #1247, we decided to stick with the current name. As for the docs, they were added in !1946
* tor-hsservice: Remove deprecated constructor.Gabriela Moldovan2024-09-171-36/+1
| | | | This has been deprecated since 1.2.6, so let's remove it.
* Merge branch 'bug_1613' into 'main'gabi-2502024-09-121-4/+9
|\ | | | | | | | | | | | | Bug 1613: Add support for inserting externally generated and removing arbitrary service discovery keys Closes #1613 See merge request tpo/core/arti!2396
| * tor-keymgr: add an overwrite flag to KeyMgr::insert()Morgan2024-09-101-4/+9
| |
* | Merge branch 'publisher-svc-status' into 'main'David Goulet2024-09-101-2/+0
|\ \ | |/ |/| | | | | | | | | tor-hsservice: Improve descriptor publisher status reporting Closes #1216 and #1572 See merge request tpo/core/arti!2397
| * tor-hsservice: Remove an outdated TODO.Gabriela Moldovan2024-09-091-2/+0
| | | | | | | | This is already implemented.
* | tor_hsservice use get::<HsIdKey> rather than get::<HsIdKeypair>Adam Joseph F0B74D717CDE8412A3E0D4D5F29AC8080DA8E1E02024-09-091-11/+9
|/ | | | | | | | | | There are three places where we query the KeyMgr for an `HsIdKeypair` but all we really need is the public part. This commit changes those three callsites to instead use `get::<HsIdKey>`. This relies on the previous commit, which makes sure that a request for an `HsIdKey` will always succeed if the keystore has a `HsIdKeypair` with the same service nickname.
* tor-hsservice: Log whether the service is running in restricted discovery mode.Gabriela Moldovan2024-08-131-0/+12
|
* tor-hsservice: Move authorized_clients out of RunningOnionService.Gabriela Moldovan2024-08-131-20/+0
| | | | | | We now create the authorized_clients in the publisher (we don't need the authorized_clients anywhere else, so it makes little sense to keep them in `RunningOnionService`).
* tor-hsservice: Give static_keys precedence over key_dirs (fmt).Gabriela Moldovan2024-08-051-3/+1
|
* tor-hsservice: Do not error if there are more than ↵Gabriela Moldovan2024-08-051-11/+3
| | | | | | MAX_RESTRICTED_DISCOVERY_CLIENTS. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2266#note_3051758
* tor-hsservice: Use the configured authorized clients when encrypting the ↵Gabriela Moldovan2024-08-051-0/+1
| | | | descriptor.
* tor-hsservice: Store the client keys in RunningOnionService.Gabriela Moldovan2024-08-051-0/+31
|
* tor-hsservice: Add OnionServiceBuilder, deprecate OnionService::new.Gabriela Moldovan2024-07-151-1/+30
| | | | Closes #1490
* tor-hsservice: Abolish OnionServiceState (fmt).Gabriela Moldovan2024-07-151-24/+27
| | | | Includes both `cargo fmt` and some manual code motion.
* tor-hsservice: Abolish OnionServiceState.Gabriela Moldovan2024-07-151-38/+21
| | | | | | | | | | | | | | | This removes a mostly-unnecessary struct holding the state of an `OnionService` or `RunningOnionService`. It only exists because I wanted to reduce the duplication of the `OnionService` and `RunningOnionService` fields. I am removing it because `OnionService` will soon become a builder, and this inner structure is making it difficult to create an ergonomic builder API (if we keep `OnionServiceState`, the builder fields won't map 1:1 to the fields of the build `OnionService` type). Note: this commit intentionally a bit misformatted to make reviewing easier. The reformatting will come in a future commit.
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* tor-hsservice: use shared status_tx to report OnionServiceStatus via ↵Richard Pospesel2024-04-131-6/+0
| | | | RunningOnionService::status_events()
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Fix some rustdoc warnings.Nick Mathewson2024-03-121-4/+4
| | | | | These are mostly about explicitly linking to things that were already in scope.
* Run rustfmtIan Jackson2024-03-051-2/+2
| | | | | This alphabetises the imports, ready for us to do some more manual tidying.
* tor-hsservice: prelude: Move imports from lib.rsIan Jackson2024-03-051-42/+2
|
* tor-hsservice: prelude: Move most imports from ipt_estanblish.rsIan Jackson2024-03-051-0/+2
|
* tor-hsservice: Change: Use tor-async-utils oneshot, not raw one from futuresIan Jackson2024-03-051-1/+1
| | | | This may fix some bug or other.
* tor-hsservice: Move svc.rs contents into lib.rsIan Jackson2024-03-051-2/+712
|
* tor-hsservice: Move IptLocalId into a moduleIan Jackson2024-03-051-96/+2
|
* tor-hsservice: Move publish out of svcIan Jackson2024-03-051-1/+2
|
* tor-hsservice: Move rend_handshake.rs out of svcIan Jackson2024-03-051-0/+1
|
* tor-hsservice: Move ipt_establish.rs out of svcIan Jackson2024-03-051-0/+1
|
* tor-hsservice: Move netdir.rs out of svcIan Jackson2024-03-051-1/+2
|
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* tor-hsservice: Add an IptError type for status reporting.Gabriela Moldovan2024-02-191-0/+1
| | | | | | | The `OnionServiceStatus` API can now report errors coming from `IptManager`. Part of #1083
* test-temp-dir: New crateIan Jackson2024-01-251-4/+0
| | | | | Introduce the crate, move the code motion, and make minimal necessary changes.