aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto
Commit message (Collapse)AuthorAgeFilesLines
...
* | channel padding: Rename ChannelsParams from ChannelsConfigIan Jackson2022-06-214-59/+59
| | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2814276 Change names and comments and docs everywhere.
* | tor-proto: Have Channel::reconfigure throw ChannelClosedIan Jackson2022-06-211-2/+2
| | | | | | | | | | Addresses https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813567
* | tor-proto: err: Provide ChannelClosed as a separate unit errorIan Jackson2022-06-215-18/+38
| |
* | channel padding: Use IntegerMilliseconds in padding::ParametersIan Jackson2022-06-212-10/+12
| |
* | Fix docs for `CtrlMsg::ConfigUpdate`Ian Jackson2022-06-211-5/+2
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813565
* | Fix typoseta2022-06-211-1/+1
| |
* | channel padding: Plumb settings from chanmgrIan Jackson2022-06-212-12/+4
| |
* | channel padding: Introduce ChannelsConfig and reconfigure facilityIan Jackson2022-06-214-3/+242
| | | | | | | | Nothing geenrates config updates yet.
* | channel padding timer: Support reconfigurationIan Jackson2022-06-211-4/+15
| | | | | | | | Nothing calls this yet.
* | channel padding timer: Allow creation without providing parameters yetIan Jackson2022-06-212-16/+32
| | | | | | | | It turns out that we are going to want this.
* | channel padding: Test creation in disabled stateIan Jackson2022-06-211-0/+12
| | | | | | | | | | We're about to split the main new() function off so write a separate test for new_disabled().
* | channel padding: Make Parameters a pub struct with builderIan Jackson2022-06-213-3/+15
|/ | | | chanmgr is going to want to make one of these from a NetDir.
* Merge branch 'config-fix2' into 'main'Nick Mathewson2022-06-161-0/+1
|\ | | | | | | | | Use impl_standard_builder more and remove manual Default/builder impls See merge request tpo/core/arti!594
| * tor-proto: channel: Tell clippy it's ok to print in testsIan Jackson2022-06-161-0/+1
| |
* | Merge branch 'high-level-features' into 'main'Nick Mathewson2022-06-161-0/+2
|\ \ | | | | | | | | | | | | | | | | | | Add "full" and "experimental" features to arti, arti-client, and below. Closes #499 See merge request tpo/core/arti!584
| * | Add "full" and "experimental" features to arti-client and below.Nick Mathewson2022-06-101-0/+2
| |/ | | | | | | | | | | | | | | | | The "full" feature is a catch-all for all features, _except_: * Those that select a particular implementation (like tor-llcrypto/with-openssl) or build flag (like "static") * Those that are experimental or unstable (like "experimental-api") * Those that are testing-only.
* / Permit eprintln in channel-padding test.Nick Mathewson2022-06-151-0/+1
|/ | | | | There is not, apparently, an eprintln equivalent for allow-dbg-in-tests.
* Merge branch 'channel' into 'main'Nick Mathewson2022-06-104-10/+605
|\ | | | | | | | | Have channel reactor able to send channel padding See merge request tpo/core/arti!574
| * channel padding timer: Explain why next() in select_biased!Ian Jackson2022-06-091-0/+7
| |
| * channel padding timer: document state invariantsIan Jackson2022-06-091-2/+24
| | | | | | | | There aren't very many.
| * Fix more typos in comments, from a spellcheckerIan Jackson2022-06-091-6/+6
| |
| * Fix typo in commentNick Mathewson2022-06-091-1/+1
| |
| * Fix erroneous commentNick Mathewson2022-06-091-1/+1
| |
| * Fix typos in commentsNick Mathewson2022-06-091-3/+3
| |
| * tor-proto: padding: Test padding timer distributionIan Jackson2022-06-082-0/+125
| |
| * tor-proto: channel: Use padding::TimerIan Jackson2022-06-083-12/+44
| |
| * tor-proto: channel: Provide padding::TimerIan Jackson2022-06-083-0/+409
| |
* | Change to exhaustive match.Ian Jackson2022-06-081-1/+2
| |
* | update semver.mdtrinity-1686a2022-06-081-0/+1
| |
* | try to differentiate transient from nontransient errortrinity-1686a2022-06-083-10/+23
|/
* Merge branch 'sleep' into 'main'Ian Jackson2022-06-086-57/+119
|\ | | | | | | | | Plumb a SleepProvider (now Clone + ....) into Channel See merge request tpo/core/arti!569
| * Document semver changesIan Jackson2022-06-081-0/+1
| |
| * Plumb a SleepProvider into the channel reactorIan Jackson2022-06-085-57/+118
| | | | | | | | | | The channel reactor is going to want to be able to sleep so that it can do padding, so it needs a SleepProvider.
* | Merge branch 'use-testing-rng'Nick Mathewson2022-06-078-13/+20
|\ \ | |/ |/|
| * Use testing_rng() in tests throughout our crates.Nick Mathewson2022-06-028-13/+20
| | | | | | | | | | | | This only affects uses of thread_rng(), and affects them all more or less indiscriminately. One test does not work with ARTI_TEST_PRNG=deterministic; the next commit will fix it.
* | Merge branch 'lint' into 'main'Ian Jackson2022-05-311-0/+2
|\ \ | |/ |/| | | | | | | | | lints: Make lint blocks consistent and ensure they stay that way Closes #469 See merge request tpo/core/arti!557
| * lints: Add lint block delimiters to every crateIan Jackson2022-05-311-0/+2
| | | | | | | | | | | | This was the result of: maint/add_warning crates/*/src/{lib,main}.rs and then manually curating the results.
* | proto: Only ready a DataStream if CONNECTED was succesfully receivedDavid Goulet2022-05-311-1/+4
|/ | | | Signed-off-by: David Goulet <[email protected]>
* Lexically sort Cargo.toml dependenciesOrhun Parmaksız2022-05-281-17/+15
| | | | | | Utilize cargo-sort: https://github.com/DevinR528/cargo-sort Signed-off-by: Orhun Parmaksız <[email protected]>
* Regenerate version bump from previous commit.arti-v0.4.0Nick Mathewson2022-05-271-2/+2
| | | | | | | This commit was made by reverting the previous commit, then re-running the script I used to generate it. In theory there should be no semantic changes: only changes due to improved formatting from cargo edit.
* Semantic version changes for Arti 0.4.0 releaseNick Mathewson2022-05-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | I followed the following procedure to make these changes: * I used maint/changed_crates to find out which crates had changed since 0.3.0. * I used grep and maint/list_crates to sort those crates in topological (dependency) order. * I looked through semver_status to find which crates were listed as having semver-relevant changes (new APIs and breaking changes). * I scanned through the git logs of the crates with no semver-relevant changes listed to confirm that, indeed, they had no changes. For those crates, I incremented their patch-level version _without_ changing the version that other crates depend on. * I scanned through the git logs of the crates with no semver-relevant changes listed to confirm that, indeed, they had no obvious breaking changes. * I treated all crates that depend on `arti` and/or `arti-client` as having breaking changes. * I identified crates that depend on crates that have changed, even if they have not changed themselves, and identified them as having a non-breaking change. * For all of the crates, I used `cargo set-version -p $CRATE --bump $STATUS` (where `STATUS` is `patch` or `minor`) to update the versions, and the depended-upon versions.
* More tests for ClockSkew.Nick Mathewson2022-05-251-0/+40
|
* prepare_send_from: clippy: Replace some or_else with orIan Jackson2022-05-231-2/+2
|
* channel: Provide and use Sink::prepare_send_fromIan Jackson2022-05-231-75/+25
| | | | | | | | | | | | | | | | | | | | This is a general-purpose implementation of the ad-hoc approach currently taken in (eg) crates/tor-proto/src/channel/reactor.rs, with an API intended to defned against the more obvious mistakes. This allows us to separate the two concerns: the channel reactor can focus on handling channel cells and control messages and is over 2.5x shorter. The complexity of the manual sink implementation, and the machinery needed to avoid having to suspend while holding an item, are dealt with separately. That separate implemenation now has proper documentation. (Tests are in the nest commit to avoid this one being even more unwieldy.) We use `extend` to define this as an extension trait. A competitor is `ext` but in my personal projects I have found `extend` slightly better.
* Merge branch 'main' into 'ticket_466'Nick Mathewson2022-05-162-1/+2
|\ | | | | | | # Conflicts: # doc/semver_status.md
| * clippy: Change a binding to (), and allow clippy::let_unit_valueIan Jackson2022-05-112-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type of ret.map_err(codec_err_to_chan)? is (). ISTM that writing `let () = ` makes it clear that there is nothing there, but the lint forbids this. This lint is warn by default and trips here for me on current nightly. It seems wrong to me. We should be able to make it clear to the reader that there is nothing here - note how this differs from the lines below where Ready contains msg. A let () binding is a good way to do that. I think the lint allow ought to be added everywhere, but that doesn't seem easy right now - see this issue about maint/add_warning: https://gitlab.torproject.org/tpo/core/arti/-/issues/469
* | Add a channel accessor to ClientCirc.Nick Mathewson2022-05-111-1/+20
|/ | | | | I need this so that I can expose the skew time for the directory that a circuit will use, when I only have the circuit.
* Bump the version of every* crate to 0.3.0Nick Mathewson2022-05-061-11/+11
| | | | * Except for safelog and fs-mistrust, which are new.
* Fix typos (using the typos-cli tool).Nick Mathewson2022-05-041-1/+1
|
* Upgrade to AES 0.8Nick Mathewson2022-04-264-5/+5
| | | | | | | | Now that we require Rust 1.56, we can upgrade to AES 0.8. This forces us to have some slight API changes. We require cipher 0.4.1, not cipher 0.4.0, since 0.4.0 has compatibility issues with Rust 1.56.