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
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
Ian Jackson
2957719c86
Test HsId parse of subdomain
...
This error is not great.
2023-03-09 13:41:12 +00:00
Ian Jackson
c198a26bf7
arti-client: Parse .onion addresses and dispatch to client.rs
...
Now, a Host has a separate variant for `.onion` which is always used,
even when HS is disabled.
Currently it ends in a todo!.
2023-03-09 13:41:12 +00:00
Ian Jackson
4502528d0e
arti-client: DoThingInstructions: Make error returns consistent
...
This is more comprehensible, and will be more convenient.
2023-03-09 13:41:12 +00:00
Ian Jackson
c31bc1dafe
arti-client: Host: Use Display::fmt rather than write!
...
write! is less good because the `{}` overwrites stuff like "did the
caller ask for padding".
2023-03-09 13:41:12 +00:00
Nick Mathewson
2bf71de199
Merge branch 'tor-proto-extensions' into 'main'
...
tor-proto: send an outbound meta/control-message and expect similar messages in return.
See merge request tpo/core/arti!1051
2023-03-08 20:09:20 +00:00
Nick Mathewson
e08c229412
Merge branch 'suffix' into 'main'
...
Introduce and use ends_with_ignore_ascii_case
See merge request tpo/core/arti!1058
2023-03-08 19:36:28 +00:00
Nick Mathewson
f3b8f4f73f
tor-proto: Document limitation on send_control_message
2023-03-08 14:21:33 -05:00
Nick Mathewson
c1b45e1be4
tor-proto: Say "control message" a little more consistently
...
(I found "user request" in one place, and fixed that. I am not
currently going to try to unify "control message" and "meta message"
since both terms are misleading and we already have TODOs to try to
merge them into a third better term.)
2023-03-08 14:21:33 -05:00
Nick Mathewson
9c4bdb8d8d
tor-proto: Make send_control_message wait for the reactor.
...
This way we don't need to worry about race conditions that happen if
the caller thinks that the handler is installed before it really is.
2023-03-08 14:21:33 -05:00
Nick Mathewson
7da5d7a8d7
Serval rustdoc link fixes.
2023-03-08 14:21:33 -05:00
Nick Mathewson
fe6e7e52e3
Fix an unrelated missing cfg_attr.
2023-03-08 14:21:33 -05:00
Nick Mathewson
fc31bf4e25
tor-proto: Have send_control_message install a handler, not return a stream
2023-03-08 14:21:33 -05:00