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
Nick Mathewson
61096d61c3
fixup-features: Use write-and-rename pattern.
2023-03-20 13:29:33 -04:00
Nick Mathewson
cd4895e525
fixup-features: Improve a comment.
2023-03-20 13:29:33 -04:00
Nick Mathewson
630d87f9c1
fixup-features: Simplify "optionality" detection.
2023-03-20 13:29:33 -04:00
Nick Mathewson
96cd970398
New "fixup-features" tool to enforce properties in Cargo.tomls
...
See top-level main.rs comment for an explanation.
Closes #771
2023-03-20 13:29:33 -04:00
Nick Mathewson
1b2f424bbc
Merge branch 'unused-type-param' into 'main'
...
remove unused type parameter
See merge request tpo/core/arti!1066
2023-03-20 11:25:28 +00:00
trinity-1686a
a2f2b31751
remove unused type parameter
2023-03-18 20:43:17 +01:00
Alexander Færøy
d8f77018f7
Merge branch 'fix-ptmgr-fuzz' into 'main'
...
tor-ptmgr: Fix fuzzer compilation.
See merge request tpo/core/arti!1063
2023-03-13 19:28:29 +00:00
Alexander Færøy
5b5fd0ee31
Merge branch 'bitflags-upgrade' into 'main'
...
Upgrade to bitflags 2.0
See merge request tpo/core/arti!1064
2023-03-13 19:27:55 +00:00
Nick Mathewson
d6bb8fee0b
Upgrade to bitflags 2.0
...
This version of bitflags now requires us to explicitly list the
traits that we want to derive for our bit-flags structs.
2023-03-13 08:47:14 -04:00
Nick Mathewson
2ddaaafafb
tor-ptmgr: Fix fuzzer compilation.
...
Since we made the internals of the ptmgr protocol parser
conditionally private, we need to tell Cargo to build the fuzzer
with the `experimental-api` feature so that it can access them.
2023-03-13 07:28:55 -04:00
Nick Mathewson
550258f166
Bump to latest fuzzer corpora.
2023-03-13 07:26:21 -04:00
Alexander Færøy
c3347d9821
Merge branch 'warnings_168' into 'main'
...
Resolve a couple of new lints with Rust 1.68
See merge request tpo/core/arti!1062
2023-03-10 12:40:59 +00:00
Nick Mathewson
552acbf07f
Fix a bunch of needless-conversion warnings.
...
Apparently 1.68 now warns when you call into_iter() on something
that's already an iterator. Fair enough. Let's stop doing that.
2023-03-10 07:09:50 -05:00
Nick Mathewson
bd0f595b83
Suppress a renamed-lint lint.
...
The derive_hash_xor_eq lint was renamed in 1.68, but we can't use
it under its new name, since we still need to support back to 1.60.
Instead, we suppress the warning about the lint being renamed.
2023-03-10 07:09:50 -05:00
Ian Jackson
82820f59d0
Merge branch 'hsplumb' into 'main'
...
Plumb `.onion` addresses through to arti-client `client.rs`
See merge request tpo/core/arti!1060
2023-03-09 18:41:18 +00:00
Ian Jackson
8c7224ef36
Discuss in comment why we're not using a newtype for the Strings in Host
2023-03-09 18:09:11 +00:00
Ian Jackson
04d843d846
Classify OnionAddressResolveRequest as NotImplemented
...
We have a theory about how this ought to work, so it's noit an API
usage error - it's an unimplemented feature.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1060#note_2884757
2023-03-09 18:09:08 +00:00
Ian Jackson
5000d11ac3
Reject invalid hostnames
...
Reject them both for .onion and for "exit" hostnames
This prevents a `Host` from having an invalid hostname in it.
2023-03-09 18:09:08 +00:00
Ian Jackson
8f8df071bc
Fix reference to no-longer-contemplated Host variant
...
Reported in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1060#note_2884755
2023-03-09 18:09:08 +00:00
Ian Jackson
8ead708512
Dummy HsId::from_str on .onion: Return Bug, rather than panicking
...
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1060#note_2884754
2023-03-09 18:09:08 +00:00
Ian Jackson
654f6689cf
Improve error from HsId parse of "www.B32.onion"
...
And add some clarity and todos about address errors.
2023-03-09 18:09:08 +00:00
Ian Jackson
0a618cbe84
Avoid arti_client::ErrorDetail::Address for TorAddrError::InvalidHostname
...
Provide an explicit From impl isntead.
2023-03-09 18:09:06 +00:00