Commit Graph

5997 Commits

Author SHA1 Message Date
Dimitris Apostolou 629fa80674
Fix typos 2023-03-24 09:56:08 +02:00
Alexander Færøy f923e403f0 Merge branch 'paths' into 'main'
Do minimal $ and ~ handling even without expand-paths and fix build

Closes #790

See merge request tpo/core/arti!1069
2023-03-23 17:31:04 +00:00
Alexander Færøy 6fae5cc7e9 Merge branch 'upgrade_dirs' into 'main'
Bump to the lastest versions of dirs and directories.

See merge request tpo/core/arti!1072
2023-03-23 16:00:50 +00:00
Ian Jackson 03908427f7 Merge branch 'circuit_accessor' into 'main'
Add an experimental circuit accessor to DataStream.

Closes #784

See merge request tpo/core/arti!1073
2023-03-23 14:00:44 +00:00
Nick Mathewson a7b238483e Add an experimental circuit accessor to DataStream.
Closes #784.
2023-03-23 09:18:42 -04:00
Ian Jackson 91b7c735c5 Merge branch 'hsplumb' into 'main'
Plumb HS client connections through down to tor-hsclient

See merge request tpo/core/arti!1071
2023-03-23 12:24:47 +00:00
Ian Jackson b6f5c066b4 Apply deferred rustfmt churn 2023-03-23 11:50:18 +00:00
Ian Jackson 9d7983a6ea arti-client: Include redacted HsId in ObtainHsCircuit error
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1071/diffs?commit_id=580fe1118dbbbfa086d11b28e3e26d7c91afe21c#fbd7ab2d6d0a5b515697d4f9f99a42ebd508aa4b_153_165
2023-03-23 11:50:18 +00:00
Ian Jackson 1f2728caab safelog: impl From<T> for Redacted<T>
I think this is uncontroversial; we already have it for Sensitive.
2023-03-23 11:50:18 +00:00
Ian Jackson 58311571d9 arti-client: Fix wording of docs for TorClient::isolation 2023-03-23 11:50:18 +00:00
Nick Mathewson 8a11e0f6ad arti-client: Strengthen an HS todo 2023-03-23 11:50:18 +00:00
Ian Jackson b834535347 tor-proto: Feature-conditionalise some enum variants
This avoids some dead code warnings when building without send-control-msg.
2023-03-23 11:50:18 +00:00
Ian Jackson 93809cc594 tor-proto: Split off send-control-msg feature 2023-03-23 11:50:18 +00:00
Ian Jackson 14e5219f55 arti: Provide onion-service-client feature
Here I use the name I propose in !1039.
2023-03-23 11:50:18 +00:00
Ian Jackson cb93d1bee7 arti-client: Call tor-hsclient to create HS connections
Obviously this still doesn't work because the actual impl in hsclient
is just a todo!().
2023-03-23 11:50:18 +00:00
Ian Jackson 3d33ad7fdf arti-client: Create an HsClientConnector 2023-03-23 11:50:18 +00:00
Ian Jackson a2aa701eb6 arti-client: Move client stream creation out of match, in connect
We want this part for HS too.
2023-03-23 11:50:14 +00:00
Ian Jackson ca73dcfb31 arti-client: Break out TorClient::isolation(prefs)
We're going to want to reuse this.

Also: rename StreamPrefs::isolation and update the docs, to better
reflect its rather limited functionality.  The new
TorClient::isolation is the only call site.
2023-03-23 11:50:14 +00:00
Ian Jackson c36177733d tor-hsclient: Have the public API take StreamIsolation 2023-03-23 11:50:14 +00:00
Ian Jackson adc180294a tor-hsclient: impl HasKind for errors 2023-03-23 11:50:14 +00:00
Ian Jackson 2edd71a4f0 tor-hsclient: Swap errors so Bug comes last
This seems more consistent with the way it's done elsewhere.
2023-03-23 11:50:14 +00:00
Ian Jackson a2f4260666 tor-hsclient: Document clone-nature of HsClientConnector 2023-03-23 11:50:14 +00:00
Nick Mathewson 19cdb239bf Bump to the lastest versions of dirs and directories. 2023-03-22 15:15:42 -04:00
Nick Mathewson e08b2b7ffd Merge branch 'build_hs_circuits' into 'main'
First cut at a circuit launcher for onion services

Closes #691

