summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Upgrade to digest v0.10.0Nick Mathewson2021-12-0713-83/+100
|/ / | | | | | | | | We generally try to track the latest rust-crypto traits when we can: fortunately, this upgrade didn't break much, considering.
* | Merge branch 'dns_config_cleanups' into 'main'eta2021-12-074-33/+38
|\ \ | | | | | | | | | | | | Small cleanups to stream timeout configurations See merge request tpo/core/arti!179
| * | Make ClientTimeoutConfig members crate-private.Nick Mathewson2021-12-071-3/+3
| | | | | | | | | | | | We shouldn't have pub members in these config objects.
| * | Rename timeout_rules to stream_timeouts.Nick Mathewson2021-12-074-31/+36
|/ / | | | | | | | | | | | | (There are other timeout rules, after all.) Also, rename stream_timeout to connect_timeout, to make it more clear when it applies.
* | Merge branch 'revised_preemptive_config' into 'main'eta2021-12-075-76/+99
|\ \ | | | | | | | | | | | | Usability: renaming and documentation in preemptive circuit config See merge request tpo/core/arti!176
| * | Clarify names and docs for predictive circuits.Nick Mathewson2021-12-074-33/+56
| | | | | | | | | | | | | | | Also, use humantime_serde, rather than a number of seconds, to indicate configuration time.
| * | Rename circuits_preemptive to preemptive_circuitsNick Mathewson2021-12-075-46/+46
| | | | | | | | | | | | | | | | | | This obeys a few conventions: * adjective before noun * config objects end with "config"
* | | Merge branch 'tlsconnector-wrapping' into 'main'eta2021-12-0710-76/+108
|\ \ \ | | | | | | | | | | | | | | | | Make TlsConnector wrap TCP connections, not create its own See merge request tpo/core/arti!166
| * | | Make TlsConnector wrap TCP connections, not create its owneta2021-12-0710-76/+108
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `tor-rtcompat`'s `TlsConnector` trait previously included a method to create a TLS-over-TCP connection, which implied creating a TCP stream inside that method. This commit changes that, and makes the function wrap a TCP stream, as returned from the runtime's `TcpProvider` trait implementation, instead. This means you can actually override `TcpProvider` and have it apply to *all* connections Arti makes, which is useful for issues like arti#235 and other cases where you want to have a custom TCP stream implementation. This required updating the mock TCP/TLS types in `tor-rtmock` slightly; due to the change in API, we now store whether a `LocalStream` should actually be a TLS stream inside the stream itself, and check this property on reads/writes in order to detect misuse. The fake TLS wrapper checks this property and removes it in order to "wrap" the stream, making reads and writes work again.
* | | Merge branch 'bug252' into 'main'eta2021-12-076-15/+124
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Make DNS fields in arti-client/src/client.rs configurable Closes #252 See merge request tpo/core/arti!171
| * | | Rename ClientDNSConfig -> ClientTimeoutConfigNeel Chauhan2021-12-074-37/+43
| | | |
| * | | Improve ClientDNSConfig field commentsNeel Chauhan2021-12-031-3/+5
| | | |
| * | | Make DNS fields in arti-client/src/client.rs configurableNeel Chauhan2021-12-036-15/+116
| | | |
* | | | Merge branch 'real_chutney_v2' into 'main'eta2021-12-072-10/+37
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | Detect and use CHUTNEY_PATH in test scripts. See merge request tpo/core/arti!168
| * | | chutney: Make $target relative to ${CHUTNEY_PATH}Nick Mathewson2021-12-052-6/+11
| | | | | | | | | | | | | | | | This is per a suggestion from @trinity-1686a.
| * | | When tearing down test net, always tear down test net :)Nick Mathewson2021-12-021-1/+3
| | | | | | | | | | | | | | | | | | | | Previously, if the arti process had died or been killed, we wouldn't reach the point where we called "chutney stop".
| * | | Detect and use CHUTNEY_PATH in test scripts.Nick Mathewson2021-12-022-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user has CHUTNEY_PATH set, respect that value, rather than cloning a local chutney. Also, if we have a local chutney, then update it in case there have been changes.
* | | | Remove some XXXs about zeroizing from tor-proto.Nick Mathewson2021-12-071-2/+0
| | | | | | | | | | | | | | | | There is now a ticket about this issue in general, at arti#254.
* | | | Merge branch 'bug183a_redux' into 'main'eta2021-12-074-21/+114
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squash, refactor, and test !139 (Don't use same family as exit when picking a guard) Closes #183 See merge request tpo/core/arti!173
| * | | | Tests for new family-related functions.Nick Mathewson2021-12-062-0/+58
| | | | |
| * | | | Move the "real families" code into tor-netdir.Nick Mathewson2021-12-062-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just as `in_same_family` is a member of Relay, so the function for getting all the real family members of a relay should belong in the same crate. This change also removes the `family()` accessor: it gives the _claimed_ family rather than the _acknlowedged_ family, and is therefore a bit dangerous. There's still a hole in this logic; I've noted it in the Limitations section. If we get a microdescriptor for a relay in between creating and using the guard restriction, it might be omitted from the family list.
| * | | | Use hashset _inside_ GuardRestriction.Nick Mathewson2021-12-063-7/+8
| | | | | | | | | | | | | | | | | | | | This approach saves us from a linear search when picking guards.
| * | | | Change GuardUsage to have Vec of restrictions.Nick Mathewson2021-12-063-37/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's not much reason to use a HashSet here, since we're just going over the whole list. This reverts commit 16e8489abbea1581b8e2 and does a little more refactoring.
| * | | | Implement guard family restriction codeNeel Chauhan2021-12-064-13/+45
| | | | |
* | | | | Merge branch 'safe_mul_dur_f64' into 'main'eta2021-12-074-8/+67
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Use a panic-free function to multiply timeouts. See merge request tpo/core/arti!175
| * | | | | Use a panic-free function to multiply timeouts.Nick Mathewson2021-12-064-8/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we used Duration::mul_f64, which panics if its output is out-of-range. That shouldn't actually be possible for the values we're giving it, but probably it's better to just multiply in a safe way. This resolves a couple of XXXXs and therefore relates to #231.
* | | | | | Merge branch 'preemptive-config' into 'main'eta2021-12-0710-41/+226
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow configurability on preemptive circuits Closes #245 See merge request tpo/core/arti!164
| * | | | | Allow configurability on preemptive circuitsNeel Chauhan2021-12-0710-41/+226
| | |_|/ / | |/| | |
* | | | | tor-netdir: Use reproducible RNG in tests.Nick Mathewson2021-12-063-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rand crate's documentation says it's not okay to rely on StdRng having reproducible output. So instead, let's switch to ChaCha12Rng instead (which is what StrRng currently uses).
* | | | | Resolve roughly half of the XXXXs.Nick Mathewson2021-12-0627-62/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to only use TODO in the codebase for non-blockers, and open tickets for anything that is a bigger blocker than a TODO. These XXXXs seem like definite non-blockers to me. Part of arti#231.
* | | | | Start a TROUBLESHOOTING.md with known compilation issues.Nick Mathewson2021-12-061-0/+26
| |/ / / |/| | |
* | | | tor-linkspec: Remove redundant method; add more tests.Nick Mathewson2021-12-044-13/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The redundant method was a `to_owned` that probably shouldn't have been called that. It was only used in one place. The tests should get tor-linkspec's line coverage up above 90%.
* | | | Remove the unused "Error" type from caret.Nick Mathewson2021-12-042-24/+3
|/ / / | | | | | | | | | | | | | | | | | | This was a relic of the old, now-unused "caret_enum!" macro. Removing it gets caret's coverage to 100%. Yes, technically this is a semver breaker on caret.
* | | Idle hacking: Get 90% coverage in tor-llcryptoNick Mathewson2021-12-021-0/+112
| | | | | | | | | | | | | | | | | | | | | For this one I just wrote some "are things completely broken" tests for the rand_compat wrappers. These won't detect subtle biases in the RNGs! They'll only let you know if the wrappers have screwed up in some way that always sets a given bit to 1 or 0.
* | | Idle hacking to get 90% coverage in arti-configNick Mathewson2021-12-021-0/+18
| | | | | | | | | | | | | | | This is just a matter of writing a few tests for some very easy functions.
* | | Idle hacking to get tor-socksproto line coverage over 90%Nick Mathewson2021-12-021-1/+1
| | | | | | | | | | | | This was just a matter of adding a call to one function.
* | | Python does not have quadruple-quote.Nick Mathewson2021-12-021-1/+1
| | | | | | | | | | | | | | | Fix a bug in postprocess_coverage.py that stuck a big row of ' characters in its output.
* | | Get tor-units grcov line coverage to 100%Nick Mathewson2021-12-021-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly a finger exercise, and an experiment in "what does grcov consider to be coverage". Here's what I've found out... * In grcov's eyes, most #[derive(Foo)] lines count as containing code; but calling any one derived function counts as calling those lines. * Unlike with tarpaulin, it is actually possible to reach 100% grcov line coverage. (Tarpaulin likes to pick "}" lines and tell you that you never reached them; or sometimes it picks expression statements that have the effect of a return, and tells you that they're unreached. Even with these tests, tarpaulin claims that the line coverage of tor-units is only 97.3%.) * In rust, it may be a bit hopeless trying to get high function coverage. Even though we've hit every line of the tor-units crate, the function coverage from its own tests is only 9.38% (55.41% from other crates). I think this is probably due to derived functions, or maybe due to generics getting instantiated? I've got no idea; the denominator for the function coverage lines fluctuates oddly.
* | | Implement Eq,PartialEq for BoundedInt32.Nick Mathewson2021-12-022-1/+4
| | |
* | | Merge remote-tracking branch 'origin/mr/165'Nick Mathewson2021-12-023-17/+1
|\ \ \
| * | | Remove dir_port from RouterStatusBuilderNeel Chauhan2021-12-013-17/+1
| | | |
* | | | Merge branch 'postprocess_coverage' into 'main'eta2021-12-022-21/+132
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Postprocess coverage index.html with python instead Closes #249 See merge request tpo/core/arti!163
| * | | Postprocess coverage index.html with python insteadNick Mathewson2021-12-012-21/+132
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change jettisons the awk and ed dependencies and instead uses a real HTML parser, via the BeautifulSoup library in python. Using BeautifulSoup lets us do trickier stuff, like actually extracting the coverage totals and adding our own table, with per-crate coverage. The script only does this post-processing when it finds python3; the script exits with an error if BeautifulSoup isn't installed.
* | | Merge branch 'tor-dirmgr' into 'main'eta2021-12-011-3/+9
|\ \ \ | | | | | | | | | | | | | | | | Don't warn in bootstrap_from_config when error is Error::ManagerDropped See merge request tpo/core/arti!157
| * | | dont warn on bootstrap error when error == manager droppeddagon2021-11-301-3/+9
| | | |
* | | | Merge branch 'weightkind-bitflags' into 'main'eta2021-12-013-34/+51
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | tor-netdir: Use bitflags for WeightKind See merge request tpo/core/arti!161
| * | | tor-netdir: Use bitflags for WeightKindNeel Chauhan2021-11-303-34/+51
|/ / /
* | | Add a semicolon.Nick Mathewson2021-11-301-1/+1
| | |
* | | Add constructor for TorAddr, to enforce port != 0Nick Mathewson2021-11-302-24/+33
| | | | | | | | | | | | This makes sure that we're checking for a nonzero port in all cases.
* | | Merge remote-tracking branch 'origin/mr/156'Nick Mathewson2021-11-301-2/+5
|\ \ \