| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Also, adapt the pt configuration tests to check for whether the
error messages are as expected.
|
| |
|
|
| |
We're going to start using this type for _every_ kind of transport.
|
| |\
| |
| |
| |
| | |
Encapsulate usage of config-rs inside tor-config.
See merge request tpo/core/arti!2040
|
| | |
| |
| |
| |
| | |
This will let us test our configuration logic without having
to use the `config` crate directly.
|
| |/ |
|
| |\
| |
| |
| |
| | |
arti-client: increase coverage in src/address.rs
See merge request tpo/core/arti!2029
|
| | |
| |
| |
| |
| |
| | |
- added test for TorAddr::enforce_config with invalid/onion hostname
- added test for display Host::Onion
- added test for any type &T who implement IntoTorAddr trait
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If vanguards are enabled, we will need to be able to reconfigure the HS
circ pool in `TorClient::reconfigure_inner` (to handle the switch from
vanguards-full to vanguards-lite etc.). The reconfiguration needs to
happen even if only one of `onion-service-client` and
`onion-service-service` is enabled.
Without this change, in the `onion-service-client`-enabled /
`onion-service-service`-disabled case, we'd need to reach into
`HsClientConnector::hs_circ_pool` to reconfigure the client
`HsCircPool`. By making `hs_circ_pool` part of `TorClient` in both
cases, we only need to call `HsCircPool::reconfigure` from one place (in
`TorClient::reconfigure_inner`).
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Closes #1277
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
| |
Closes #1283
|
| |
|
|
| |
Closes #1202
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Instead of using complicated match statements, use downcasting
to find error types that define specific hints. This also lets us
define a reasonable hint-extractor for anyhow::Error, and use it
when reporting errors in main.
I've left an implementation of hint() in `impl Error`, to
avoid breaking backward compatibility.
Closes #1165.
|
| |
|
|
|
|
| |
Reviewing uses of `#[educe(default)]`, I came across these two places
where it was applied to a non-generic struct without any special
attributes on fields. std's derive will do just as well here.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since Rust 1.66, std's default works properly for enums, provided that
the default variant is a unit.
Review all uses of `#[educe(default)]` on enums and replace them with
std where possible, which is most of them.
In 1.66 and later, std's `#[derive(Default)]` doesn't infer any
generic bounds on the derived impl, where it's an enum - since the
unit variant can always be constructed. So this change doesn't add
any generic bounds and is not API-visible.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We no longer do replay log locking in IptManager::new. Instead, we
rely on the acquire_instance call in OnionService::launch, which ends
up with ipt_mgr getting an InstanceHandle (which contains a lock
guard).
OnionServiceStateMgr is abolished; it existed to deal with the
generics in the tor_persist::StateMgr API. state_dir has no
generics (other than the T being loaded/stored).
Many places (structs and argument lists) now have state_dir types
which embody a path (or a CheckeDir) along with a lock, rather than
separate path+lock+mistrust.
The creation/startup code uses the new calls from state_dir.
Other more minor changes:
- StartupError::StateDirectoryInaccessible contains tor_persist::Error
- test::create_storage_handles_from_state_dir changed and renamed,
from _from_state_mgr.
- replay::PersistFile's (separate) file lock is now fslock_guard's
|
| | |
|
| |
|
|
|
| |
Service nicknames are represented by `HsNickname`, so let's
rename `HsClientSpecifier` to `HsClientNickname`.
|
| |
|
|
|
|
| |
This introduces an internal `OnionServiceStateMgr` trait, which enables
us to store the `StateMgr` inside the `OnionServiceState` (without
having to parameterize `OnionServiceState` on `S: StateMgr`).
|
| |
|
|
| |
This reduces code duplication.
|
| |
|
|
|
| |
This code was duplicated by `create_inner()` and
`create_onion_service()`.
|
| |
|
|
|
|
|
| |
The `StateMgr` is currently only needed in `launch()`, so we don't
really need to store it.
This allows us to unparameterize OnionService.
|
| |
|
|
|
| |
This will be used from `arti` to create an `OnionService`, to implement
the `arti hss` command.
|
| |
|
|
|
|
|
|
| |
This will enable us to construct non-launched (but configured)
`OnionService`s. We need this, for example, for implementing
the `arti hss` CLI command.
Part of #1227
|
| | |
|
| |
|
|
|
| |
This addresses a `TODO HSS` about not using `internal!` for an error
caused by misconfiguration.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
tor-keymgr: Abolish ArtiNativeKeystoreConfig::expand_keystore_dir.
See merge request tpo/core/arti!1867
|
| | |
| |
| |
| |
| |
| | |
This resolves a `TODO HSS` in arti-client.
Part of #1187
|
| | | |
|
| |/
|
|
|
|
|
|
| |
This addresses a `TODO HSS` about deriving the `KeySpecifier`
implementation for client key specifiers.
Note that we no longer have a key specifier type for intro auth keys
(which are not supported anyway, see #1037).
|
| | |
|
| | |
|
| | |
|