summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/svc.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-hsservice: Fix hsid being logged inappropriately.Gabriela Moldovan2023-10-191-1/+1
| | | | | | The condition for logging the "generated a new identity.." message was wrong (`generate_with_derive()` returns `Some(())` if it generated a new key, and `None` if the key was already present).
* tor-hsservice: Log newly generated HsIds.Gabriela Moldovan2023-10-191-2/+16
|
* HSS: Add many must_use annotationsIan Jackson2023-10-191-0/+1
|
* tor-hsservice: Give IptManager a KeyMgr.Gabriela Moldovan2023-10-191-0/+1
|
* tor-hsservice: Hoist the key metadata out of HsSvcKeyRole.Gabriela Moldovan2023-10-191-15/+15
| | | | | We will need the string rerpresentation (minus the TimePeriod or any other metadata) of `HsSvcKeyRole`s for building `KeyPathPattern`s.
* tor-hsservice: Narrow some dead code allowsIan Jackson2023-10-161-0/+1
|
* oneshot: Apply deferred rustfmt churnIan Jackson2023-10-111-1/+1
| | | | cargo fmt, precisely.
* oneshot: Use veneer in tor-hsserviceIan Jackson2023-10-111-1/+1
|
* tor-hsservice: Add tests for maybe_generate_hsid.Gabriela Moldovan2023-10-091-0/+189
|
* tor-hsservice: Move hsid generation to a separate function.Gabriela Moldovan2023-10-091-59/+71
|
* tor-hsservice: Make OnionServices auto-generate the hs_id, if it's missing.Gabriela Moldovan2023-10-091-0/+72
|
* Note reconfigure limitations.Nick Mathewson2023-10-051-0/+4
|
* hss: Implement a reconfigure function.Nick Mathewson2023-10-051-3/+17
|
* Merge branch 'configure_onion_service' into 'main'Nick Mathewson2023-10-031-1/+6
|\ | | | | | | | | Initial work on top-level onion service configuration See merge request tpo/core/arti!1638
| * Add/clarify comments about name duplication.Nick Mathewson2023-10-031-0/+5
| |
| * hss: Rename the "name" config field to "nickname".Nick Mathewson2023-10-031-1/+1
| |
* | tor-hsservice: Remove a fixed TODO.Gabriela Moldovan2023-10-031-1/+0
| |
* | tor-hsservice: Make the publisher not require callers to specify the hsid.Gabriela Moldovan2023-10-031-7/+2
| | | | | | | | | | | | | | | | Previously, the descriptor publisher needed the `hsid` for logging purposes and for deriving the blinded public keys. This changes the publisher to log the `HsNickname` of the service instead of the hsid, and to read the blinded keys from the keystore.
* | tor-hsservice: Rename the real version of the publisher mockable state.Gabriela Moldovan2023-10-031-3/+2
| | | | | | | | | | This renames `ReactorState` to `Real`, for consistency with `ipt_mgr`, which calls the real version of its mockable state `Real`.
* | tor-hsservice: Make the publisher generic over the mockable state (circpool ↵Gabriela Moldovan2023-10-031-2/+3
|/ | | | provider).
* hss: helper to get a stream of StreamReq from a stream of RendReq.Nick Mathewson2023-09-271-0/+3
| | | | | | This isn't very much code, but given how long it took me to write this and make it typecheck, I suspect that others may find it useful as well.
* hss: actually provide a stream of RendRequest from launch().Nick Mathewson2023-09-271-12/+22
|
* tor-hsservice: Make Publisher::launch return a StartupError.Gabriela Moldovan2023-09-271-3/+1
| | | | | | This simplifies error handling in `OnionService`. Closes #1052
* tor-hsservice: Make Launchable a non-async trait.Gabriela Moldovan2023-09-271-7/+4
| | | | | This doesn't need to be an async_trait now that `Publisher::launch` is no longer async.
* tor-hsservice: Make Publisher::launch non-async.Gabriela Moldovan2023-09-271-1/+0
| | | | | | Fixes #1052 See also the discussion in !1616
* hss: Make launch() non-consuming.Nick Mathewson2023-09-261-1/+1
| | | | | We want to still have the OnionService kicking around, so we can use it as a handle.
* tor-hsservice: Make keys.rs a top-level module.Gabriela Moldovan2023-09-221-1/+0
|
* tor-hsservice: Add key specifier for blinded_id keypairs.Gabriela Moldovan2023-09-221-0/+1
|
* tor-hsservice: Give the publisher a reference to the key manager.Gabriela Moldovan2023-09-221-0/+1
|
* hss: Un-parameterize OnionService.Nick Mathewson2023-09-211-20/+31
|
* hss: remove an "#[allow(...)]".Nick Mathewson2023-09-211-2/+0
|
* hss: adjust members of OnionService type.Nick Mathewson2023-09-211-21/+11
|
* hss: fix error return from OnionService::launch()Nick Mathewson2023-09-211-1/+5
|
* hss: start filling in a "launch" function for OnionService.Nick Mathewson2023-09-211-39/+53
|
* tor-hsservice: Fix compile error, make Publisher use Arc<OnionServiceConfig>.Gabriela Moldovan2023-09-201-2/+2
| | | | | | | | | This fixes a compile error introduced as a result of merging a couple of conflicting MRs (!1611 and !1604). This also makes the channel the publisher uses for watching for config changes receive `Arc<OnionServiceConfig>` (rather than `OnionServiceConfig`).
* hss: Use tor-persist to make a StorageHandle.Nick Mathewson2023-09-201-2/+12
| | | | We'll use this to implement intro point persistence.
* OnionService: start to flesh out the new() function.Nick Mathewson2023-09-201-5/+80
| | | | | | This has a lot of open questions, and won't work yet, but it starts to show us the current level of interface mismatch between our pieces.
* hss remove duplicated data from OnionService structure.Nick Mathewson2023-09-191-74/+1
| | | | This data is all duplicated in other places, or will be.
* tor-hsservice: Unify ids as IptLocalId replacing IntroPointIdIan Jackson2023-09-181-6/+0
| | | | | | | | | | | | | | | | | | | | IntroPointId was RelayIds but that's wrong, because there can be different IPTs at the same relay - but also because an established IPT might change its RelayIds. Use IptLocalId instead, which I think is the type we decided to use for this, and which is, conveniently, Copy. And change the variable names to match, everywhere. Specifically: in places where an intro point is implied (ipt_mgr.rs, ipt_establish.rs) use the name `lid` everywhere, like in ipt_mgr.rs. Elsewhere, use `ipt_lid`. (We could use a longer name, but in that case it should be changed in ipt_mgr.rs too.) No actual functional change in this commit.
* tor-hsservice: Have Establisher provide more information to ManagerIan Jackson2023-08-291-0/+7
| | | | | | The establisher has a netdir; the manager generally doesn't. So it will be convenient for the establisher to provide the linkspecs and so on.
* tor-hsservice: Make wait_for_netdir* more widely available.Gabriela Moldovan2023-08-251-0/+2
| | | | | `wait_for_netdir` is needed by the descriptor publisher (to compute the initial netdir).
* tor-hsservice: Expose the ipt_establish and publish modulesIan Jackson2023-08-231-2/+2
| | | | | | I still think putting these in svc/ module doesn't make much sense. Anyway, we can leave them there for now, but I need to get at them from crate::ipt_establisher.
* Use "typos-cli" to fix a bunch of typos.Nick Mathewson2023-08-221-1/+1
|
* HSS: Refactor RendRequest so we can return a stream of it.Nick Mathewson2023-08-221-1/+1
| | | | | | | We need a type that holds a rend_handshake::IntroRequest object internally, but where we don't materialize that object from the Introduce2 message inside the MsgHandler, since that's more crypto than we want to put in that task.
* Merge branch 'hss-err' into 'main'gabi-2502023-08-181-5/+8
|\ | | | | | | | | tor-hsservice errors: Introduce more error types See merge request tpo/core/arti!1515
| * tor-hsservice errors: Distinguish operational errors by contextIan Jackson2023-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | At the very least, I need FatalError to be distinct: IptEstablisher::new ought not to fail unless everything is terrible. Add a the Spawn variant to FatalError (that we'll need soon) and the Bug variant (which it seems likely we might need). This also gets rid of the crate-level Result alias.
| * tor-hsservice errors: Return ReconfigureError from reconfigureIan Jackson2023-08-171-1/+2
| | | | | | | | This is what we do elsewhere.
| * tor-hsservice errors: Use Bug for methods that oughtn't to failIan Jackson2023-08-171-1/+2
| | | | | | | | | | | | If the service encouters operational errors, surfacing them here is not helpful. So these methods ought to work, if they weren't called erroneously.
| * tor-hsservice errors: Make stop() infallibleIan Jackson2023-08-171-1/+1
| | | | | | | | | | The semantics of an Err return from this are unclear. Was it stopped? And what kind of error might we even return?
| * tor-hsservice errors: Use `crate::Result` rather than importsIan Jackson2023-08-171-5/+5
| | | | | | | | | | | | | | | | | | | | We want to change the error return types of many methods, so we need a way to name `std::result::Result`. We could use `StdResult`, but, actually, properly distinguishing the kinds of errors that can occur in various contexts means we don't actually want a single Error type for the whole crate, so `crate::Result` is going to go away.