summaryrefslogtreecommitdiff
path: root/crates/arti-client/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'public-dir-mgr-config' into 'main'Ian Jackson2024-01-091-1/+1
|\ | | | | | | | | | | | | dirmgr: Make the `dir_mgr_config` method public Closes #1175 See merge request tpo/core/arti!1847
| * dirmgr: Make the `dir_mgr_config` method publicEmil Engler2024-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | This commit makes the `dir_mgr_config` method of the `TorClientConfig` struct public. It might be questionable whether we should make this function public or switch to a `TryInto` trait in general, which also seems like an even Rustier solution Rustier solution. Fixes #1175
* | Fix typosDimitris Apostolou2024-01-081-1/+1
|/
* arti-client: Add an accessor for the keystore config.Gabriela Moldovan2023-12-141-0/+5
|
* Merge branch 'keymgr_enabled_default' into 'main'Nick Mathewson2023-12-131-24/+12
|\ | | | | | | | | arti_client: Cleanup around keymgr feature and config See merge request tpo/core/arti!1832
| * arti_config: remove experimental-api as way to enable keymgr.Nick Mathewson2023-12-131-7/+4
| | | | | | | | | | keymgr is always on when it is needed, so experimental-api isn't needed here.
| * arti-client: use sub_builder for ArtiNativeKeystoreConfigNick Mathewson2023-12-131-10/+3
| | | | | | | | | | | | | | | | | | The sub_builder pattern changes `StorageConfigBuilder` so that instead of holding an `Option<ArtiNativeKeystoreConfig>`, it holds an `ArtiNativeKeystoreConfigBuilder`. This makes it a little more ergonomic to use from Rust, and lets us use defaults for the builder fields so that we can make them optional in our configuration.
| * arti_client: enable keymgr when keymgr feature is configuredNick Mathewson2023-12-131-11/+9
| | | | | | | | | | | | | | This change causes arti_client to have a configurable keymgr when the onion-service-service feature is present, so that you no longer need to configure "experimental" or "experimental-api" as well in order to get a working onion service.
* | arti-client: TorClient.storage_mistrust: Correct doc commentIan Jackson2023-12-131-1/+6
| |
* | tor-hsservice: Plumb state dir and its mistrust into ipt_mgrIan Jackson2023-12-131-1/+15
| | | | | | | | | | | | | | | | | | | | | | This is needed for the replay logs. It's a shame that CheckedDir is (i) a bit unergonomic (ii) has an extra bool in it, or we could pass one of those instead of these two arguments. Since HS's might be created after startup, TorClient must have these fields.
* | arti-client: Centralise state_dir variable (fmt)Ian Jackson2023-12-131-5/+2
| |
* | arti-client: Centralise state_dir variableIan Jackson2023-12-131-3/+4
|/ | | | | Call expand_state_dir only once. We'll reuse this value, another time, too.
* Add NOTEs about similar code for address types.Nick Mathewson2023-12-121-1/+6
|
* tor-keymgr: ArtiPathSyntaxError: rename from ArtiPathErrorIan Jackson2023-12-071-1/+1
| | | | | The previous name was ambiguous, and confusable with KeyPathError (of which it is, basically, a variant).
* arti config: Declare who is supposed to add path leaf componentsIan Jackson2023-12-041-0/+10
| | | | | | Currently some components do this one way, and some the other. This is confusing. We should do it one way. This way is slightly better because it makes navigation with `grep` easier.
* tor-dirmgr: Rename DirMgrConfig.cache_path to cache_dirIan Jackson2023-12-041-1/+1
| | | | | | This variable contains precisely the value of cache_dir from arti_client::config::StorageConfig and it should therefore have the same name.
* arti config: Declare cache_dir /var/cache like natureIan Jackson2023-12-041-0/+5
|
* arti config: Declare cache_dir is not necessarily just the Tor directoryIan Jackson2023-12-041-1/+1
|
* tor-keymgr: Abolish KeyMgr::new.Gabriela Moldovan2023-11-271-2/+7
| | | | We don't use this now that we have a `KeyMgrBuilder`.
* arti-client: Stop using HsClientIntroAuthKeypair for client auth.Gabriela Moldovan2023-11-201-15/+1
| | | | Closes #1037
* Merge branch 'main' into 'main'gabi-2502023-11-171-13/+15
|\ | | | | | | | | Added macro for StorageConfig expand dir See merge request tpo/core/arti!1728
| * Added macro for StorageConfig expand dirrdbo2023-11-171-13/+15
| |
* | arti-client test: add clippy exceptionJim Newsome2023-11-161-0/+1
|/ | | | This clippy rule appears to be enabled by default in Rust 1.74.0
* Send less information in onion service BEGIN messagesNick Mathewson2023-11-151-1/+9
| | | | | | | | | While looking for differences, we found that C tor always omits the flags and the hostname from a BEGIN message sent on an onion service circuit. In torspec!179, we specified that behavior. This patch brings arti into conformance. Closes #1077.
* hsclient: Rename get_or_launch{connection => circuit}Nick Mathewson2023-10-241-1/+1
| | | | Closes #1078.
* tor-hsclient, arti-client: Make BadClientSpecifier wrap an ArtiPathError.Gabriela Moldovan2023-10-191-1/+1
|
* tor-keymgr: Use ArtiPathError for invalid ArtiPaths.Gabriela Moldovan2023-10-192-2/+7
|
* arti-client: Re-export onion-service configuration types.Nick Mathewson2023-10-031-0/+6
|
* arti-client: fix up launch_onion_service a bit.Nick Mathewson2023-10-031-10/+19
| | | | Return a stream of requests, and document what to do with them.
* hss: actually provide a stream of RendRequest from launch().Nick Mathewson2023-09-271-1/+1
|
* tor-hsservice: Run cargo fmt.Gabriela Moldovan2023-09-271-3/+1
|
* tor-hsservice: Make Launchable a non-async trait.Gabriela Moldovan2023-09-271-1/+0
| | | | | This doesn't need to be an async_trait now that `Publisher::launch` is no longer async.
* arti-client: add a minimal onion-service-launching API.Nick Mathewson2023-09-272-6/+62
|
* tor-hsclient, arti-client, tor-keymgr, tor-netdoc: Use a keypair instead of ↵Gabriela Moldovan2023-09-251-2/+2
| | | | | | | | | | | | | StaticSecret. Previously, when retrieving `KS_hsc_desc_enc` keys (or any other x25519 keys) from the keystore, the keymgr would discard the public part of the key (SSH private keys contain the public part of the key too). Instead of discarding the public key and returning just the `StaticSecret`, the keymgr now returns a `StaticKeypair`. This makes the x25519 `EncodableKey`/`ToEncodableKey` implementation consistent with the ed25519 one (which retrieves key pairs rather than "unescorted" secrets).
* arti-client: add exit selection with GeoIP country codeseta2023-09-182-1/+44
| | | | | | | | | | | | | | | | | | | | This threads the country codes work through the rest of the codebase: - `tor-dirmgr` will now enable GeoIP with the embedded database when the `geoip` future is enabled - This can be extended later using the `DirMgrConfig` to allow specifying a custom database; this is not done here, though - `tor-circmgr`'s `SupportedCircUsage` and `TargetCircUsage` fields gain new `country_code` members to allow filtering circuits by country - These are `()` in builds where the `geoip` feature is not enabled -- doing it this way means we don't have to copy and paste huge swathes of code, since we can't use `#[cfg]` in patterns - `ExitPathBuilder` gains (hacked-in) support for choosing a relay with the correct country code - Due to the lack of conjuction, we just copy and paste a small bit, pending further refactoring - `StreamPrefs` now lets you specify a country code, letting embedders make use of the feature
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-234-0/+4
|
* arti-client: Fix a couple more typos.Nick Mathewson2023-08-221-1/+1
| | | | I spotted these while I was working on something else.
* Use "typos-cli" to fix a bunch of typos.Nick Mathewson2023-08-221-1/+1
|
* Resolve a pair of warnings about redundant closures.Nick Mathewson2023-08-221-2/+2
|
* Resolve warnings about ambiguous/redundant doc linksNick Mathewson2023-08-221-2/+2
| | | | | Nightly rustdoc now warns if you have a link that isn't necessary, and if you have a link that might refer to two different things.
* arti-client: fix conditional unused_import and dead_code warningsNick Mathewson2023-08-161-3/+5
|
* arti-client: Use Path::join instead of format!.Gabriela Moldovan2023-08-141-1/+1
|
* arti-client: Make from_directories() derive the keystore_dir from state_dir.Gabriela Moldovan2023-08-111-1/+39
| | | | Closes #988
* bridge config: Fix an error message slightlyIan Jackson2023-08-081-1/+1
|
* arti-client config test: partially un-degrade formattingIan Jackson2023-08-081-10/+10
|
* arti-client config test: degrade formattingIan Jackson2023-08-081-12/+18
| | | | As demanded by rustfmt
* arti-client config: Add an extra test case for bridgesIan Jackson2023-08-081-0/+45
| | | | This complements the new `check_bridge_pt` test.
* bridge config: reject bridges=true when there are no bridgesIan Jackson2023-08-081-2/+0
| | | | This is a bugfix. Perhaps it is a security fix?
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Fix and expand the description of OnionAddressDisabledNick Mathewson2023-08-031-2/+9
| | | | | Previously there was a missing "not", and it didn't say what to do about the error.