Commit Graph

6213 Commits

Author SHA1 Message Date
Ian Jackson b8b02b38f1 Merge branch 'hs' into 'main'
Download HS descriptors

See merge request tpo/core/arti!1118
2023-04-11 19:19:48 +00:00
Ian Jackson 4b28b470a2 Merge branch 'warning' into 'main'
Fix two rustdoc warnings

See merge request tpo/core/arti!1114
2023-04-11 19:02:33 +00:00
Ian Jackson 24efbf4df7 tor-netdoc: Tidy up and fix some broken intra-doc links
1. Abbreviate the link text, and don't have it contain `crate`
   which is not really great in docs.

2. Use `super::` for the link target, to find the right thing.
   (`crate` doesn't seem to work in rustdoc, perhaps deliberately,
   although the error messages are ridiculous and claim the
   nonexistence of intermediate modules.)

3. Wrap the lines a bit more.
2023-04-11 19:31:10 +01:00
Ian Jackson 23c56db111 tor-netdir: Fix capitalisation of a doc link
Fixes a rustdoc warning.
2023-04-11 19:31:10 +01:00
Ian Jackson df3e8242ea tor-netdir: Fix link to hs_time_period function
Fixes a rustdoc warning.
2023-04-11 19:31:10 +01:00
Ian Jackson 7f51394e6e impl_debug_hex: Fix syntax error in usage template
Corrects the doc and fixes a rustdoc warning.
2023-04-11 19:31:10 +01:00
Ian Jackson 592252ae0a hs connect: Improve a todo and refer to #813 2023-04-11 19:14:01 +01:00
Ian Jackson 26d3bf67e9 hs connect: Add TODOs re improving tests
Aa per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1118#note_2894467
2023-04-11 19:14:01 +01:00
Ian Jackson db457de99b hs connect: Add TODO re multiple parallel hsdir requests 2023-04-11 19:14:01 +01:00
Ian Jackson 7198afa153 hs connect: Improve docs for descriptor_ensure 2023-04-11 19:14:01 +01:00
Ian Jackson b78240131f hs connect: Clarify clientness of Context 2023-04-11 19:14:01 +01:00
Ian Jackson 54bec0bf8d hs connect tests: check that we asked exactly one relay 2023-04-11 19:14:01 +01:00
Ian Jackson 2ac87a6690 hs connect tests: derive Default for MocksGlobal, and use it 2023-04-11 19:14:01 +01:00
Ian Jackson f5a5743468 hs connect: Test descriptor download 2023-04-11 19:14:01 +01:00
Ian Jackson be98cb890d hs connect: Do circuitry etc. via mocks trait
This doesn't change the text of the functional code, but now the
methods are indirected via the Mock* traits.
2023-04-11 19:14:01 +01:00
Ian Jackson e6b8752d98 hs dirs: Initial cut at descriptor downloading
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/
2023-04-11 19:14:01 +01:00
Ian Jackson 99bc97118f hs desc: Record a Timebound<HsDesc> (but not really for now)
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.
2023-04-11 19:14:01 +01:00
Ian Jackson bb5b2be5f1 hs connect: Introduce Context
This will be convenient as the common context for the descriptor
download work, and also for testing.
2023-04-11 19:14:01 +01:00
Ian Jackson 565b063a52 hs dirs: Note a thing we don't implement yet
We'll add this later, about here.
2023-04-11 19:14:01 +01:00
Ian Jackson d8ed32b321 hs dirs: Implement spread_fetch (fmt) 2023-04-11 19:14:01 +01:00
Ian Jackson 95125d9e72 hs dirs: Implement spread_fetch 2023-04-11 19:14:01 +01:00
Ian Jackson 3ea8f3b7e0 hs dirs: Fix wrong ignored variable name
This is the HsDirIndex, not the Hs[Blind]Id.
2023-04-11 19:14:01 +01:00
Ian Jackson a3945ad3c6 hs dirs: Replicas are 1-indexed 2023-04-11 19:14:01 +01:00
Ian Jackson a1241bca43 tor-netdir: Make an import more precise
With this
  cargo +stable clippy --locked --offline -p tor-netdir --features=hs-client --all-targets

I got this:

64 | use {hsdir_params::HsDirParams, hsdir_ring::HsDirRing, itertools::chain, std::iter};
   |                                                        ^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default
2023-04-11 19:14:01 +01:00
Ian Jackson 9c3ccaefb2 Merge branch 'correct_osx_config' into 'main'
arti: Explain correct location of OSX config.

