| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new method modifies a builder by replacing any unset values
that have a default with that default. We're using this method
so that we can re-serialize a builder into a `ConfigurationTree`
with all of its default values included.
In all cases, `b.apply_defaults()?; b.build()` should produce
the same output as `b.build()`.
The interesting parts of this commit are in tor_config::load
and tor_config::derive. The rest of this commit just adds
`apply_defaults` to other builders that _aren't_ made with
`derive_deftly(TorConfig)`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test was supposed to set both the current and the previous SRV in the
test netdir, but was actually only setting the previous one.
With the new SRV fixes from ee07c441909b41d5fbbfbffae310e954a69db478,
all the hsservice tests using this netdir were panicking on an
`.unwrap()`, because the SRV for the "previous" TP could not be found,
which is actually what you'd expect to happen, given that the netdir was
built with only one SRV. The reason the tests weren't failing before is,
funnily enough, because of the bug in SRV calculation that is fixed in
ee07c441909b41d5fbbfbffae310e954a69db478:
In `tor-netdir`, the `extract_srvs()` function (correctly) only returned
a single SRV from the consensus (the "previous one", set with
`bld.shared_rand_prev()` in the test), but the `find_params_for_time()`
was wrongly matching up that same SRV with multiple time periods. This
happened because the old implementation was computing the "previous SRV"
validity interval as:
* ts_begin = `[start_of_day_containing(consensus_ts) - ONE_DAY`
* ts_end = `ts_begin + srv_interval`
And because the test SRV interval is 288h(!), and the test TP length is
only 24h, the validity period of the previous SRV (incorrectly) covered
two TPs (both the previous and the current). So as a result, the test
was "successfully" getting back the same SRV for both the previous and
the current TP.
The bug was introduced in the commit that originally added the hsservice
tests: 279842526591918e25ca97e6392f211a50192396
|
| |
|
|
|
|
|
|
|
|
|
| |
When the circ-padding feature is enabled, we use maybenot, which does
not yet support rand 0.10. In the meantime, enabling this feature pulls
in rand 0.9. This is not ideal, but should be okay as a temporary
situation.
This also replaces the use of ReseedingRng (which was removed in 0.10)
with the reseeding_rng crate. This is somewhat less performant, but it
should be okay.
|
| |
|
|
|
| |
This saves a little memory, but the technique will help save more
memory for other uploads.
|
| |
|
|
|
| |
This required a change to the hsservice tests, which previously
assumed that we'd perform one write per request.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Typos found with codespell
|
| | |
|
| |
|
|
|
| |
Some of the behaviors of the existing types here are nonstandard;
I've kept them and documented them, to avoid breaking compatibility.
|
| |\
| |
| |
| |
| |
| |
| | |
proto: Replace circuit-scoped `CircSyncView` with per-hop alternative
Closes #2351
See merge request tpo/core/arti!3680
|
| | |
| |
| |
| | |
And update the docs
|
| |/
|
|
|
|
|
|
|
| |
`clippy::collapsible_if` started triggering after bumping the MSRV to
1.88.
Since this triggers from a lot of places, and since there even are a
couple of instances where we explicitly allow `clippy::collapsible_ifs`,
I've opened #2342 for deciding what to do about it.
|
| |
|
|
|
| |
See discussion at
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3613#note_3332767
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 84b31824f317458a2aad6fb021b623935870f5bd.
Reverted, as this is a public API that might actually need to become
`async` at some point.
See discussion at
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3613#note_3332767
|
| | |
|
| |
|
|
| |
This lint triggers now that the unnecessary `async` is gone.
|
| | |
|
| |
|
|
| |
This adds the lint to all our crates.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This will make it easier to see the correspondence between CTorPaths
and the HS client/service key specifiers.
Initially, I was hoping this would make it easier to write a d-d macro
that automatically derives a `CTorPath` variant (e.g.
`HsClientDescEncKeypair`) from the KeySpecifier type name
(`HsClientDescEncKeypairSpecifier`), but alas, I don't think d-d can
"chop off" name suffixes ("Specifier", in this case).
`from_ctor_path()`/`ctor_path()` implementations for converting
`CTorPath`s to and from key specifiers.
|
| | |
|
| | |
|
| |
|
|
|
| |
The `ArtiPath` is included in the `KeyPathError::Arti` outer error type,
so there is no need to include it in `ArtiPathError` too.
|
| | |
|
| |
|
|
|
| |
This makes the error handling around `KeyPath`s a bit more sensible,
IMO, and it will make it easier to extend it for `CTorPath` errors.
|
| |
|
|
|
|
|
| |
This is similar to `#[serde(with = "...")]`, and feels a bit nicer than
having to specify two separate functions for the conversions (because
with two separate functions, you *can* technically only specify one of
them, which shouldn't be allowed).
|
| |
|
|
|
| |
This enables us to implement `KeyMgr::describe()`, which relies on the
ability to extract the key specifier of the key from its `KeyPath`.
|
| | |
|
| |
|
|
| |
rend_handshake time
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This code was duplicated across hsclient and hsservice.
Logically, it belongs in netdir, since that's where we have the
latest required-protocol information, and the ability to look up
relays by IDs.
Closes #1223
|
| | |
|
| |\
| |
| |
| |
| | |
arti: Add rate_limit_at_intro to the example config
See merge request tpo/core/arti!3493
|
| | | |
|
| |\ \
| |/
|/|
| |
| | |
hsservice: Clarify what max_concurrent_streams_per_circuit does
See merge request tpo/core/arti!3492
|
| | |
| |
| |
| |
| |
| |
| | |
At first glance, this might seem equivalent to C Tor's
`HiddenServiceMaxStreams` option, but it's actually
`HiddenServiceMaxStreamsCloseCircuit` (Arti doesn't implement the
former).
|
| |/
|
|
|
| |
These are all aimed at figuring out in more detail what's going on
in #2079 and related issues.
|
| |\
| |
| |
| |
| |
| |
| | |
arti/arti-client/tor-hsservice: Support disabling onion services in the config
Closes #2133
See merge request tpo/core/arti!3253
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no longer a hard error anywhere for trying to launch a service
which is disabled in the config. Instead, it always means returning
`Ok(None)`.
The axum and hyper examples were updated again as a consequence.
Signed-off-by: hashcatHitman <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
The "enabled" config option is back to using a regular `bool`. When
unset, it defaults to true, and the service runs as if it had been set.
Signed-off-by: hashcatHitman <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
As requested in the review, there's a TODO now so we can come back some
day and allow onion services to be started/stopped while the client is
running.
Signed-off-by: hashcatHitman <[email protected]>
|