summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add TODO to error if enable_pow is set but feature flag is disabled.Wesley Aptekar-Cassels2024-11-251-0/+1
|
* tor-hsservice: Clarify enable_pow setting TODO.Wesley Aptekar-Cassels2024-11-251-1/+1
|
* tor-netdir: Add timeliness param to wait_for_netdir_to_list.Wesley Aptekar-Cassels2024-11-251-1/+1
|
* Move helpers from tor-hsservice to tor-netdir.Wesley Aptekar-Cassels2024-11-256-99/+15
| | | | | These helpers seem potentially broadly useful, and only really discoverable if they're here.
* arti: Add onion_service.enable_pow option.Wesley Aptekar-Cassels2024-11-251-2/+8
| | | | This currently is not implemented.
* tor-hsservice: add clippy allowsSteven Engler2024-11-201-0/+4
|
* update `CfgPath::path` to use a `CfgPathResolver`Steven Engler2024-11-182-10/+9
| | | | | | | | | | | | | | | | This is a big change across multiple crates since there isn't a good way to break it up. This changes the signature of `CfgPath::path` to: ``` pub fn path(&self, path_resolver: &CfgPathResolver) -> Result<PathBuf, CfgPathError> { ``` Making this change means that our global `CfgPathResolver` needs to be stored in the 'arti-client' library instead of `tor-config-path`, and must be passed through to anything that calls `path` to expand the variables.
* tor-hsservice: pass through the `CfgPathResolver`Steven Engler2024-11-185-15/+53
|
* tor-config: removed re-export of `CfgPath`Steven Engler2024-11-043-3/+5
| | | | | Also updated other packages to get `CfgPath` directly from `tor-config-path' instead of 'tor-config'.
* Merge branch 'bug1531' into 'main'Ian Jackson2024-10-211-2/+2
|\ | | | | | | | | | | | | Move crates to crates to slotmap-careful Closes #1531 See merge request tpo/core/arti!2530
| * Convert a few crates to slotmap-carefulNeel Chauhan2024-10-171-2/+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-155-4/+13
| | | | | These are the call sites where using this fucntion is correct. (Outside tor-rtmock, which we'll do separately.)
* tor-config: Expose assert_config_error test helper.Gabriela Moldovan2024-10-081-14/+1
| | | | | | This moves the `assert_config_error` helper from the restricted discovery config tests to a `testing` module in `tor-config` (I am about to reuse it for the C Tor keystore config tests too).
* tor-hsservice: Implement ctor_path() for service keys.Gabriela Moldovan2024-10-081-0/+20
|
* tor-hsservice: Remove now-unused import from internal prelude.Gabriela Moldovan2024-10-081-1/+1
|
* tor-keymgr: Rename KeyPathRange to ArtiPathRange (fmt).Gabriela Moldovan2024-10-081-1/+1
|
* tor-keymgr: Rename KeyPathRange to ArtiPathRange.Gabriela Moldovan2024-10-082-2/+2
| | | | | This is only used for representing portions of `ArtiPath`s, so let's rename it accordingly.
* tor-keymgr: Implement KeyPath::matches for CTorPaths.Gabriela Moldovan2024-10-081-8/+6
| | | | | | | `KeyPath::matches` now returns a boolean (because we can't return a matching "range" for `CTorPaths`, because unlike ArtiPaths, they're not represented as `String`s, and do not have variable parts that need to be captured).
* tor-hsservice: Move HsNickname to tor-persist.Gabriela Moldovan2024-10-082-134/+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: Use the new "restricted discovery" terminology.Gabriela Moldovan2024-10-031-1/+1
| | | | Part of #1476
* Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-252-3/+2
| | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* 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-233-10/+10
| | | | | | | | | | 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: Remove unused import from internal prelude.Gabriela Moldovan2024-09-171-1/+1
|
* 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.
* tor-hsservice: Satisfy cargo fmt.Gabriela Moldovan2024-09-121-2/+0
|
* tor-hsservice: Remove the anonymity setting from the config.Gabriela Moldovan2024-09-123-26/+18
| | | | As mentioned in #727, this is not supported yet.
* Merge branch 'bug_1613' into 'main'gabi-2502024-09-123-6/+16
|\ | | | | | | | | | | | | 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-103-6/+16
| |
* | Merge branch 'publisher-svc-status' into 'main'David Goulet2024-09-106-144/+612
|\ \ | |/ |/| | | | | | | | | tor-hsservice: Improve descriptor publisher status reporting Closes #1216 and #1572 See merge request tpo/core/arti!2397
| * tor-hsservice: Add tests for status changes induced by descriptor uploads.Gabriela Moldovan2024-09-091-1/+185
| |
| * tor-hsservice: Include descriptor upload errors in onion service status.Gabriela Moldovan2024-09-091-9/+17
| |
| * tor-hsservice: Change the error type in Problem::DescriptorUpload.Gabriela Moldovan2024-09-092-3/+40
| | | | | | | | | | | | | | | | We will need to return a list of descriptor upload errors. We can't return a `Vec<RetryError<DescUploadError>>` here because `DescUploadError` is a lower-level error type that can't express that e.g. the upload timed out.
| * tor-hsservice: Remove unused UploadError variant (fmt).Gabriela Moldovan2024-09-091-3/+1
| |
| * tor-hsservice: Remove unused UploadError variant.Gabriela Moldovan2024-09-091-6/+1
| | | | | | | | | | We never return `UploadError::Timeout` (timeouts are represented as `BackoffError::Timeout`).
| * tor-hsservice: Rename UploadStatus to UploadResult.Gabriela Moldovan2024-09-091-4/+4
| | | | | | | | This type is a `Result`, renaming for clarity.
| * tor-hsservice: Remove outdated comment about publisher.Gabriela Moldovan2024-09-091-17/+0
| | | | | | | | The descriptor publisher docs live in the `publisher` module.
| * tor-hsservice: Fill out the missing descriptor publisher docs.Gabriela Moldovan2024-09-092-8/+66
| | | | | | | | Closes #1216
| * tor-hsservice: Return Bug where possible.Gabriela Moldovan2024-09-091-4/+4
| | | | | | | | | | This makes it clearer that some of these functions are essentially infallible.
| * tor-hsservice: Update docs with new status reporting logic.Gabriela Moldovan2024-09-091-12/+32
| |
| * tor-hsservice: Add basic tests for publisher status reporting.Gabriela Moldovan2024-09-092-4/+52
| |