See merge request tpo/core/arti!1125
2023-04-11 15:35:53 +00:00
Nick Mathewson ba4b43aa8c Add a semver entry for !1112. 2023-04-10 14:38:51 -04:00
Nick Mathewson 2bcd896155 Merge branch 'refactor' into 'main'
Use an Enum for the description request

Closes #807

See merge request tpo/core/arti!1112
2023-04-10 18:37:45 +00:00
tranna 51b5ba6681 Use an Enum for the description request 2023-04-10 18:37:45 +00:00
Nick Mathewson 6e05eb36a2 arti: Explain correct location of OSX config. 2023-04-10 11:25:26 -04:00
Nick Mathewson 1af2296cc2 Merge branch 'new_crossbeam_channel' into 'main'
Update to new version of crossbeam-channel.

See merge request tpo/core/arti!1124
2023-04-10 11:56:26 +00:00
Nick Mathewson 6f6145c32d Update to new version of crossbeam-channel.
The previous one is yanked, which is making our cargo-audit
script fail.
2023-04-10 07:35:17 -04:00
gabi-250 2577a02191 Merge branch 'matrix_warnings' into 'main'
Fix various warnings/errors when building with different features.

Closes #801

See merge request tpo/core/arti!1120
2023-04-06 18:51:13 +00:00
Nick Mathewson d12e2422b3 linkspec: Add a missing ; in tests. 2023-04-06 10:27:35 -04:00
Nick Mathewson fdd28d9319 dirclient: fix an "unused import" warning. 2023-04-06 10:26:58 -04:00
Nick Mathewson 9dbfaf5f9b guardmgr: update feature behavior wrt testing and pts. 2023-04-06 10:26:20 -04:00
Nick Mathewson 2f231b2ea0 circmgr: make "testing" depend on guardmgr/testing 2023-04-06 10:24:32 -04:00
Nick Mathewson 43e1128cdf circmgr: Mark a number of internal APIs as hs-only.
This resolves a few dead-code warnings.

Closes #801.
2023-04-06 09:05:12 -04:00
Nick Mathewson c22cf483ff circmgr: Expand an incomplete comment in exitpath.rs 2023-04-06 08:59:41 -04:00
Nick Mathewson 465ad963c4 Merge branch 'rw' into 'main'
tor-async-utils: Introduce JoinReadWrite

See merge request tpo/core/arti!1115
2023-04-06 12:28:54 +00:00
Ian Jackson 11d0c4c6fb Merge branch 'error' into 'main'
tor-error: Introduce ErrorKind::TorDirectoryBroken

See merge request tpo/core/arti!1117
2023-04-06 10:43:52 +00:00
Ian Jackson bf9a7826de tor-error: Rename ErrorKind::TorDirectoryUsable (from ...Broken)
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1117#note_2893986

(Not going to squash this as it has a semantic conflict with !1118, so
needs a little special handling there.)
2023-04-06 11:06:18 +01:00
Ian Jackson 4bf42c951c JoinReadWrite: Minor docs improvements. 2023-04-06 11:02:27 +01:00
Ian Jackson fbf1a6d8d4 JoinReadWrite: Move the example to the struct
This makes it more prominent on the rustdoc page.
2023-04-06 11:02:03 +01:00
Ian Jackson 2c87219a01 JoinReadWrite: Discuss using .reunite() or .unsplit()
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1115#note_2894238

And move the "This is the converse" comment to somewhere it actually
appears in public docs.  The module-level docs only appear with
--document-private-items because the modules themselves are private.
2023-04-06 10:58:39 +01:00
gabi-250 698ea803bb Merge branch 'pre' into 'main'
Two small additions to support hs desc download testing

See merge request tpo/core/arti!1116
2023-04-05 16:25:45 +00:00
Nick Mathewson df0d5054a2 Merge branch 'release' into 'main'
doc/dev/Release.md: patch release workflow

See merge request tpo/core/arti!1111
2023-04-05 14:42:03 +00:00
Ian Jackson 0e8384bcb4 tor-error: Introduce ErrorKind::TorDirectoryBroken
We will use this for a lack of HS directories.  (These aren't chosen
according to any local restrictions, so the problems with EK::NoPath
and EK::NoExit don't arise.)
2023-04-05 15:11:17 +01:00
Ian Jackson dfceb50f69 tor-netdir: testnet: Make all non-guard non-exits be hsdirs 2023-04-05 15:10:07 +01:00
Ian Jackson c29cb6ac2b tor-circmgr: HsCircKind: derive Eq 2023-04-05 15:10:07 +01:00
Ian Jackson 10f19eaf56 tor-async-utils: Introduce JoinReadWrite
I wanted one of these for a test stream.  Unaccountably neither
the futures crate, nor tokio, seem to have one!
2023-04-05 13:34:25 +01:00