Commit Graph

660 Commits

Author SHA1 Message Date
Ian Jackson 473447a82e Run maint/add_warning to actually apply new lint allows 2023-07-10 13:49:51 +01:00
Nick Mathewson 22f55b7cf8 Remove some needless into_iter() calls.
Clippy nightly now detects when you're calling into_iter() and
passing the result into something that accepts an
`impl IntoIterator`.
2023-07-10 12:33:21 +01:00
Kunal Mehta 7acd7de369 Update documentation regarding the `onion-service-client` feature
It is no longer experimental, but still not rated for security-sensitive
usage per <https://blog.torproject.org/arti_116_released/>.
2023-07-07 22:01:51 -04:00
Nick Mathewson 25c6fe61e4 Throughout: Use *_report!() macros for reporting Errors.
I identified the cases to replace by searching for the string
`.report()`.  There are a few that I didn't change:

  * A couple of cases that used anyhow::Error,
  * One case that reported two Errors.
  * Two cases in `tor_hsclient::err` that just did
    `error!("Bug: {}")`.

I have also not audited the cases in `tor-hsclient` where we're using
`tor_error::Report` manually.

Nonetheless, closes #949.
2023-07-07 13:00:21 -04:00
Nick Mathewson 03f9f9987a Run add_warning to remove `missing_panics_doc` deny.
Closes #950.
2023-07-06 14:32:23 -04:00
Nick Mathewson 19b1d3bba5 Additional documentation around bridges/PT configuration
This tries to flesh out some of the details for users who may be new
to bridges and PTs.

Closes #706.
2023-07-03 13:00:25 -04:00
Nick Mathewson f626bcd7f1 Finish a sentence in the documentation for TorClient::netdir() 2023-07-03 12:35:31 -04:00
Nick Mathewson 27bd990a79 Remove semver.md files for 1.1.6 2023-06-30 10:28:53 -04:00
Nick Mathewson de13a7319b Bump patchlevel versions on crates with smaller changes
Done with the commands below.

The following crates have had various changes, and should get a
patchlevel bump. Since they are pre-1.0, we do not need to
distinguish new APIs from other changes.

```
cargo set-version --bump patch -p arti-client
cargo set-version --bump patch -p safelog
cargo set-version --bump patch -p tor-bytes
cargo set-version --bump patch -p tor-cert
cargo set-version --bump patch -p tor-circmgr
cargo set-version --bump patch -p tor-config
cargo set-version --bump patch -p tor-consdiff
cargo set-version --bump patch -p tor-dirclient
cargo set-version --bump patch -p tor-dirmgr
cargo set-version --bump patch -p tor-error
cargo set-version --bump patch -p tor-hsservice
cargo set-version --bump patch -p tor-linkspec
cargo set-version --bump patch -p tor-llcrypto
cargo set-version --bump patch -p tor-netdir
cargo set-version --bump patch -p tor-netdoc
cargo set-version --bump patch -p tor-proto
cargo set-version --bump patch -p tor-rpcbase
cargo set-version --bump patch -p tor-socksproto
```

This crate has new features, but no new non-experimental Rust APIs.
So even though it is post-1.0, it gets a patchlevel bump.

```
cargo set-version --bump patch -p arti
```
2023-06-30 08:42:21 -04:00
Nick Mathewson 65e81bf0ca Bump minor versions on crates with breaking changes
Done with:
```
cargo set-version --bump minor -p tor-hsclient
cargo set-version --bump minor -p arti-rpcserver
cargo set-version --bump minor -p tor-hscrypto
cargo set-version --bump minor -p tor-cell
```
2023-06-30 08:38:16 -04:00
Gabriela Moldovan a61071f7b6 keystore: Change the dummy HsClientSpecifier to "default". 2023-06-30 11:49:07 +01:00
Ian Jackson 88527d14c8 Merge branch 'fix-unfortunate-merge-outcome' into 'main'
arti-client: Rename KeyStore to Keystore.

