summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | tor-chanmgr: refactored `AbstractChanMgr::choose_action`Steven Engler2024-10-152-109/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves most of the channel map logic from `AbstractChanMgr::choose_action` to `MgrState::request_channel`. This is working towards being able to remove `MgrState::with_channels{,_and_params}`.
* | | | | | rtcompat: Fix android compilation in `general`Nick Mathewson2024-10-171-1/+3
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously I had assumed that `std::os::linux` also existed on android, based on the documentation of `std::os::linux::net::SocketAddrExt`. That is not, however, true. This should fix the `check-targets` CI job.
* | | | | Merge branch 'fs-watcher-poll' into 'main'gabi-2502024-10-175-4/+56
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-config: Use a polling watcher on non-windows platforms that don't have inotify. Closes #1644 See merge request tpo/core/arti!2547
| * | | | | arti: Add a warning about watch_configuration's performance issues.Gabriela Moldovan2024-10-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Part of #1644
| * | | | | tor-config: Document the limitations of the FileWatcher.Gabriela Moldovan2024-10-162-0/+11
| | | | | |
| * | | | | arti: Enable tor-config/testing when testing.Gabriela Moldovan2024-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables us to make use of the unfortunately-necessary test-specific code path.
| * | | | | tor-config: Compare the file contents when testing.Gabriela Moldovan2024-10-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When testing, compare the contents of the files too, not just their mtime Otherwise, because the polling backend detects changes based on mtime, if the test creates/writes files too fast, it will fail to notice changes (this can happen, for example, on a tmpfs).
| * | | | | tor-config: Configure the polling interval.Gabriela Moldovan2024-10-161-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default is 30s, which feels a bit too long. Also, when testing, we use a much shorter interval. This is meant to be a temporary solution, so we hard-code the interval rather than make it configurable.
| * | | | | tor-config: Use a polling watcher on non-windows platforms that don't have ↵Gabriela Moldovan2024-10-162-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | inotify. On windows and platforms that support inotify (i.e. linux and android), we continue using the recommended watcher. On platforms that use kqueue, we switch to a polling watcher to work around a [notify bug] that manifests when using a non-recursive watcher to watch a directory. This commit is best reviewed with `git diff --ignore-all-space`. Closes #1644 [notify bug]: https://github.com/notify-rs/notify/issues/644
| * | | | | tor-config: Add a type alias for the underlying watcher (fmt).Gabriela Moldovan2024-10-161-2/+2
| | | | | |
| * | | | | tor-config: Add a type alias for the underlying watcher.Gabriela Moldovan2024-10-161-3/+6
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | This type will soon become platform-dependent, so I am preemptively adding a type alias.
* | | | | Merge branch 'general_socketaddr_ops' into 'main'Nick Mathewson2024-10-176-2/+518
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | general::SocketAddr: Specify and implement string representations. Closes #1681 See merge request tpo/core/arti!2519
| * | | | | rtcompat: Add a fuzzer for round-trip general::SocketAddr parsing.Nick Mathewson2024-10-164-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | (This turned up another place where we need documentation.)
| * | | | | rtcompat: Add a fuzzer for general::SocketAddr parsingNick Mathewson2024-10-163-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fuzzer makes sure that whatever we can parse, we can format into an object that is parsed in the same way.
| * | | | | general::SocketAddr: Format the unnamed address as "unix:"Nick Mathewson2024-10-161-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This matches our parsing, and our general rule that our parser defers to SocketAddr::from_pathname.
| * | | | | Add reverse-enginered description of Rust socketaddr formats.Nick Mathewson2024-10-161-0/+32
| | | | | |
| * | | | | general::SocketAddr: Add unit testsNick Mathewson2024-10-162-38/+70
| | | | | |
| * | | | | general::SocketAddr: Implement PartialEq.Nick Mathewson2024-10-161-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | Needed for tests.
| * | | | | general::SocketAddr: Specify and implement string representations.Nick Mathewson2024-10-161-1/+285
| | |_|/ / | |/| | | | | | | | | | | | | Closes #1681.
* | | | | Merge branch 'fix-arti-relay-deps' into 'main'opara2024-10-164-50/+1
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | arti: remove 'relay' subcommand and 'arti-relay' dependency See merge request tpo/core/arti!2542
| * | | | arti: remove 'relay' subcommand and 'arti-relay' depSteven Engler2024-10-154-50/+1
| |/ / /
* | | | Merge branch 'mq-feat-1' into 'main'Jim Newsome2024-10-1615-33/+54
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | memquota features, preparation See merge request tpo/core/arti!2545
| * | | | Rename "memquota" feature to "memquota-memcost" when it's just HasMemoryCost ↵Ian Jackson2024-10-164-5/+25
| | | | | | | | | | | | | | | | | | | | (fmt)
| * | | | Rename "memquota" feature to "memquota-memcost" when it's just HasMemoryCostIan Jackson2024-10-1611-26/+26
| | | | | | | | | | | | | | | | | | | | It's not documented anywhere ATM. I will do that in a followup MR.
| * | | | Apply `default-features = false` to all tor-memquota depsIan Jackson2024-10-167-7/+8
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | This will allow us to make `tor-memquota/memquota` enabled by default, without forcing it to be compiled in everywhere. I don't change that in this MR, though.
* | | | Merge branch 'rpc_verb_methods' into 'main'David Goulet2024-10-161-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | rpc spec: Start to document method naming convention Closes #1678 See merge request tpo/core/arti!2539
| * | | RPC: Rename "arti:isolated_client" to "arti:new_isolated_client".Nick Mathewson2024-10-091-1/+1
| | | | | | | | | | | | | | | | Closes #1678.
* | | | Update to pwd-grp 1.xIan Jackson2024-10-151-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | Should fix the build on NetBSD, see rust-pwd-grp#4. Also, eliminates the last use of derive-adhoc, the old name for derive-deftly.
* | | Merge branch 'mq-prevent' into 'main'Ian Jackson2024-10-1515-15/+64
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Use clippy to prevent non-mq use of mpsc::channel Closes #1659 See merge request tpo/core/arti!2536
| * | Use mpsc_channel_no_memquota next to a TODOIan Jackson2024-10-151-3/+2
| | | | | | | | | | | | We have a ticket for this. But the ticket number was wrong, so fix that.
| * | Use mpsc_channel_no_memquota in the RPC system (adding a TODO)Ian Jackson2024-10-151-2/+5
| | | | | | | | | | | | | | | We need to decide whether RPC will participate in memquota. Perhaps it should. But that's for the future.
| * | tor-rtmock: Provide and use an mpsc::channel wrapper in tor-rtmockIan Jackson2024-10-153-3/+17
| | |
| * | Introduce mpsc_channel_no_memquota and use it in the places it's wanted (fmt)Ian Jackson2024-10-151-1/+2
| | |
| * | Introduce mpsc_channel_no_memquota and use it in the places it's wantedIan Jackson2024-10-1510-7/+39
| | | | | | | | | | | | | | | These are the call sites where using this fucntion is correct. (Outside tor-rtmock, which we'll do separately.)
* | | Merge branch 'test-panic' into 'main'Jim Newsome2024-10-155-18/+18
|\ \ \ | | | | | | | | | | | | | | | | Abolish `_ => panic!()` See merge request tpo/core/arti!2534
| * | | Replace _ => panic!() elsewhereIan Jackson2024-10-154-4/+4
| | | |
| * | | Replace _ => panic!() in tor-protoIan Jackson2024-10-151-14/+14
| |/ /
* | | Merge branch 'mq-toplevel' into 'main'Ian Jackson2024-10-1513-23/+46
|\ \ \ | | | | | | | | | | | | | | | | Abolish the toplevel Account See merge request tpo/core/arti!2537
| * | | memquota: Change ToplevelAccount to be an alias for Arc<MemoryQuotaTracker>Ian Jackson2024-10-1512-22/+31
| | | | | | | | | | | | | | | | Fixes a TODO.
| * | | memquota: Provide a method Arc::<MemoryQuotaTracker>::new_noop()Ian Jackson2024-10-151-1/+15
| |/ / | | | | | | | | | | | | | | | | | | We'll need this to allow `ToplevelAccount::new_noop` (eg, in tests) when the type of ToplevelAccount changes. We have to do this via an extension trait.
* | | Merge branch 'relaysign-specifier' into 'main'David Goulet2024-10-151-0/+3
|\ \ \ | | | | | | | | | | | | | | | | tor-relay-crypto: Temporarily comment out RelaySigningKeySpecifier. See merge request tpo/core/arti!2527
| * | | tor-relay-crypto: Temporarily comment out RelaySigningKeySpecifier.Gabriela Moldovan2024-10-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `RelaySigningKeySpecifier` is currently defined as: ```rust #[non_exhaustive] #[derive(Deftly, PartialEq, Debug, Constructor)] #[derive_deftly(KeySpecifier)] #[deftly(prefix = "relay")] #[deftly(role = "KP_relaysign_ed")] #[deftly(summary = "Relay medium-term signing keypair")] /// The key sepcifier of the relay medium-term signing key (RelaySigningKeypair) pub struct RelaySigningKeySpecifier; ``` This means there can only be a single `relaysign_ed` key with an `ArtiPath` of the form `relay/KP_relaysign_ed`. This is a problem, because relays storing their identity key offline will want to generate a number of `relaysign_ed` keys ahead of time, so we need the keystores to be able to contain multiple such keys. We will need their `ArtiPath` to encode a variable component (for example, a timestamp). We also need to teach `KeyMgr` to retrieve such keys (`KeyMgr::get` should return the first key that has a valid and timely certificate). This will involve extending the `KeySpecifier` trait with a function for obtaining the `KeySpecifier` of the certificate of the key, if there is one. For now, let's comment it out and rethink its `ArtiPath` as part of #1692.
* | | | Merge branch 'mq-todo' into 'main'gabi-2502024-10-151-4/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | memquota: Document the actual behaviour re streams/circuits See merge request tpo/core/arti!2531
| * | | | memquota: Document the actual behaviour re streams/circuitsIan Jackson2024-10-151-4/+6
| | |/ / | |/| | | | | | | | | | As per decision in #1661.
* | | | Merge branch 'bump-secmemproc' into 'main'Nick Mathewson2024-10-151-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti: Bump secmem-proc to fix the build errors on FreeBSD. Closes #1686 See merge request tpo/core/arti!2533
| * | | | arti: Bump secmem-proc to fix the build errors on FreeBSD.Gabriela Moldovan2024-10-151-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FreeBSD fixes were released in [`secmem-proc 0.3.4`]. Closes #1686 [`secmem-proc 0.3.4`]: https://github.com/niluxv/secmem-proc/pull/11
* | | | tor-keymgr: Reformat a long line for readability.Gabriela Moldovan2024-10-151-1/+3
| | | | | | | | | | | | | | | | This breaks up a long statement to improve readability.
* | | | tor-keymgr: Add missing docs for keypair_specifier.Gabriela Moldovan2024-10-151-0/+12
|/ / / | | | | | | | | | | | | This is a follow-up to !2393, which added support for the `key_specifier` top-level attribute.
* | | Merge branch 'hs-client-pow' into 'main'Ian Jackson2024-10-1543-239/+1084
|\ \ \ | |/ / |/| | | | | | | | Proof-of-work client See merge request tpo/core/arti!2486
| * | arti: Make hs-pow a experimental feature.Wesley Aptekar-Cassels2024-10-092-3/+2
| | |