summaryrefslogtreecommitdiff
path: root/crates/tor-hsclient/src/state.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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-301-11/+11
| | | | | 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-301-5/+12
| | | | | 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-281-1/+6
| | | | Obviously it will need this!
* Pass HsCircPool to hsclient connect function, not CircMgrIan Jackson2023-03-281-1/+2
| | | | | 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.
* Fix typosDimitris Apostolou2023-03-031-3/+3
|
* hsclient state: Rename rechecks (from attempts) and add clarifying docsIan Jackson2023-03-011-9/+22
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2882079
* hsclient state: Implement and test MultikeyIsolatedMap::retainIan Jackson2023-03-011-2/+3
|
* hsclient state: Split off MultikeyIsolatedMapIan Jackson2023-03-011-82/+16
|
* 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: Document sharing rulesIan Jackson2023-03-011-0/+11
| | | | | 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: Restructure using a scope to drop the mutex guardIan Jackson2023-03-011-20/+44
| | | | | | | | | | | | 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: Fix non-equal keys test to provide a (dummy) key (fmt)Ian Jackson2023-03-011-1/+4
|
* hsclient keys: Fix non-equal keys test to provide a (dummy) keyIan Jackson2023-03-011-4/+10
| | | | | We're about to fix the comparison to treat all empty key sets as equal.
* hsclient state: Test most important code pathsIan Jackson2023-03-011-16/+139
|
* hsclient: Provide some missing debug impls and trace messagesIan Jackson2023-03-011-2/+13
|
* Apply rustfmtIan Jackson2023-03-011-39/+70
|
* hsclient state: Provide one testIan Jackson2023-03-011-0/+100
|
* hsclient: Use a generic to provide a mock for connect()Ian Jackson2023-03-011-16/+43
| | | | This will allow us to test state.rs.
* hsclient: Move dead code allows to specific locationsIan Jackson2023-03-011-0/+1
|
* hsclient: Add vacuous comments as demanded by clippyIan Jackson2023-03-011-0/+5
|
* hsclient state: Bind a variable to stop rustfmt doing a terrible thingIan Jackson2023-03-011-5/+7
|
* hsclient: Implement connection attempt tracking state machineIan Jackson2023-03-011-25/+291
| | | | This compiles, but it cannot work yet. Nor can it conveniently be tested.
* tor-hscrypto: Rename key types to correspond to new spec names.Nick Mathewson2023-02-081-2/+2
|
* Add a new stub hsclient module to connect to onion services.Nick Mathewson2023-01-241-0/+39