summaryrefslogtreecommitdiff
path: root/crates/tor-hsclient/src/connect.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-hsclient: Add an allow to this incomplete codeIan Jackson2023-04-121-0/+1
| | | | Fixes CI warning.
* 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-111-0/+120
|
* 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-111-7/+193
| | | | | | | | 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-111-6/+10
| | | | | | | | | 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.
* tor-hsconn: Rename ConnError (from HsClientConnError)Ian Jackson2023-03-301-3/+3
| | | | | 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-1/+6
| | | | | 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/+4
| | | | Obviously it will need this!
* hsclient state: Rename rechecks (from attempts) and add clarifying docsIan Jackson2023-03-011-0/+3
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1034#note_2882079
* hsclient: Use a generic to provide a mock for connect()Ian Jackson2023-03-011-1/+24
| | | | This will allow us to test state.rs.
* hsclient: Move dead code allows to specific locationsIan Jackson2023-03-011-0/+2
|
* hsclient: Implement connection attempt tracking state machineIan Jackson2023-03-011-0/+47
This compiles, but it cannot work yet. Nor can it conveniently be tested.