summaryrefslogtreecommitdiff
path: root/crates/arti
Commit message (Collapse)AuthorAgeFilesLines
...
* | arti cfg tests: strip_prefix: Leave section markers unchangedIan Jackson2024-09-041-1/+6
| |
* | arti cfg tests: strip_prefix: Document error behaviourIan Jackson2024-09-041-1/+3
| |
* | Look for memquota configuration in the TorClient configurationIan Jackson2024-09-042-1/+39
| | | | | | | | Tests are not entirely trivial and will come in a moment.
* | Add memquota cargo features to arti and arti-clientIan Jackson2024-09-041-0/+2
| | | | | | | | | | | | * In arti, memquota simply turns on in memquota arti-client * In arti-client, add an (unconditional) dependency on tor-memquota, and have the memquota feature turn on the feature in tor-memquota.
* | arti/Cargo.toml: Sort the experimental features listIan Jackson2024-09-041-3/+3
| |
* | Bump arti crate to 1.2.7Gabriela Moldovan2024-09-031-1/+1
| | | | | | | | | | | | | | | | Done using: ``` cargo set-version --bump patch -p arti ```
* | Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-13/+13
| | | | | | | | | | | | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```
* | Fix formatting issues introduced by fixup-features.Gabriela Moldovan2024-09-031-2/+11
| |
* | arti: Remove the XXXXs added by fixup-features.Gabriela Moldovan2024-09-031-1/+0
| | | | | | | | The `restricted-discovery` feature is reachable from `experimental`.
* | Run fixup-features in preparation for release.Gabriela Moldovan2024-09-031-2/+4
| |
* | Fix typosDimitris Apostolou2024-09-032-2/+2
|/
* arti: Set the COLUMNS env var in the CLI tests.Gabriela Moldovan2024-08-283-11/+14
| | | | | | | | This sets `COLUMNS` to a large value to prevent line wrapping. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2370#note_3067346 Closes #1574
* arti: Elide some text in the expected hsc test output.Gabriela Moldovan2024-08-281-2/+1
| | | | | | These file paths occupy more than 2 lines on some platforms. See also the motivation behind 2b8a7a196b3ea5cd8350dd77f5e5120fed8521e0
* arti: Implement the hsc subcommand using an inert tor client.Gabriela Moldovan2024-08-283-8/+4
| | | | | | | | | This allows us to reenable the `arti hsc` tests, which were previously disabled due to flakiness (see #1496). The `help` test bit rotted a bit, so I had to tweak its expected output. Closes #1496
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-281-2/+2
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* Merge branch 'expose-proxy-setting' into 'main'Nick Mathewson2024-08-286-13/+308
|\ | | | | | | | | | | | | RPC: Add experimental method to list SOCKS proxy addresses. Closes #1523 See merge request tpo/core/arti!2359
| * rpc: Use MockRuntime for set_proxy_info test.Nick Mathewson2024-08-282-2/+3
| |
| * rpc: Add a test for setting proxy info.Nick Mathewson2024-08-282-0/+43
| |
| * rpc: Rename E::SenderDroppedNick Mathewson2024-08-281-5/+6
| |
| * rpc: Try another incantation for watching for ProxyInfo.Nick Mathewson2024-08-281-13/+7
| |
| * rpc: Add another layer of indirection on proxyinfoNick Mathewson2024-08-282-3/+12
| |
| * rpc: Try using postage::watch to initialize ProxyInfo.Nick Mathewson2024-08-286-35/+82
| | | | | | | | | | (This is a bit trickier than I would like, but it ensures that we never return a "not initialized yet" code.)
| * Re-wrap a Cargo.toml.Nick Mathewson2024-08-281-1/+5
| |
| * RPC: Add experimental method to list SOCKS proxies.Nick Mathewson2024-08-285-16/+135
| | | | | | | | | | | | | | We'll need this for our rpc-library code to meaningfully open SOCKS connections. Closes #1523.
| * arti: Define a new ArtiRpcSession type.Nick Mathewson2024-08-284-4/+81
| | | | | | | | | | | | | | This type exists in the `arti` crate. It wraps and delegates to `arti_rpcserver::RpcSession`. Subsequent commits will use it to expose information from the `arti` crate to the RPC system; right now it does nothing.
* | tor-config: Rename watch_file to watch_path.Gabriela Moldovan2024-08-271-1/+1
|/ | | | `FileWatcher::watch_file` can be used with arbitrary paths.
* Merge branch 'ci' into 'main'Ian Jackson2024-08-272-1/+5
|\ | | | | | | | | Run tests of every crate, with all features disabled See merge request tpo/core/arti!2350
| * Add script for *testing* without any features enabledIan Jackson2024-08-191-0/+3
| | | | | | | | | | | | | | | | | | We can't do this for every crate. I looked at what is now matrix-check to see if I wanted to use any of the code. But it seems too entangled with its particular purpose, and has a lot of embedded knowledge of our crates' features. I found it sufficiently far from what I wanted that I decided on a fresh script.
| * arti: Fix an unused Result in tests if pts disabledIan Jackson2024-08-191-1/+2
| | | | | | | | | | Fixes compilation with cargo test --no-default-features -p arti --features=tokio,rustls
* | arti: Temporarily disable a flaky test.Gabriela Moldovan2024-08-221-0/+1
| | | | | | | | Disabling until #1549 is fixed to unblock CI.
* | arti: Use a postage::watch channel in the tests.Gabriela Moldovan2024-08-222-15/+24
| | | | | | | | | | | | | | | | The watch channel should help prevent flakiness in the tests (`TestModule` uses `maybe_send` to only send the received config if it's different from the previously received value. This is supposed to prevent the tests from failing when duplicate update events are received).
* | arti: Add test for config reloading.Gabriela Moldovan2024-08-212-0/+175
| |
* | arti: Wrap long lines not handled by rustfmt.Gabriela Moldovan2024-08-211-2/+14
| |
* | tor-hsservice: Pass watch_configuration down to restricted discovery config.Gabriela Moldovan2024-08-211-7/+23
| | | | | | | | | | | | We need to know if `watch_configuration` is set in the descriptor publisher reactor to know whether we should be watching the `restricted_discovery.key_dirs` directories.
* | tor-config: Support watching dirs for files with a given extension.Gabriela Moldovan2024-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes a couple of issues with the previous implementation: * it enables you to watch for more than just one file/extension per directory (each directory now has a list of filters. If any of the filters apply to the path contained in the notify::Event, the `FilterWatcher` notifies the listeners * it removes the list watched files from `FileWatcher`. This makes things a lot simpler to grok: essentially, the file watcher only ever watches directories, notifying if an "interesting" file was changed (in our case, the interesting files are files that have a relevant extension, such as `.auth`, or specific configuration files, as specified by `ConfigurationSources`).
* | tor-config: Make FileWatcher use an opaque channel type.Gabriela Moldovan2024-08-211-89/+106
| | | | | | | | The `FileWatcher` now uses a `postage::watch` channel under the hood.
* | tor-config: Give FileWatcherBuilder a handle to the runtime.Gabriela Moldovan2024-08-211-5/+6
| | | | | | | | | | The event handler will soon be made async, so we need a handle to the runtime.
* | tor-config: Move FileWatcher to tor-config.Gabriela Moldovan2024-08-211-185/+22
| | | | | | | | | | | | | | | | | | For the most part, this is just code motion. The only change here is that `prepare` is no longer a method on `FileWatcher`. This decouples `FileWatcher` from `ConfigurationSources`, enabling us to use it to watch files and directories that aren't configuration.
* | arti: Update outdated FileWatcher docs.Gabriela Moldovan2024-08-211-5/+1
|/ | | | | The `FileWatcher` doesn't contain the channel for receiving events anymore, and `FileWatcher::event_matched` was removed at some point.
* Merge branch '1144-std-backtrace' into 'main'David Goulet2024-08-122-6/+3
|\ | | | | | | | | | | | | Use std::backtrace instead of backtrace crate Closes #1144 See merge request tpo/core/arti!2301
| * Match previous backtrace formattingRobin Leander Schröder2024-08-081-2/+2
| | | | | | | | | | std::backtrace::Backtrace's Display looks the same as backtrace_rs::Backtrace's Debug
| * Use std::backtrace instead of backtrace crateRobin Leander Schröder2024-08-012-4/+1
| | | | | | | | | | Removes resolve_backtraces from rtmock since it is no longer needed as stdlib's backtraces automatically lazily resolve without needing a &mut.
* | Merge branch 'docsrs' into 'main'Jim Newsome2024-08-071-1/+0
|\ \ | | | | | | | | | | | | | | | | | | Don't need to tell docs.rs to enable `docsrs` cfg. It does it automatically as of https://github.com/rust-lang/docs.rs/pull/2390#event-11664409098 While this change isn't in our MSRV yet, we were only using this when building for docs.rs, where we use the latest anyway. See merge request tpo/core/arti!2308
| * | Don't need to tell docs.rs to enable `docsrs` cfgKunal Mehta2024-08-021-1/+0
| | | | | | | | | | | | | | | It now does it automatically, see <https://docs.rs/about/builds#detecting-docsrs>.
* | | arti: Add the restricted_discovery configuration to the example config.Gabriela Moldovan2024-08-052-9/+94
| | | | | | | | | | | | This also adds a test for it.
* | | tor-hsservice: Add restricted discovery configuration.Gabriela Moldovan2024-08-051-1/+1
| | |
* | | arti: Avoid using the now-deprecated arti_client constant.Gabriela Moldovan2024-08-051-2/+2
| | | | | | | | | | | | We can just used `build_for_arti()` here.
* | | tor-hsservice: Add a restricted-discovery feature.Gabriela Moldovan2024-08-051-1/+2
| | | | | | | | | | | | | | | | | | | | | Restricted discovery mode is initially going to be gated behind the experimental `restricted-discovery` feature. Part of #1292
* | | doc: Add arti hsc subcommand docs to doc/hsc.md.Gabriela Moldovan2024-08-051-28/+1
| | | | | | | | | | | | | | | This also makes the `tests/testcases/hsc/hsc.md` test case a symlink to `doc/hsc.md`.
* | | arti: Update the hsc markdown test.Gabriela Moldovan2024-08-051-3/+19
| | | | | | | | | | | | | | | | | | | | | This adds a bit more information to `hsc.md`. Note: `hsc.md` is currently just a test case for the CLI tests. A future commit promote it to module-level README.