summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Errors: sort out markdown formattingIan Jackson2022-01-201-16/+30
| | | | | |
| * | | | | Errors: c&p raw text of consensus conclusions from pad to gitIan Jackson2022-01-201-0/+203
| | | | | |
* | | | | | Merge branch 'ticket255' into 'main'eta2022-01-2410-46/+339
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor our Runtime implementations to allow replacement parts Closes #255 See merge request tpo/core/arti!251
| * | | | | | Refactor Runtimes to use separate TLS implementations internally.Nick Mathewson2022-01-199-46/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make it easier to implement them using some other TLS provider as well, without having to duplicate all of our code.
| * | | | | | Add a macro to help with opaque Runtime wrappers.Nick Mathewson2022-01-192-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're soon going to have our different Runtime types be built as CompoundRuntime instances. We don't want to expose that detail, though, so we'll use this macro to make them implement the right traits.
| * | | | | | Add a CompoundRuntime type for runtime construction.Nick Mathewson2022-01-192-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This type can solve two problems at once. First, it lets users replace parts of an existing runtime implementation without replacing the whole thing. For example, you can use it to override your TcpProvider implementation to solve problems like #235. Second, we can use it internally to tor-rtcompat to define Runtimes piece-by-piece. Mostly we'll use this to separate our Tls implementations from our implementations of the rest of the Runtime.
* | | | | | | Merge branch 'conn-prefs-rename' into 'main'Ian Jackson2022-01-215-21/+21
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | StreamPrefs: rename from ConnectPrefs See merge request tpo/core/arti!256
| * | | | | | Rename TorClient::set_stream_prefsIan Jackson2022-01-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In line with the rest of the renaming. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/256#note_2771617
| * | | | | | StreamPrefs: Re-alphabetise imports following renameIan Jackson2022-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Placates rustfmt
| * | | | | | StreamPrefs: rename from ConnectPrefsIan Jackson2022-01-215-20/+20
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The docs even say this is about stream. As @nickm writes in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771289 we generally call end-to-end connections that are tunneled over Tor "Streams" to distinguish them from everything else in the Tor protocols that could possibly be called a "Connection". That seems to apply here too.
* | | | | | Merge branch 'always-isolate' into 'main'Ian Jackson2022-01-201-4/+58
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide isolate-all-streams function Closes #279 See merge request tpo/core/arti!252
| * | | | | isolation: Rename isolate_every_stream from ..._connectionIan Jackson2022-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771291
| * | | | | isolation: Rename (internal) EveryStream enum variantIan Jackson2022-01-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/252#note_2771289
| * | | | | isolation: Much better wording for always isolate settingNick Mathewson2022-01-201-1/+6
| | | | | |
| * | | | | isolation: Provide isolate-every-connection optionIan Jackson2022-01-201-0/+16
| | | | | |
| * | | | | isolation: Provide new_isolation_group methodIan Jackson2022-01-201-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the usual case, set_isolation_group is awkward. This is perhaps slightly duplicative with TorClient::isolated_client(). If so then perhaps the *latter* should be abolished.
| * | | | | isolation: Refactor to introduce a bespoke enumIan Jackson2022-01-201-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional change. This will grow a new variant shortly.
* | | | | | Merge branch 'docs-build' into 'main'Nick Mathewson2022-01-201-0/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONTRIBUTING: Document how to build the docs See merge request tpo/core/arti!255
| * | | | | | CONTRIBUTING: Document how to build the docsIan Jackson2022-01-201-0/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | Eventually we may need a separate HACKING.md
* | | | | | Merge branch 'pathconfig_fixing' into 'main'Nick Mathewson2022-01-202-3/+34
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor, fix, test PathConfig type See merge request tpo/core/arti!254
| * | | | | | Test for PathConfig::at_least_as_permissive_as().Nick Mathewson2022-01-201-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is totally not just an exercise to get combined test coverage for tor-circmgr over 90% because I needed something to do that wouldn't distract anybody else. :)
| * | | | | | Rename PathConfig::more_permissive_than()Nick Mathewson2022-01-202-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since it implements a "<=" type relationship, it should be called "at_least_as_permissive_as()." Since it's a crate-private function, the long name isn't too bad.
| * | | | | | Remove "self" arg from PathConfig::builder()Nick Mathewson2022-01-201-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | This was added by mistake.
* | | | | | Merge branch 'stuff-prefs' into 'main'Nick Mathewson2022-01-202-21/+62
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide TorClient::set_default_prefs and clone_with_prefs Closes #290 See merge request tpo/core/arti!250
| * | | | | | connection preferences: Make `set_default_prefs` private for nowIan Jackson2022-01-201-1/+4
| | | | | | |
| * | | | | | connection preferences: Make `clone_with_prefs` must_useIan Jackson2022-01-201-0/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/250#note_2771239
| * | | | | connection preferences: Provide `clone_with_prefs` methodIan Jackson2022-01-191-0/+10
| | | | | |
| * | | | | connection preferences: Provide `set_connect_prefs` methodIan Jackson2022-01-191-6/+22
| | | | | |
| * | | | | connection preferences: Take ConnectPrefs by referenceIan Jackson2022-01-192-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This may save quite a bit of copying. The callees don't need to copy the whole struct; they copy the bits they need.
| * | | | | connection preferences: Rename variable and docs to not say "flags"Ian Jackson2022-01-191-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | These aren't flags. Eg, there's an isolation token in there.
| * | | | | isolation: Document orthogonality of isolated_client and isolation_groupIan Jackson2022-01-191-0/+11
| | | | | |
* | | | | | Merge branch 'coverage_toolchain' into 'main'eta2022-01-201-6/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | with_coverage: Allow toolchain selection. See merge request tpo/core/arti!253
| * | | | | | with_coverage: Allow toolchain selection.Nick Mathewson2022-01-201-6/+7
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's some kind of bug in nightly that (for me) keeps grcov from generating correct results. Instead, it misses some crates entirely. No trouble, though: I can just use an older nightly until they get this issue fixed! This patch makes using a different version of nightly possible with a new RUST_COVERAGE_TOOLCHAIN environment variable.
* | | | | | Merge branch 'msrv' into 'main'eta2022-01-201-5/+10
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adopt an initial MSRV policy. Closes #283 See merge request tpo/core/arti!247
| * | | | | Adopt an initial MSRV policy.Nick Mathewson2022-01-191-5/+10
| | |/ / / | |/| | | | | | | | | | | | | Closes #283.
* | | | | clippy: Rename a `decode_chanmsg` from `handle_`Ian Jackson2022-01-192-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/249#note_2771025 It doens't really handle it.
* | | | | handshake: Use read_exact, not read and checking lenIan Jackson2022-01-191-3/+7
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_exact has a loop in it, which we need. This means we end up separating the two sites that generate the "not a relay" error, so we need to fish out the error construction. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/249#note_2771023
* | | | clippy: Rename a `from_foo` method that doesn't do conversionIan Jackson2022-01-193-5/+7
| | | |
* | | | Fix two bugs related to incomplete read/writeIan Jackson2022-01-191-3/+3
| | | | | | | | | | | | | | | | Discovered by clippy
* | | | clippy: Suppress a warningIan Jackson2022-01-191-0/+3
|/ / /
* | | Merge branch 'bootstrap_reporting'Nick Mathewson2022-01-1912-54/+1218
|\ \ \
| * | | bootstrap reporting: Documentation fixups from review.Nick Mathewson2022-01-192-2/+14
| | | |
| * | | Integrate status information at arti-clientNick Mathewson2022-01-182-40/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit combines status update information from tor-dirmgr and tor-chanmgr in the arti-client crate, so that the user can get to it; it represents a high-level view of the client's ability to reach the network and route traffic. I have omitted the tor-circmgr support for now; it's mostly not needed. At present it's not so useful, since there's no way for a client to get a TorClient that _isn't_ completely bootstrapped, and therefore there's no way to actually watch these events until they're no longer interesting. That should change with arti#293. This is part of #96.
| * | | tor-chanmgr: Add bootstrap/status reporting.Nick Mathewson2022-01-185-5/+526
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The information is pretty basic here: we use "have we been able to connect/TLS-handshake/Tor-handshake" as a proxy for "are we on the internet? Are we on a reasonably unfiltered part of the internet?" Eventually we'll want to make the information gathered and exported more detailed: I've noted a few places in the code. For now, however, this is about as good as C Tor does today, and it should be a good starting point. This uses a slightly different design from tor-dirmgr. Instead of exporting an entire state structure via `postage::watch`, it exports only the parts of that structure which the user is supposed to read. I think that's more reasonable in this case because most of the possible internal transitions in the tor-chanmgr state don't cause a change in the exposed status.
| * | | tor-dirmgr: Create a bootstrap-status exporting mechanism.Nick Mathewson2022-01-186-9/+598
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface is similar to the one exposed by `arti-client`: it internally uses postage::watch to give a series of events showing when a bootstrap status is changing. Thanks to the existing state/driver separation in the DirMgr design we don't need much new logic: each download state needs to expose (internally) how far along it is in its download, which the bootstrap code passes to the DirMgr if it has changed. I believe that in the long run, we'll probably want to expose more (or different) information here, and we'll want to process it differently. With that in mind, I've made the API for `DirBootstrapStatus` deliberately narrow, so that we can change its of its internal later on without breaking code that depends on it. (The information exposed by this commit is not yet summarized in `arti-client`.) Part of #96.
* | | | Merge branch 'eta/292-2' into 'main'eta2022-01-191-20/+95
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | arti-bench: add concurrency, write benchmark results out to JSON See merge request tpo/core/arti!243
| * | | | arti-bench: add concurrency, write benchmark results out to JSONeta2022-01-181-20/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now conduct benchmark tests with multiple concurrent streams (by default; this is configurable by passing `-p` to `arti-bench`). Currently, these results just get "flattened" for the purposes of statistical analysis (as in, results_raw contains the results of each connection's timing summary, across all benchmark runs). This might be something we wish to change in future. The stats summary now also records "best" and "worst" values for each metric, to give a rough idea of the range of values encountered. Additionally, we now support writing the benchmark results out to a JSON file. A future commit may integrate this with CI, so that we have benchmark results for every commit as a build artefact. (some documentation was also fixed) part of arti#292
* | | | | maint/changed_crates.sh: Add a missing space.Nick Mathewson2022-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | found by shellcheck.
* | | | | Merge branch 'coverage_script'Nick Mathewson2022-01-191-2/+99
|\ \ \ \ \
| * | | | | coverage.sh: Treat no-tests-selected as an error.Nick Mathewson2022-01-191-3/+2
| | | | | |