| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Removed unnecessary lint
|
| |
|
|
|
| |
We put this behind a feature because we probably want to test this
out before we enable it.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
| |
This adds the lint to all our crates.
|
| |\
| |
| |
| |
| |
| |
| | |
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]>
|
| | |
| |
| |
| |
| |
| |
| | |
The "enabled" config option now uses `tor_config::BoolOrAuto`. When
unset (which defaults to "Auto"), the service will run with a warning.
Signed-off-by: hashcatHitman <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Added the `enabled` field to the config options for hidden services. The
default is `true`. If it is set to `false`, the service won't start. As
of this specific commit, it's a hard error; it'll be checked again at
an earlier stage where it won't be once the feature is ready.
Signed-off-by: hashcatHitman <[email protected]>
|
| |/
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |
|
|
|
|
|
|
| |
An `OnionService` represents a not-yet-running service. To launch it,
you have to call `OnionService::launch()`, which consumes the
`OnionService` and returns `RunningOnionService`, so the part of the
docs saying that an `OnionService` "may or may not be running" was
somewhat misleading.
|
| |
|
|
|
|
|
| |
This adds some extra docs to `RunningOnionService`.
This also removes the TODO about #1228, because that ticket was closed
in !1945.
|
| |
|
|
| |
In #1247 we decided to stick with the current names.
|
| | |
|
| |
|
|
| |
This also make this check a error rather than a warning.
|
| | |
|
| |
|
|
|
|
| |
This does not currently allow this option to be changed at runtime,
although the code is structured so that allowing it to be changed at
runtime won't be too hard. This is tracked by #2082.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Run cargo fix --edition
2. Selectively revert the "if let"->"match" changes.
These changes are meant to protect us from the lifetime changes
for "if let" bindings in Rust 2024.
But we're not actually relying on the old lifetime rules
anywhere, and the match syntax here is quite ugly.
3. Automatically revert `$pat:expr_2021` to `$pat:expr`.
(We don't actually want to restrict the expression syntax
that our macros accept).
Done with
`git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'`
4. Run cargo fmt.
|
| |
|
|
|
|
|
|
|
|
|
| |
This adds the three new parameters specified in Prop 362 [0].
Two of these replace hardcoded defaults in the code.
The third, HiddenServiceProofOfWorkV1ServiceIntroTimeoutSeconds, is not
implemented yet, but will be in a future commit.
[0]: https://spec.torproject.org/proposals/362-update-pow-control-loop.html
|
| |
|
|
| |
Closes #2012.
|
| |
|
|
| |
See #2060.
|
| | |
|
| | |
|
| |
|
|
|
| |
This will allow us to more easily switch out the implementation of this
queue as is needed for PoW.
|
| |
|
|
|
|
|
| |
This adds PowManager, as described in doc/dev/notes/service-side-pow.md,
hooks it into IptManager and Publisher, and adds code to publish and
rotate seeds, and to keep a updated list of Verifier instances for
currently active seeds.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Part of #1849.
Note that these functions are distributed across crates,
so that if (in the future) we stop doing API breaks
with every release, we will get the right outputs.
Note also that these functions build the list of protocols
out of specific symbolic features, rather than numbers:
this makes it easier to avoid errors about "which feature was
Relay=4 again", and easier to avoid accidentally referring to a
protocol that doesn't exist, like "Consensus" (should be "Cons")
or "HsDir" (case is wrong).
|
| | |
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| | |
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| |
|
|
|
| |
These helpers seem potentially broadly useful, and only really
discoverable if they're here.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Now
cargo check --workspace --no-default-features --all-targets
cargo build -p arti --no-default-features --features=memquota,tokio,native-tls
are both clean.
|
| |
|
|
|
| |
These are the call sites where using this fucntion is correct.
(Outside tor-rtmock, which we'll do separately.)
|
| |
|
|
|
|
|
| |
We are about to need this in `tor-keymgr`, where we're about to add a
config for C Tor service keystores (the C Tor keystore config will have
an associated `HsNickname` that specifies which of the arti hidden
services it's supposed to be used with).
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Previously, arti's primary keystore was referred to as its "default"
keystore. However, "default" is inaccurate here: there is no way to
meaningfully override this "default" (the "default" store acts as the
main keystore). Throughout the codebase, we query all keystores for keys
(including the secondary ones), but only ever write to the
default/primary keystore. This is OK for now, because it enables us to
have one mutable keystore, and multiple secondary, read-only stores.
|
| |
|
|
| |
This also reexports `HsId` from the `tor-hsservice` crate.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
We will soon add a new `OnionService` function for generating an HsId
for the service without launching it (#1621).
This new API will be implemented using `maybe_generate_hsid`, which will
need to take the user-provided keystore selector as an argument.
(the selector exists for future-proofing reasons; we're not yet exposing
it in the CLI, but it will be part of the new `OnionService` API)
|
| |
|
|
|
|
|
| |
This defers generating an HsId until `OnionService::launch`, enabling us
to use APIs like `OnionService::onion_name` to e.g. check for the
existence of an HsId (previously, you couldn't do that because creating
an `OnionService` would auto-generate the `HsId`).
|