summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/svc.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | hsservice: new rend_handshake moduleNick Mathewson2023-08-171-0/+1
|/ | | | | | | | | This code has most of what we need to go from an INTRODUCE2 message we've just received to the point where we've connected to the rendezvous point and we're waiting for a stream of BEGIN messages. Unfinished pieces are marked with TODO HSS. Most of #980.
* hsservice: Add a sketched API for HsDir publishers.Nick Mathewson2023-07-311-0/+1
| | | | | | | As with the other APIs here, I'd expect that the implementors will need to refactor this a lot. Closes #972.
* hsservice: Add a draft API for intropoint establisher.Nick Mathewson2023-07-311-0/+2
| | | | | | | Taken from @diziet's !1439 and lightly cleaned up so that it compiles. Closes #971.
* hsservice: Adapt API sketches from onion-service-notes.mdNick Mathewson2023-07-311-0/+2
|
* hsservice: Adapt data structures from onion-service-notes.mdNick Mathewson2023-07-311-21/+103
| | | | | | | Also, removed some older structures that don't make sense in the current design. Closes #970
* Downgrade every "TODO HS" in tor-hsserviceNick Mathewson2023-06-201-11/+11
| | | | These are all service-specific, and not client-specific.
* Sketch an API for onion services.Nick Mathewson2023-01-241-0/+110