aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsclient
Commit message (Collapse)AuthorAgeFilesLines
...
* hs connect: Improve a todo and refer to #813Ian Jackson2023-04-111-2/+1
|
* hs connect: Add TODOs re improving testsIan Jackson2023-04-111-0/+3
| | | | | Aa per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1118#note_2894467
* hs connect: Add TODO re multiple parallel hsdir requestsIan Jackson2023-04-111-0/+2
|
* hs connect: Improve docs for descriptor_ensureIan Jackson2023-04-111-1/+7
|
* hs connect: Clarify clientness of ContextIan Jackson2023-04-111-1/+1
|
* hs connect tests: check that we asked exactly one relayIan Jackson2023-04-111-6/+6
|
* hs connect tests: derive Default for MocksGlobal, and use itIan Jackson2023-04-111-2/+2
|
* hs connect: Test descriptor downloadIan Jackson2023-04-112-0/+123
|
* hs connect: Do circuitry etc. via mocks traitIan Jackson2023-04-111-7/+59
| | | | | This doesn't change the text of the functional code, but now the methods are indirected via the Mock* traits.
* hs dirs: Initial cut at descriptor downloadingIan Jackson2023-04-114-11/+315
| | | | | | | | There are many TODOs here. Some are questions; some are straightforward and can be done in followups. With this code, I am able to reach the eprintln! and todo! with curl --socks5-hostname localhost:9150 https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/
* hs desc: Record a Timebound<HsDesc> (but not really for now)Ian Jackson2023-04-112-6/+11
| | | | | | | | | We have a local alias of `HsDesc = String` which needs to be got rid of. But, right now the alternative would be to implement all the code for signature checking and decryption of an `HsDesc`, before we can make a test case for the downloader part.
* hs connect: Introduce ContextIan Jackson2023-04-111-13/+91
| | | | | This will be convenient as the common context for the descriptor download work, and also for testing.
* Remove "publish = false" from tor-hsclient.arti-v1.1.3Nick Mathewson2023-03-311-2/+0
| | | | It is now a (conditional, experimental) dependency of arti-client.
* Patchlevel bumps for crates whose dependencies just changed.Nick Mathewson2023-03-311-1/+1
| | | | | | | | | | | | | | | | These crates had no changes until just a moment ago. But since we updated the versions on some of their dependents, they have now changed themselves. Thus they get patchlevel bumps. ``` tor-rtmock tor-protover tor-socksproto tor-consdiff tor-chanmgr tor-dirclient tor-hsservice ```
* Bump crate versions that have breaking changesNick Mathewson2023-03-311-1/+1
| | | | | | | | | | These crates have had breaking changes. They are pre-1.0, so they get a minor bump. ``` tor-basic-utils tor-config ```
* Bump patchlevel on crates with non-breaking changesNick Mathewson2023-03-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For these crates, the changes are nontrivial, so we _do_ bump the versions on which their dependent crates depend. Fortunately, since they are all pre-1.0, we don't need to distinguish semver-additions from other changes. (Except for arti, which _is_ post-1.0, but gets a patchlevel bump anyway.) These are unstable crates with breaking changes: ``` tor-hscrypto tor-hsclient ``` These have new or extended APIs: ``` safelog tor-bytes tor-cell tor-linkspec tor-llcrypto tor-proto tor-cert arti-client ``` These have new unstable APIs or features: ``` tor-netdoc tor-circmgr (also broke some unstable APIs) arti (is post-1.0) ``` These have bugfixes only: ``` caret tor-dirmgr ```
* tor-hsclient: Fix a doc link.Nick Mathewson2023-03-301-1/+1
|
* Run rustfmtIan Jackson2023-03-301-13/+14
| | | | Apply this churn, which I deferred for ease of review.
* tor-hsconn: Rename ConnError (from HsClientConnError)Ian Jackson2023-03-304-19/+19
| | | | | The old name was unwieldy and other crates can just as well name it by the crate scope.
* tor-client: Pass a netdir for each requestIan Jackson2023-03-303-15/+24
| | | | | This will be more convenient inside tor-hsclient. In arti-client, this mirrors the way TorClient::get_or_launch_exit_circ works.
* Pass HS identity to hsclient connection functionIan Jackson2023-03-282-2/+10
| | | | Obviously it will need this!
* Pass HsCircPool to hsclient connect function, not CircMgrIan Jackson2023-03-282-5/+6
| | | | | We separated this out in the circmgr API. This is what the HS client needs. It doesn't want to participate in the general circuit pool.
* tor-proto: Split off send-control-msg featureIan Jackson2023-03-231-1/+1
|
* tor-hsclient: Have the public API take StreamIsolationIan Jackson2023-03-231-2/+7
|
* tor-hsclient: impl HasKind for errorsIan Jackson2023-03-231-1/+20
|
* tor-hsclient: Swap errors so Bug comes lastIan Jackson2023-03-231-4/+4
| | | | This seems more consistent with the way it's done elsewhere.
* tor-hsclient: Document clone-nature of HsClientConnectorIan Jackson2023-03-231-0/+3
|
* Fix typosDimitris Apostolou2023-03-031-3/+3
|
* hsclient: Discuss HsClientConnector multiplicity/reuseIan Jackson2023-03-011-3/+7
| | | | And delete the associated TODO.
* hsclient: Remove TODOs about circular referencesIan Jackson2023-03-011-10/+0
| | | | | | | | These Arcs are all "downward", referencing items from layers lower in the stack. So they don't cause cycles. There was going to be a cycle involving the `OnionConnector` upcall trait, but we have just abolished that.
* hsclient: Abolish knowledge of HS circuits in circmgrIan Jackson2023-03-011-10/+1
| | | | | | | | | | | Abolish CircMgr::get_or_launch_onion_client and everything to support it. We have decided that `.onion` diversion ccan't/shouldn't occur in tor-circmgr. Probably, it should occur much higher up - arti-client maybe - since it will sometimes need ambient authority (KS_hsc_*). Now all knowledge of HS connections is in tor-hsclient. This gets rid of a layering inversion and the trait needed for tor-circmgr to do the upcall to tor-hsclient.
* hsclient isol_map: Use 1:1 notation in diagram to show correspondenceIan Jackson2023-03-011-1/+1
|
* hsclient isol_map: Document invariant, fix comment, terminologyIan Jackson2023-03-011-9/+15
| | | | Use the occupied/vacant terminology that the slotmap docs use.
* hsclient state: Rename rechecks (from attempts) and add clarifying docsIan Jackson2023-03-012-9/+25
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2882079
* hsclient keys: Be more explicit about HsClientSecretKeys nullableIan Jackson2023-03-011-5/+9
| | | | | It can contain no keys; state this more prominently, and explain what it represents. Also fix a few typos etc.
* hsclient state: Implement and test MultikeyIsolatedMap::retainIan Jackson2023-03-012-3/+109
|
* hsclient state: Split off MultikeyIsolatedMapIan Jackson2023-03-014-82/+190
|
* hsclient state: Move all the data fields into the tableIan Jackson2023-03-011-28/+37
| | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2881576 This is a singificant simplification, in fact.
* hsclient: Clarify period task handle TODOIan Jackson2023-03-011-1/+1
|
* hsclient: Document sharing rulesIan Jackson2023-03-012-0/+15
| | | | | Text largely from https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2881638
* hsclient state: rustfmtIan Jackson2023-03-011-241/+244
| | | | | | Autogenerated with rustfmt; no code changes. This tidies up the bizarre formatting.
* hsclient state: Lots more doc comments about barriers, structure, etc.Ian Jackson2023-03-011-2/+74
|
* hsclient state: Break `obtain` out into a fnIan Jackson2023-03-011-61/+82
| | | | | | | | | | This is getting rather confusing; simply reformtting it won't do, I think. Also there would be much rightward drift. So move the meat out into the new function. (And introduce a convenience alias for its captures.) Docs and reformatting will follow in a moment.
* hsclient state: Demonstrate that our future is now SendIan Jackson2023-03-011-3/+9
|
* hsclient state: Restructure using a scope to drop the mutex guardIan Jackson2023-03-012-20/+45
| | | | | | | | | | | | Explicit drops don't work. Instead, introduce a scope. We need two scopes, actually: one where we do the initial table wrangling, and one for the retries after relock. So we must put the meat in a closure so we can reuse it. And we must return the flow control as an enum. Bah, etc. Avoid reformatting this for the moment. This makes the delta legible...
* hsclient state: Break out ServiceState::blankIan Jackson2023-03-011-5/+12
| | | | | We're going to have another function which will want this. Leave a convenience closure to capture the runtime.
* hsclient state: Move error inspection before guard re-lock.Ian Jackson2023-03-011-4/+5
| | | | | | This is still correct from a lock hierarchy pov. It moves the guard relock to the end, which is going to be necessary since it is going to have to move right outside the loop.
* hsclient keys: Add a todo to remove spurious OptionIan Jackson2023-03-011-0/+3
|
* hsclient keys: Compare all empty sets of keys as equalIan Jackson2023-03-011-1/+5
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2881575
* hsclient keys: Fix non-equal keys test to provide a (dummy) key (fmt)Ian Jackson2023-03-011-1/+4
|