aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src
Commit message (Collapse)AuthorAgeFilesLines
* tor-hsservice: Remove a useless formatIan Jackson2026-07-271-4/+4
| | | | Placates clippy.
* Use new TimeRangeBound name throughout the treeIan Jackson2026-07-161-2/+2
|
* Merge branch 'remove-lint' into 'main'Jim Newsome2026-07-156-13/+2
|\ | | | | | | | | | | | | Removed unnecessary lint Closes #2556 See merge request tpo/core/arti!4210
| * Remove now-unneeded allow(clippy::cognitive_complexity)Jim Newsome2026-07-155-11/+0
| |
| * add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
| |
| * Removed unnecessary lintpryty262026-07-152-2/+2
| | | | | | | | Removed unnecessary lint
* | multiple crates: Fix clippy warningshjrgrn2026-07-101-3/+3
|/
* hs: Add a TODO about #2598 refactoringNick Mathewson2026-07-021-0/+3
|
* Do not incluede negotiate_subproto in subproto_requestNick Mathewson2026-07-021-2/+7
| | | | | | | I had incorrectly thought that this was necessary. Fortunately, @opara looked at the spec. :) We do, however, still need to _advertise_ negotiate_subproto.
* hsservice: Accept and negotiate protocol extensions.Nick Mathewson2026-07-022-4/+93
|
* hsservice: Advertise flowctrl and cgo as appropriate.Nick Mathewson2026-07-024-0/+89
| | | | | We put this behind a feature because we probably want to test this out before we enable it.
* proto: Add crate-level exports for two extra stream types (fmt)Gabriela Moldovan2026-06-172-6/+6
|
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-0913-0/+14
| | | | | | | | | | | | 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.
* metrics: Add descriptions and units for existing metrics.Wesley Aptekar-Cassels2026-06-021-5/+29
|
* config: Add a method to fill in a builder with unset defaultsNick Mathewson2026-05-271-0/+1
| | | | | | | | | | | | | | | This new method modifies a builder by replacing any unset values that have a default with that default. We're using this method so that we can re-serialize a builder into a `ConfigurationTree` with all of its default values included. In all cases, `b.apply_defaults()?; b.build()` should produce the same output as `b.build()`. The interesting parts of this commit are in tor_config::load and tor_config::derive. The rest of this commit just adds `apply_defaults` to other builders that _aren't_ made with `derive_deftly(TorConfig)`.
* hsservice: Set the current random value for the custom netdirGabriela Moldovan2026-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test was supposed to set both the current and the previous SRV in the test netdir, but was actually only setting the previous one. With the new SRV fixes from ee07c441909b41d5fbbfbffae310e954a69db478, all the hsservice tests using this netdir were panicking on an `.unwrap()`, because the SRV for the "previous" TP could not be found, which is actually what you'd expect to happen, given that the netdir was built with only one SRV. The reason the tests weren't failing before is, funnily enough, because of the bug in SRV calculation that is fixed in ee07c441909b41d5fbbfbffae310e954a69db478: In `tor-netdir`, the `extract_srvs()` function (correctly) only returned a single SRV from the consensus (the "previous one", set with `bld.shared_rand_prev()` in the test), but the `find_params_for_time()` was wrongly matching up that same SRV with multiple time periods. This happened because the old implementation was computing the "previous SRV" validity interval as: * ts_begin = `[start_of_day_containing(consensus_ts) - ONE_DAY` * ts_end = `ts_begin + srv_interval` And because the test SRV interval is 288h(!), and the test TP length is only 24h, the validity period of the previous SRV (incorrectly) covered two TPs (both the previous and the current). So as a result, the test was "successfully" getting back the same SRV for both the previous and the current TP. The bug was introduced in the commit that originally added the hsservice tests: 279842526591918e25ca97e6392f211a50192396
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-126-8/+15
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* dirclient, hsservice: Use Arc<str> for hsdesc publishing.Nick Mathewson2026-05-121-2/+3
| | | | | This saves a little memory, but the technique will help save more memory for other uploads.
* tor-dirclient: Avoid copying bytes that we want to POST.Nick Mathewson2026-05-121-3/+12
| | | | | This required a change to the hsservice tests, which previously assumed that we'd perform one write per request.
* hsservice, llcrypto, SecurityResponse: use cfg({true,false})Nick Mathewson2026-05-071-2/+2
|
* hsclient, hsservice: Use unquoted paths in ctor_path attrGabriela Moldovan2026-04-161-2/+2
|
* hsservice: Use unquoted type in keypair_specifier attrGabriela Moldovan2026-04-161-2/+2
|
* tor-hssrvice: port to web-time-compat.Nick Mathewson2026-03-267-18/+19
|
* Fix typosTobias Stoeckmann2026-03-242-4/+4
| | | | Typos found with codespell
* Fix word duplicate typosTobias Stoeckmann2026-03-151-1/+1
|
* hsservice: Port to use derive_deftly(TorConfig)Nick Mathewson2026-02-173-31/+46
| | | | | Some of the behaviors of the existing types here are nonstandard; I've kept them and documented them, to avoid breaking compatibility.
* Merge branch 'circ-sync-view-streams' into 'main'gabi-2502026-02-161-1/+1
|\ | | | | | | | | | | | | proto: Replace circuit-scoped `CircSyncView` with per-hop alternative Closes #2351 See merge request tpo/core/arti!3680
| * proto: Rename CircSyncView to CircHopSyncViewGabriela Moldovan2026-02-161-1/+1
| | | | | | | | And update the docs
* | 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.
* hsservice: Allow clippy::unused_asyncGabriela Moldovan2026-01-281-0/+1
| | | | | See discussion at https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3613#note_3332767
* Revert "hsservice: Make RendRequest::reject() synchronous"Gabriela Moldovan2026-01-281-1/+1
| | | | | | | | | | This reverts commit 84b31824f317458a2aad6fb021b623935870f5bd. Reverted, as this is a public API that might actually need to become `async` at some point. See discussion at https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3613#note_3332767
* hsservice: Make RendRequest::reject() synchronousGabriela Moldovan2026-01-271-1/+1
|
* hsservice: Remove unnecessary wraps from publisher functionGabriela Moldovan2026-01-271-4/+4
| | | | This lint triggers now that the unnecessary `async` is gone.
* hsservice: Remove unnecessary async from publisher functionGabriela Moldovan2026-01-271-3/+3
|
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* hsclient, hsservice: Remove no longer needed conversion functionsGabriela Moldovan2026-01-061-58/+0
|
* keymgr: Use d-d to generate CTorPath<->KeySpecifier conversionsGabriela Moldovan2026-01-061-2/+2
|
* keymgr: Make CTorPath more like the client/service specifiers (fmt)Gabriela Moldovan2026-01-061-6/+2
|
* keymgr: Make CTorPath more like the client/service specifiersGabriela Moldovan2026-01-061-9/+5
| | | | | | | | | | | | | This will make it easier to see the correspondence between CTorPaths and the HS client/service key specifiers. Initially, I was hoping this would make it easier to write a d-d macro that automatically derives a `CTorPath` variant (e.g. `HsClientDescEncKeypair`) from the KeySpecifier type name (`HsClientDescEncKeypairSpecifier`), but alas, I don't think d-d can "chop off" name suffixes ("Specifier", in this case). `from_ctor_path()`/`ctor_path()` implementations for converting `CTorPath`s to and from key specifiers.
* keymgr: Push error handling into the from_ctor_path() functionsGabriela Moldovan2026-01-061-8/+16
|
* keymgr: Remove redundant ArtiPath from error context (fmt)Gabriela Moldovan2026-01-061-4/+2
|
* keymgr: Remove redundant ArtiPath from error contextGabriela Moldovan2026-01-061-5/+3
| | | | | The `ArtiPath` is included in the `KeyPathError::Arti` outer error type, so there is no need to include it in `ArtiPathError` too.
* keymgr: Split out ArtiPathError from KeyPathError (fmt)Gabriela Moldovan2026-01-061-16/+19
|
* keymgr: Split out ArtiPathError from KeyPathErrorGabriela Moldovan2026-01-061-7/+12
| | | | | This makes the error handling around `KeyPath`s a bit more sensible, IMO, and it will make it easier to extend it for `CTorPath` errors.
* keymgr: Specify ctor conversion functions as moduleGabriela Moldovan2026-01-061-42/+46
| | | | | | | This is similar to `#[serde(with = "...")]`, and feels a bit nicer than having to specify two separate functions for the conversions (because with two separate functions, you *can* technically only specify one of them, which shouldn't be allowed).
* keymgr: Extend KeySpecifier macro to support CTorPath conversionsGabriela Moldovan2026-01-061-2/+38
| | | | | This enables us to implement `KeyMgr::describe()`, which relies on the ability to extract the key specifier of the key from its `KeyPath`.
* fix: use wallclock timestamps in all push_timed callsNihal2025-12-171-1/+8
|
* refactor: convert Extend to inherent method, forbid push/extend, fix ↵Nihal2025-12-171-1/+11
| | | | rend_handshake time
* refactor: clean codeNihal2025-12-172-2/+2
|
* feat(retry-error): add timestamps to retry errorsNihal2025-12-172-2/+2
|