aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/publish/descriptor.rs
Commit message (Collapse)AuthorAgeFilesLines
* hsservice: Advertise flowctrl and cgo as appropriate.Nick Mathewson2026-07-021-0/+23
| | | | | We put this behind a feature because we probably want to test this out before we enable it.
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-1/+5
| | | | | | | | | | | 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.
* tor-hsservice: Pass Rng into PoW code where possible.Wesley Aptekar-Cassels2025-08-131-1/+1
|
* tor-hsservice: Implement enable_pow option.Wesley Aptekar-Cassels2025-08-131-1/+3
| | | | | | 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.
* netdoc, hsservice: Respect maximum descriptor sizesNick Mathewson2025-07-101-4/+7
| | | | | It would be better to take a more sophisticated approach; see #2048.
* tor-hsservice: Refactor PoW error handling.Wesley Aptekar-Cassels2025-05-271-1/+8
| | | | | | 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: Initial parts of PowManager.Wesley Aptekar-Cassels2025-05-271-4/+16
| | | | | | | 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 an EntropicRng trait to enforce key generation rules.Nick Mathewson2025-03-241-2/+4
| | | | | | | | | | | 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.
* tor-hsservice: Remove the anonymity setting from the config.Gabriela Moldovan2024-09-121-2/+2
| | | | As mentioned in #727, this is not supported yet.
* Merge branch 'publisher-svc-status' into 'main'David Goulet2024-09-101-3/+2
|\ | | | | | | | | | | | | tor-hsservice: Improve descriptor publisher status reporting Closes #1216 and #1572 See merge request tpo/core/arti!2397
| * tor-hsservice: Validate the authorized clients before publishing.Gabriela Moldovan2024-09-091-1/+1
| | | | | | | | | | This enables us to report a "broken" service status if restricted discovery is enabled but the authorized_clients list is empty.
| * tor-hsservice: Store the authorized_clients in the mutable state of the reactor.Gabriela Moldovan2024-09-091-2/+1
| | | | | | | | | | | | Previously, these were stored in the immutable state behind a mutex, but since they're not really immutable (we update them if the config changes), it makes more sense to put them in `State`.
* | tor_hsservice use get::<HsIdKey> rather than get::<HsIdKeypair>Adam Joseph F0B74D717CDE8412A3E0D4D5F29AC8080DA8E1E02024-09-091-4/+3
|/ | | | | | | | | | 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: Use OnionServiceConfigPublisherView in the publisher.Gabriela Moldovan2024-08-211-1/+2
| | | | | Resolves the TODO prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1603#note_2944902
* tor-hsservice: Log the client nicknames the descriptor is encrypted for.Gabriela Moldovan2024-08-211-1/+4
| | | | Knowing the nicknames can be useful when debugging.
* tor-hsservice: Add an extra log in the descriptor publisher.Gabriela Moldovan2024-08-051-0/+4
| | | | This helped me debug some shadow test failures.
* tor-hsservice: Use the configured authorized clients when encrypting the ↵Gabriela Moldovan2024-08-051-8/+22
| | | | descriptor.
* tor-hsservice: Remove unused variables.Gabriela Moldovan2024-07-091-2/+0
|
* tor-hsservice: Remove unused code.Gabriela Moldovan2024-07-091-153/+0
| | | | This is being reimplemented as #1292
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* tor-hsservice: client auth: Only allow `dir:...` to have valid unicodeIan Jackson2024-03-051-2/+2
| | | | | | | | | | | | We have Display/FromStr for AuthorizedClientConfig. We can't have Display if it can containa PathBuf because a PathBuf may not have a string representation. If we want to support non-unicode in the future, we'll need an escaping scheme and messing around with OsStr. The config scheme here may not be the best, but right now I'm just fixing uses of Path::display.
* tor-hsservice: prelude: Promote imports from descriptor.rsIan Jackson2024-03-051-1/+0
| | | | Move these two publisher-specific imports to publish.rs.
* tor-hsservice: prelude: Move imports from descriptor.rsIan Jackson2024-03-051-21/+2
| | | | We use these via an import of the parent, publish.rs.
* tor-hsservice: Move publish out of svcIan Jackson2024-03-051-0/+310