aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | geoip: Explain in more detail what a CountryCode is to us.Nick Mathewson2023-06-201-1/+14
| | |
| * | geoip: require that ccs actually are printable ascii.Nick Mathewson2023-06-201-3/+8
| | | | | | | | | | | | | | | | | | (There are plenty of strings that convert into 2 bytes of UTF8 without being two ascii characters, and there are plenty of sequences of two ascii characters that aren't printable.)
| * | geoip: Make ?? a little more bullet-proofNick Mathewson2023-06-203-5/+51
| | | | | | | | | | | | We want to make sure that ?? is always None, never a CountryCode.
* | | Merge branch 'keymgr-refactor-fs-ops' into 'main'gabi-2502023-06-204-57/+102
|\ \ \ | |/ / |/| | | | | | | | keymgr: Move FS operations out of KeyType impl See merge request tpo/core/arti!1263
| * | keymgr: Fix clippy lints.Gabriela Moldovan2023-06-202-3/+3
| | |
| * | keymgr: Address clippy lints and run cargo fmt.Gabriela Moldovan2023-06-201-1/+6
| | |
| * | keymgr: Enforce keystore_dir properties for every key read/written from the ↵Gabriela Moldovan2023-06-201-16/+19
| | | | | | | | | | | | keystore.
| * | keymgr: Update function names and docs to reflect reality.Gabriela Moldovan2023-06-203-9/+9
| | | | | | | | | | | | | | | | | | The functions that handle OpenSSH-formatted keys now no longer read or write from disk. This commit updates their names and doc strings to stop suggesting they do.
| * | keymgr: Move FS operations out of ssh.rsGabriela Moldovan2023-06-203-17/+42
| | | | | | | | | | | | | | | | | | | | | This moves the filesystem calls from the `ssh` module to `ArtiNativeKeyStore`. While `ArtiNativeKeyStore` shouldn't be concerning itself with filesystem operations either, that refactoring will be tackled separately (see arti#899).
| * | keymgr: Create a temporary error type for the key types we don't support yet.Gabriela Moldovan2023-06-202-1/+9
| | |
| * | keymgr: Create a separate error source for key corruption errors.Gabriela Moldovan2023-06-202-37/+41
| |/
* | Merge branch 'add-tor-geoip' into 'main'Nick Mathewson2023-06-206-0/+293548
|\ \ | |/ |/| | | | | tor-geoip: Add new crate with GeoIP database functionality See merge request tpo/core/arti!1239
| * tor-geoip: Add new crate with GeoIP database functionalityeta2023-06-206-0/+293548
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This adds a new crate, `tor-geoip`, which can parse and perform lookups in the GeoIP database C-tor already uses (generated by a maintenance utility in the C-tor codebase). - We embed a copy of C-tor's databases with the crate and use `include_str!` to ship them with the binary, bloating its size somewhat. - This does, however, solve the problem of figuring out how to distribute these. - The plan is to gate this functionality behind a feature flag anyway, so the cost should be nil unless explicitly opted into. Part of tpo/core/onionmasq#47.
* | Merge branch 'update-keymgr-todo' into 'main'Alexander Færøy2023-06-203-3/+4
|\ \ | | | | | | | | | | | | keymgr: Change "TODO hs" to "TODO HSS". See merge request tpo/core/arti!1264
| * | keymgr: Defer key bundle support until "Basic Service" milestone.Gabriela Moldovan2023-06-202-2/+3
| | | | | | | | | | | | We don't really need "key bundles" for the client keys.
| * | keymgr: Change "TODO hs" to "TODO HSS".Gabriela Moldovan2023-06-201-1/+1
| | | | | | | | | | | | | | | We probably don't need to support passphrases for the "Basic Client" milestone, so let's update this TODO accordingly.
* | | keymgr: Fix broken docs.Gabriela Moldovan2023-06-201-1/+1
| | |
* | | arti-client: Remove unnecessary #[cfgs(...)].Gabriela Moldovan2023-06-201-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | The `keymgr` module selects one of the key manager implementations (dummy or "real") and exposes all the APIs we need, so we can remove all of the cfgs related to the `keymgr` feature from `client.rs`. Part of #897
* | | arti-client: Create module exposing one of the key manager APIs.Gabriela Moldovan2023-06-204-105/+118
| | | | | | | | | | | | | | | | | | | | | | | | This moves the key manager API selection (dummy vs "real" impl) into the `keymgr` module. The module exports the dummy API if the `keymgr` feature is disabled, and the impl from `tor-keymgr` otherwise. Part of #897
* | | arti-client: Make some of the dummy KeyMgr impls return an error.Gabriela Moldovan2023-06-201-8/+9
| | | | | | | | | | | | | | | | | | `insert` and `remove` should return an error rather than `Ok(())`, as `Ok(())` implies the key was stored/removed, which is impossible in the no-op implementation.
* | | arti-client: Add more dummy keymgr APIs.Gabriela Moldovan2023-06-201-0/+30
| | | | | | | | | | | | | | | | | | This will help us reduce the number of `#[cfgs(...)]` from `client.rs` Part of #897
* | | arti-client: Add a result type for the dummy keymgr impl.Gabriela Moldovan2023-06-201-3/+6
| | | | | | | | | | | | Part of #897
* | | arti-client: Add an Error type for the dummy key manager.Gabriela Moldovan2023-06-202-7/+15
| | | | | | | | | | | | Part of #897
* | | arti-client, keymgr: Introduce Mistrust settings and enforce FS permissions.Gabriela Moldovan2023-06-202-8/+44
| | |
* | | arti-client: Temporarily ignore key store errors.Gabriela Moldovan2023-06-201-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | We currently initialize the `ArtiNativeKeyStore` with a dummy root dir, so when `ArtiNativeKeyStore` starts validating directories, this code will start to fail. Let's preemptively ignore any errors coming from `ArtiNativeKeyStore::new`. This is temporary and will be removed when we introduce the key store config (and a real default value for the keystore root dir).
* | | keymgr: Add TODO about separation of concerns wrt FS operations.Gabriela Moldovan2023-06-201-0/+8
| | |
* | | keymgr: Add an error variant for fs_mistrust errors.Gabriela Moldovan2023-06-202-0/+14
| | | | | | | | | | | | | | | This will be useful later, when `KeyMgr` will start validating permissions and paths.
* | | keymgr: Add a FsErrorSource to Error::Fs.Gabriela Moldovan2023-06-201-1/+21
| | | | | | | | | | | | | | | | | | In the future, the potential causes of an `Error::Filesystem` error will include permission errors as well as other errors (not just `io::Error`s).
* | | Merge branch 'circmgr-todos' into 'main'Nick Mathewson2023-06-203-59/+196
|\ \ \ | | | | | | | | | | | | | | | | Resolve several "TODO HS" comments in circmgr. See merge request tpo/core/arti!1258
| * | | Typo fixesgabi-2502023-06-201-2/+2
| | | |
| * | | circmgr: Use a slightly nicer way to pick a circuit from our pool.Nick Mathewson2023-06-161-13/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This algorithm only looks at circuits until it finds one that satisfies our needs. To get a random circuit, it just randomizes the starting point within the pool. This optimization may help if we let circuit pools grow large.
| * | | circmgr: Make hspool size dynamicNick Mathewson2023-06-162-28/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we'd always try to keep 8 circuits ready. That doesn't make sense if we are super-busy. Instead, if we run out of circuits, we double the amount that we try to keep ready, and if we never go under 80% of our target number, we half the number we try to keep ready. We limit the rate of change here, to make sure that we aren't flapping too much or shrinking too aggressively. This algorithm is still a mite arbitrary, and will need tuning in the future.
| * | | circmgr::hspool: Move the Mutex into an intermediary Inner structNick Mathewson2023-06-162-35/+53
| | | | | | | | | | | | | | | | This will be helpful as we complexify the pool behavior a bit.
| * | | circmgr: Remove TODOS about retrying.Nick Mathewson2023-06-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | These functions' documentation already says that they don't retry, and hsclient appears to be where we are concentrating our retry efforts.
| * | | cirmgr: remove a dead-code exception.Nick Mathewson2023-06-161-1/+0
| | | |
* | | | Merge branch 'rpcdoc' into 'main'Ian Jackson2023-06-204-7/+53
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | rpc: Minor docs improvements See merge request tpo/core/arti!1260
| * | | | rpc: Fix docs typoNick Mathewson2023-06-201-1/+1
| | | | |
| * | | | rpc: Cross-reference up from tor-rpcbase re where DispatchTable livesIan Jackson2023-06-161-0/+2
| | | | |
| * | | | rpc: Expand and clarify and cross-reference lock hierarchyIan Jackson2023-06-162-6/+34
| | | | |
| * | | | rpc: Document relationship between `Connection` and `RpcSession`Ian Jackson2023-06-162-1/+17
| | | | |
* | | | | Merge branch 'arti-client' into 'main'Alexander Færøy2023-06-194-37/+158
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | Sort out .onion handling in arti-client See merge request tpo/core/arti!1257
| * | | | arti-client: hs: remove some now-obsolete allowsIan Jackson2023-06-161-3/+0
| | | | |
| * | | | arti-client: address: Prefer to throw OnionAddressResolveRequest (fmt)Ian Jackson2023-06-161-9/+7
| | | | |
| * | | | arti-client: address: Prefer to throw OnionAddressResolveRequestIan Jackson2023-06-161-7/+23
| | | | | | | | | | | | | | | | | | | | Reformatting deferred for clarity.
| * | | | arti-client: hs: Test cases for variously disabling .onionIan Jackson2023-06-161-1/+57
| | | | | | | | | | | | | | | | | | | | This test case shows that we return a suboptimal error in some cases.
| * | | | arti-client: Provide ErrorDetailDiscriminants for convenient testingIan Jackson2023-06-163-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | ErrorDetail isn't PartialEq so we can't assert_eq! it. But the discriminants will be.
| * | | | arti-client: StreamPrefs::connect_to_onion_services: honourIan Jackson2023-06-163-2/+20
| | | | |
| * | | | arti-client: StreamPrefs::connect_to_onion_services: docsIan Jackson2023-06-161-1/+6
| | | | | | | | | | | | | | | | | | | | This disposes of the TODO as well.
| * | | | arti-client: StreamPrefs::connect_to_onion_services: fix cfgIan Jackson2023-06-161-1/+1
| | | | |
| * | | | arti-client: StreamPrefs::connect_to_onion_services: fix nameIan Jackson2023-06-161-1/+1
| | | | |