summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-hsservice: Add an hss state mgmt APIGabriela Moldovan2023-12-141-0/+2
|
* Merge branch 'persist-macro' into 'main'Ian Jackson2023-12-071-26/+22
|\ | | | | | | | | | | | | Improve KeySpecifier, errors, IptKeySpecifier impl, etc. Closes #1116 and #1148 See merge request tpo/core/arti!1796
| * tor-hsservice: IptLocalId: impl KeySpecifierComponentIan Jackson2023-12-071-0/+3
| |
| * tor-hsservice: IptLocalId: impl FromStr (fmt)Ian Jackson2023-12-071-4/+2
| |
| * tor-hsservice: IptLocalId: impl FromStrIan Jackson2023-12-071-25/+18
| | | | | | | | And implement serde that way, using SerdeStringOrTransparent.
| * tor-hsservice: Expose SerdeStringOrTransparent to crateIan Jackson2023-12-071-1/+3
| | | | | | | | | | And make it useable elsewhere by not expecting the particular error type.
* | Add a status API to OnionService.Nick Mathewson2023-12-071-2/+1
|/ | | | | | (This doesn't yet send any status events.) Begins work on arti#1083.
* tor-hsservice: Introduce IptStoreErrorIan Jackson2023-12-041-0/+2
| | | | | | | | | | If we can't store IPT details, we mustn't publish the corresponding IPT. But that's not fatal; maybe we can store later. So introduce a new IptStoreError type, and change the return value from some functions that are going to be able to fail that way. This introduces a new TODO HSS: we need the publisher to be able to retry after such a failure.
* tor-hsservice tests: Introduce new test_temp_dir helper moduleIan Jackson2023-11-281-0/+4
| | | | | | While debugging IPT persistence I wanted to see what the code was leaving in the storage and keystore directories. This is hard when it's all done with a vanilla tempdir().
* tor-hsservice: IptLocalId: test serde and DisplayIan Jackson2023-11-271-0/+48
|
* tor-hsservice: IptLocalId: bespoke serde implIan Jackson2023-11-271-2/+29
| | | | | This avoids writing "[42,\n 43,\n ...]" into the storage json, which is (a) wasteful (b) hard to read by hand.
* tor-hsservice: IptLocalId: impl DisplayIan Jackson2023-11-271-0/+11
| | | | This will help us construct ArtiPaths
* tor-hsservice: IptLocalId: provide dummy (test) constructorIan Jackson2023-11-271-0/+10
|
* HSS errors: expose and sort out NetdirProviderShutdown error typeIan Jackson2023-11-201-0/+1
| | | | | | We're going have it in an variant in FatalError. Also make it impl HasKind and have IptError delegate to that.
* Merge branch 'time-store' into 'main'Ian Jackson2023-11-021-0/+5
|\ | | | | | | | | Provide module for handling storage of times on disk See merge request tpo/core/arti!1723
| * tor-hsservice: New time_store moduleIan Jackson2023-11-011-0/+5
| | | | | | | | | | | | | | | | | | I found time handling in IPT persistence very confusing to think about, so I propose to deal with all of the hard questions in a module. Again we have a doctest so use the technique we used for having timeout_track not be semver-exposed.
* | hss: Add functionality for a persistent replay log.Nick Mathewson2023-11-021-0/+1
|/ | | | See comments for design notes.
* tor-hsservice: Define key specifiers using the new helper macro.Gabriela Moldovan2023-10-301-1/+4
| | | | Closes #1069
* tor-keymgr: Move the KeyDenotator trait to tor-keymgr (fmt).Gabriela Moldovan2023-10-301-3/+1
|
* tor-keymgr: Move the KeyDenotator trait to tor-keymgr.Gabriela Moldovan2023-10-301-1/+1
| | | | | The trait is no longer sealed because users should be allowed to define their own key denotators.
* tor-hsservice: Rename KeyMetadata to KeyDenotator.Gabriela Moldovan2023-10-191-1/+1
|
* tor-hsservice: Hoist the key metadata out of HsSvcKeyRole (fmt).Gabriela Moldovan2023-10-191-1/+3
|
* tor-hsservice: Hoist the key metadata out of HsSvcKeyRole.Gabriela Moldovan2023-10-191-1/+1
| | | | | We will need the string rerpresentation (minus the TimePeriod or any other metadata) of `HsSvcKeyRole`s for building `KeyPathPattern`s.
* tor-hsservice: timeout track: Add an example doctestIan Jackson2023-10-161-0/+14
|
* tor-hsservice: Narrow some dead code allowsIan Jackson2023-10-161-2/+0
|
* tor-hsservice: Better debug impl for IptLocalIdIan Jackson2023-10-161-1/+5
|
* hss: Remove OnionServiceDataStram type.Nick Mathewson2023-09-271-1/+1
| | | | | | | I think that the reason we added this was in case we needed different behavior from DataStream; but on reflection it does seem that we don't. Having a single type here will make things a bit simpler.
* 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.
* tor-hsservice: Make keys.rs a top-level module.Gabriela Moldovan2023-09-221-1/+2
|
* tor-hsservice: Remove unused keys module.Gabriela Moldovan2023-09-221-1/+0
|
* tor-hsservice: Add key specifier for blinded_id keypairs.Gabriela Moldovan2023-09-221-0/+1
|
* HSS: Enable RendRequests to be answered.Nick Mathewson2023-09-201-1/+1
| | | | | This requires yet more plumbing—this time, of HsCircPool and NetDirProvider.
* tor-hsservice: Move IptLocalId into crate toplevelIan Jackson2023-09-071-0/+13
|
* Merge branch 'hss_config' into 'main'Nick Mathewson2023-09-071-16/+3
|\ | | | | | | | | Begin working on configuration logic for onion services See merge request tpo/core/arti!1557
| * hss: Move Anonymity to module and make it serde.Nick Mathewson2023-09-071-15/+2
| |
| * hss: Add configuration fields for onion services.Nick Mathewson2023-08-281-1/+1
| |
* | tor-hsservice: Move PublishIptSet and its pieces into a new moduleIan Jackson2023-09-061-0/+1
|/ | | | | This is going to be complicated enough we probably want it split out of the publisher.
* tor-hsservice: Provide a sensible HsNicknameIan Jackson2023-08-231-0/+2
|
* tor-hsservice: About half of an IPT ManagerIan Jackson2023-08-231-0/+1
| | | | There are many TODOs and no tests, but it does compile.
* tor-hsservice: Provide timeout tracking utilitiesIan Jackson2023-08-231-0/+1
| | | | | This module is perhaps rather more comprehensive than needed right now. But I found I kept wanting to change which bits of it I used.
* tor-hsservice errors: Distinguish operational errors by contextIan Jackson2023-08-171-4/+1
| | | | | | | | | | 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.
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* hsservice: Adapt data structures from onion-service-notes.mdNick Mathewson2023-07-311-28/+56
| | | | | | | 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-6/+6
| | | | These are all service-specific, and not client-specific.
* keymgr: Move the HS client and service key specifiers out of tor-keymgr.Gabriela Moldovan2023-06-151-0/+1
| | | | | | The HS `HsClientSpecifier` and `HsClientSecretKeySpecifier` are moved to `tor-hsclient`. The HS service secret key specifier stubs are moved to `tor-hsservice`.
* hsservice: Add a note about the contents of circ_info.Nick Mathewson2023-01-241-0/+6
| | | | | In order to store per-circuit information, it's a good idea if we provide something that can be the key of a `PtrWeakKeyHashMap`.
* Sketch an API for onion services.Nick Mathewson2023-01-241-0/+39