See merge request tpo/core/arti!1065
2023-03-22 17:07:54 +00:00
Nick Mathewson dffaf60e4a hspool: simplify loop and add a maximum 2023-03-22 12:35:41 -04:00
Nick Mathewson bd80125d73 hspool: Clarify/document more TODO HS items. 2023-03-22 12:35:41 -04:00
Nick Mathewson 19a229155c circmgr: Make a separate SupportedCircUsage for HS stuff
This uncovered a bug: NoUsage wasn't correct for Hs circuits because
of its behavior with channel_usage().
2023-03-22 12:35:41 -04:00
Nick Mathewson 0521aa855e tor-proto: document deep-copy in ClientCirc::path() 2023-03-22 12:35:41 -04:00
Nick Mathewson 35967ca38d circmgr: Declare builder() unconditionally.
(Still, only expose it when experimental-api is enabled.)
2023-03-22 12:35:41 -04:00
Nick Mathewson 5b3c6b6bb3 hspool: Tweak comments and add more TODOs. 2023-03-22 12:35:41 -04:00
Nick Mathewson fcb4df8b5b circmgr: hspool now launches circuits in the background.
The prediction and scheduling logic here is quite primitive;
we should probably refactor it considerably.  This should be good
enough for now, though.
2023-03-22 12:35:41 -04:00
Nick Mathewson a14214fae6 circmgr: Add an actual pool to HsCircPool.
We now have support for a pool of pre-build circuits that we can use
for HS-related purposes, and we take circuits from this pool as
needed.

Nothing populates or cleans the circuit pool yet.
2023-03-22 12:35:41 -04:00
Nick Mathewson adafae8b3f circmgr: Begin an HS circuit pool structure
This is now enough to launch circuits on demand.  It still needs to
pre-build the first three hops, and to retry on failure.
2023-03-22 11:52:17 -04:00
Nick Mathewson bb47d42315 proto: Stabilize ClientCirc::n_hops. 2023-03-22 11:52:17 -04:00
Nick Mathewson dce4da55ae circmgr: Add a usage for building the beginning of an hs circ
This only builds the first 3 hops. It can be extended to a fourth
hop later -- or not, depending on the circuit kind.
2023-03-22 11:52:17 -04:00
Nick Mathewson ec8c7eec4e circmgr: Functions to launch an unmanaged circuit.
We'll use this to implement the circuits used by onion circuits.
2023-03-22 11:52:11 -04:00
Ian Jackson cc399c3a29 tor-config: Apply deferred rustfmt churn 2023-03-21 16:37:50 +00:00
Ian Jackson c18f5c35dc tor-config: Do minimal $ and ~ handling even without expand-paths
Fixes #790
2023-03-21 16:37:50 +00:00
Ian Jackson 92bc9ef790 tor-config: Make CfgPathError PartialEq but only when testing
So, this is not a semver addition.
2023-03-21 16:33:24 +00:00
Ian Jackson a0b78837ad tor-config: Fix build when expand-paths is disabled 2023-03-21 16:33:12 +00:00
Ian Jackson 42ad8d99aa tor-config: paths, unexpanded: use infallible conversion
str can always be made into a PathBuf.
2023-03-21 16:08:47 +00:00
Nick Mathewson 4d2140641d Merge branch 'todo' into 'main'
Sort out some blocker TODOs and ensure no more turn up

Closes #782

See merge request tpo/core/arti!1067
2023-03-21 14:34:52 +00:00
Ian Jackson 18ad2feae2 maint/check_todos: Run in CI 2023-03-21 13:08:51 +00:00
Ian Jackson 3038c7520d maint/check_todos: Offer advice on workarounds, if tripped 2023-03-21 13:08:51 +00:00
Ian Jackson ac2c56f92d Obscure various literal uses of the todo marker
In each case, use a circumlocution.
2023-03-21 13:08:51 +00:00
Ian Jackson 70b099fd0f Turn two blocking TODOs in hsdesc into "TODO HS"
TODO HS is blocking for HS release, but not for CI.
2023-03-21 13:08:14 +00:00
Ian Jackson d24a47c1d9 Sort out some TODOs in bdtest.rs 2023-03-21 13:08:14 +00:00
Ian Jackson 52470e4ffe Convert blockers in arti-testing to TODOs
I don't think these are that bad in testing code.
2023-03-21 13:08:14 +00:00
Ian Jackson 541c5338af maint/check_todos: New script 2023-03-21 13:08:14 +00:00
Nick Mathewson c48b6813b4 Merge branch 'fixup-features-tool' into 'main'
New "fixup-features" tool to enforce properties in Cargo.tomls

Closes #771

See merge request tpo/core/arti!1059
2023-03-20 18:03:38 +00:00