See merge request tpo/core/arti!1359
2023-06-30 10:41:58 +00:00
Ian Jackson a7334f86ae Merge branch 'docsrs-fix' into 'main'
Add a missing "experimental-api" rustdoc notation

See merge request tpo/core/arti!1353
2023-06-30 10:41:12 +00:00
Ian Jackson f177a5bde4 Merge branch 'fixup-features' into 'main'
Run fixup-features on current `main`

See merge request tpo/core/arti!1352
2023-06-30 10:38:53 +00:00
Gabriela Moldovan e899c41135 arti-client: Rename KeyStore to Keystore.
`KeyStore` was renamed to `Keystore` globally in !1355. This fixes a
compile error caused an unfortunate series of non-conflicting (from
git's POV) but incompatible merges:

* !1356 added a line threferencing an error variant that capitalizes the
  "s" in "KeyStore" (`ErrorDetail::KeyStore`)
* !1356 landed just before !1355 (the global renaming). Since there was
  no conflict between the 2, we're now in a state where the code added
  in !1356 is referencing an `ErrorDetail` variant that no longer
  exists.
2023-06-30 11:01:58 +01:00
Alexander Færøy 60f6fe7460 Merge branch 'keymgr-naming' into 'main'
keymgr: Rename KeyStore to Keystore globally.

See merge request tpo/core/arti!1355
2023-06-30 00:11:17 +00:00
Gabriela Moldovan 458af6e007 keymgr: Fix another infinite loop around Keymgr error handling.
This `From` impl was just calling itself recursively...
2023-06-29 23:30:28 +01:00
Gabriela Moldovan 36606a66dd keymgr: Rename KeyStore to Keystore globally.
We've been capitalizing the "s" in "KeyStore" inconsistently. This
`s/KeyStore/Keystore/g` across the codebase.
2023-06-29 22:46:15 +01:00
Nick Mathewson 8fe79b5a1d Add a missing "experimental-api" rustdoc notation 2023-06-29 17:18:23 -04:00
Nick Mathewson a88fa71f25 Resolve XXXs from fixup-features.
Some of these seem spurious: it looks like fixup-features resolved
an issue and then complained about it too.  I'll investigate further.
2023-06-29 17:14:00 -04:00
Nick Mathewson 23c67d92e6 Run "fixup-features". 2023-06-29 17:09:52 -04:00
Ian Jackson 9ef65775c9 Merge branch 'validate-client-spec' into 'main'
keymgr: Validate ArtiPaths, replace HsClientSpecifier with generic ArtiPathComponent

See merge request tpo/core/arti!1262
2023-06-29 19:49:30 +00:00
gabi-250 09cb5eed4e Merge branch 'keymgr-config' into 'main'
arti-client: Add keystore_dir to StorageConfig.

See merge request tpo/core/arti!1312
2023-06-29 19:30:41 +00:00
Ian Jackson 16a00846bd Run rustfmt 2023-06-29 19:59:26 +01:00
Nick Mathewson 90b5ce7fd7 Merge branch 'stabilize-hs-client' into 'main'
Mark all {hs,onion-serivce}-client features as non-experimental.

Closes #896

See merge request tpo/core/arti!1347
2023-06-29 18:50:30 +00:00
Gabriela Moldovan 541e56fce4 arti-client: Fix clippy lint. 2023-06-29 19:30:48 +01:00
Gabriela Moldovan 0972fc5b2d keymgr: Define an error type for bad `ArtiPathComponents`. 2023-06-29 19:28:22 +01:00
Gabriela Moldovan 20713b24bf arti-client, hsclient: Typealias HsClientSpecifier to ArtiPathComponent.
`ArtiPathComponent` is a more generic version of `HsClientSpecifier`.
2023-06-29 19:28:22 +01:00
Gabriela Moldovan 28fae4d1fd arti-client: Make keystore_dir an experimental option. 2023-06-29 19:19:51 +01:00
Ian Jackson aa55fd8c13 arti-client: StreamPrefs: Add security note 2023-06-29 19:01:33 +01:00
Ian Jackson d8e185a4bb Turn off HS client connections by default
As per IRC discussion, re lack of Vanguards.
2023-06-29 19:01:33 +01:00
Ian Jackson ea0fb30b2e arti-client tests: Explicitly enable .onion in most tests
These tests include tests of .onion, which we are disabling by
default.  So we must make some prefs that enable them.
2023-06-29 19:01:30 +01:00
Gabriela Moldovan 4693359d8b arti-client: Add TODO regarding keystore_dir deserialization. 2023-06-29 18:59:27 +01:00
Gabriela Moldovan 26eefdc564 tor-config: Make ItemOrBool an experimental feature. 2023-06-29 18:59:27 +01:00
Gabriela Moldovan 0ce5fd8f92 arti-client: Fix clippy lints.
Part of #891
2023-06-29 18:59:27 +01:00
Gabriela Moldovan 0c5c25f470 arti-client: Load keystore dir and permissions from config.
Part of #891
2023-06-29 18:59:27 +01:00
Gabriela Moldovan c93fac997e arti-client: Add expand_keystore_dir function.
Part of #891
2023-06-29 18:59:27 +01:00
Gabriela Moldovan 67db6e3127 arti-client: Add keystore_dir to StorageConfig. 2023-06-29 18:59:27 +01:00
Nick Mathewson d164a9dac2 Mark all {hs,onion-serivce}-client features as non-experimental. 2023-06-29 13:09:37 -04:00
Nick Mathewson 6c06acc02c arti_client: Add a warning comment to TorAddrError. 2023-06-29 08:16:51 -04:00
Nick Mathewson 800061e70e arti_client: Move BadOnion from TorAddrError to ErrorDetail.
This variant can never be constructed when parsing a TorAddr, so it
doesn't make sense to have it in TorAddrError: the use can never see
it unless they enable `error_detail`.

Not a semver break because the client feature is not yet stable.

Closes #932.
2023-06-29 08:16:51 -04:00
Ian Jackson a0b6f34e42 HS configuration: Plumb configuration through (fmt)
Apply deferred rustfmt churn.
2023-06-28 13:32:54 +01:00
Ian Jackson 3ebc3216e3 HS configuration: Plumb configuration through (clippy)
Apply deferred clippy churn.
2023-06-28 13:32:54 +01:00
Ian Jackson 984652217a HS configuration: Plumb configuration through
Invent a trait a la circmgr config for the hs client connector config.
Plumb a suitable value all the way through to the code that will use it.
2023-06-28 13:32:54 +01:00
Ian Jackson cc25c82d4b HS configuration: Add and honour `allow_onion_addrs` in configuration
We put this in `[address_filter]`.

The interaction with the corresponding stream preference is a bit
complicated.  We must turn the stream pref into a `BoolOrAuto`.
2023-06-28 13:32:54 +01:00
Nick Mathewson 09e4676a99 Also require that TorClientBuilder be Sync. 2023-06-26 10:58:48 -04:00
Nick Mathewson 30124acbc5 arti-client: Mark DirProviderBuilder Send+Sync;
Doing this causes TorClientBuilder to become Send.  I also add a
test to ensure that TorClientBuilder remains Send in the future.

This isn't a semver break, but only because DirProviderBuilder is
marked with `experimental-api`.

Closes #924
2023-06-26 09:49:56 -04:00
Ian Jackson f4057285ce tor-hsclient: Expire old data eventually
Otherwise we'll fill up our RAM with junk.
2023-06-23 13:49:38 +01:00
Gabriela Moldovan fbb1ad0b1e keymgr: Move dummy implementation to tor-keymgr. 2023-06-22 18:33:43 +01:00
Gabriela Moldovan b83b77d83e arti-client: Make all dummy APIs pub.
`dummy.rs` will be moved to `tor-keymgr`, which will export everything
from the module.
2023-06-22 18:31:28 +01:00