aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-chanmgr
Commit message (Collapse)AuthorAgeFilesLines
...
* chanmgr: Edit comments, fix docsNick Mathewson2022-10-134-18/+49
|
* chanmgr: Remove RegistryAsFactory.Nick Mathewson2022-10-131-11/+6
| | | | | Since there is no longer a blanket implementation of ChannelFactory for TransportHelper, we no longer need a separate type here.
* ChanMgr: Reorganize factory, builder, transport code.Nick Mathewson2022-10-136-282/+330
| | | | There is no actual code change here: just movement.
* Merge branch 'factory_redux' into 'main'Nick Mathewson2022-10-137-133/+224
|\ | | | | | | | | chanmgr: Build and use chanmgr factory APIs See merge request tpo/core/arti!769
| * Flatten TimeoutChannelFactory into ChannelBuilder.Nick Mathewson2022-10-132-48/+30
| |
| * chanmgr: clean up some TODO pt-client items and documentation.Nick Mathewson2022-10-133-80/+23
| |
| * Allow multiple ChannelBuilders to share a ChanMgrEventSender.Nick Mathewson2022-10-132-4/+9
| |
| * chanmgr: Use ChannelFactory via a Box<dyn<ChannelFactory>>.Nick Mathewson2022-10-132-4/+28
| | | | | | | | | | This will prepare for supporting multiple different ChannelFactory implementations.
| * chanmgr: Move Timeout functionality into a decorator object.Nick Mathewson2022-10-132-12/+51
| |
| * Have ChannelBuilder use TransportHelper.Nick Mathewson2022-10-134-27/+92
| | | | | | | | | | | | This lets us build channels using different TransportHelpers, including the (new) default TransportHelper, which just uses the old connect_to_one() code.
| * Implement ChannelFactory for (a wrapper of) TransportRegistry.Nick Mathewson2022-10-121-1/+23
| | | | | | | | This will let us just have ChanMgr take a `dyn ChannelFactory`.
| * chanmgr: Clean up async-ness on factory types.Nick Mathewson2022-10-121-9/+17
| | | | | | | | | | | | | | | | The traits that launch connections need to be async; the traits that don't, shouldn't be async. Additionally, we need a few more "Sync" annotations here for the futures to work.
| * Rename mgr::ChannelFactory to mgr::AbstractChannelFactoryNick Mathewson2022-10-123-19/+22
| | | | | | | | | | | | | | | | | | This is an internal type (distinct from factory::ChannelFactory) that we use to make the code in `tor_chanmgr::mgr` agnostic about what a channel actually is, and how it is actually launched. Therefore, I'm renaming it and giving better documentation in a couple of places, to prevent confusion.
* | cargo fmt to remove blank linesIan Jackson2022-10-121-1/+0
| | | | | | | | | | | | | | Apparently cargo fmt doesn't like these, which my perl rune didn't delete. This commit is precisely the result of `cargo fmt`.
* | Replace all README copies in src/lib.rs with includesIan Jackson2022-10-121-33/+1
|/ | | | | | | | The feature we want is `#[doc = include_str!("README.md")]`, which is stable since 1.54 and our MSRV is now 1.56. This commit is precisely the result of the following Perl rune: perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
* Allow "clippy::single_char_pattern" in tests.Ian Jackson2022-10-123-0/+3
| | | | | | | This lint exists for perf reasons, and this is rarely relevant in tests. Using double quoted str is generally cognitively less burdensome.
* Change multiplicity of ChannelMethod and addressesNick Mathewson2022-10-111-12/+8
| | | | | | | Now each `ChanTarget` has at most one `ChannelMethod`, and only `Direct` `ChannelMethods` can have multiple addresses. Closes #600.
* Allow two useless pattern matches that are going to be not uselessIan Jackson2022-10-111-0/+1
|
* Move two users of HasAddrs to HasChannelMethodsNick Mathewson2022-10-061-2/+11
| | | | All the other users of HasAddrs are correct.
* tor-linkspec: Remove the old OwnedFoo::new() functionsNick Mathewson2022-10-061-1/+8
| | | | These are now builders.
* tor-proto: Preserve the ChannelMethod, not the SocketAddrNick Mathewson2022-10-061-1/+1
|
* Remove semver.md files now that arti 1.0.1 is out.Nick Mathewson2022-10-031-1/+0
|
* Bump minor version of tor-rtcompat and most of its dependentsNick Mathewson2022-10-031-6/+6
| | | | | | | (Since the APIs for the `Schedule::sleep*` functions changed, this is a breaking change in tor-rtcompat. Therefore, the Runtime trait in tor-rtcompat is now a different trait. Therefore, anything that uses the Runtime trait in its APIs has also broken.)
* Bump crates that have had backward compatible API changes.Nick Mathewson2022-10-031-4/+4
|
* Update README.md files.Nick Mathewson2022-09-301-0/+17
|
* Mark all bridge and pt features as experimental for now.Nick Mathewson2022-09-292-0/+19
| | | | | | Also, document the features. Closes #588.
* ChanMgr: new (unimplemented) APIs for pluggable transportsNick Mathewson2022-09-236-0/+152
|
* Improve docs for ChannelUsageNick Mathewson2022-09-221-7/+15
| | | | | | | Try to clarify more that the ChannelUsage is for describing the usage for one particular channel request, not for the channel as a whole. This is a potentially confusing point, so we should spell it out completely.
* Remove semver.md from arti-1.0.0Nick Mathewson2022-09-071-4/+0
|
* Bump crate versions in preparation for Arti 1.0.0 release.Nick Mathewson2022-09-011-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want to work more on ensuring that our semver stability story is solid, we are _not_ bumping arti-client to 1.0.0 right now. Here are the bumps we _are_ doing. Crates with "minor" bumps have had API breaks; crates with "patch" bumps have had new APIs added. Note that `tor-congestion` is not bumped here: it's a new crate, and hasn't been published before. ``` tor-basic-utils minor fs-mistrust minor tor-config minor tor-rtcompat minor tor-rtmock minor tor-llcrypto patch tor-bytes patch tor-linkspec minor tor-cell minor tor-proto minor tor-netdoc patch tor-netdir minor tor-persist patch tor-chanmgr minor tor-guardmgr minor tor-circmgr minor tor-dirmgr minor arti-client minor arti-hyper minor arti major arti-bench minor arti-testing minor ```
* tor-chanmgr: don't log addresses so much.Nick Mathewson2022-08-252-3/+5
| | | | | We now log connection attempts at debug!, and mark relay target addresses as sensitive.
* fix nightly lintstrinity-1686a2022-08-241-1/+1
|
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-242-0/+4
|
* channel padding: Move initial config of ChannelPaddingInstructionsIan Jackson2022-08-171-1/+1
| | | | | | | | | | | | | Making ChannelPaddingInstructions::default() accurately reflect the initial state of the reactor's padding timer simplifies the code somewhat. (When padding is wanted, parameters are computed and inserted explicitly, so the only change is that if we start out dormant, we defer setting the timer parameters until necessary.) As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
* channel usage: Rename CU::UserTraffic from CU::ExitIan Jackson2022-08-173-19/+31
| | | | | As suggested in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827246
* chanmgr padding: Correct docs for padding_parameters*Ian Jackson2022-08-171-2/+5
| | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827242 These texts were out of date; one of them still mentioned `all_zeroes`.
* Improve comment for ChannelUsage::ExitNick Mathewson2022-08-171-1/+1
|
* Fix typo in commentNick Mathewson2022-08-171-1/+1
|
* tor-chanmgr tests: Fix a minimal-versions failure (actually)Ian Jackson2022-08-171-1/+1
|
* tor-chanmgr tests: Fix a minimal-versions failureIan Jackson2022-08-171-2/+2
|
* Add semver notesIan Jackson2022-08-171-0/+4
|
* channel padding: Correctly always send the timer parametersIan Jackson2022-08-171-5/+5
| | | | Fixes "chanmgr configuration: Avoid sending needless initial update(s)"
* channel engage_padding_activities: swap docs to tor0protoIan Jackson2022-08-171-10/+2
| | | | This allow us to make a working cross-reference.
* Rename ChannelsParams types to ChannelPaddingInstructions (fmt)Ian Jackson2022-08-173-6/+18
| | | | Run rustfmt; no other changes.
* Rename ChannelsParams types to ChannelPaddingInstructionsIan Jackson2022-08-174-20/+20
| | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826167 This makes some lines too long; I will run rustfmt in a separate commit for clarity.
* chanmgr: Fix typoIan Jackson2022-08-171-1/+1
| | | | | Reported here https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826166
* chanmgr parameterize: Correct doc commentIan Jackson2022-08-171-1/+4
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826164
* chamgr NetParamsExtract: Replace direct nf_ito accessIan Jackson2022-08-171-4/+23
| | | | | It turns out that the TryFrom was infallible, which wasn't obvious with the previous code structure.
* Channel: Make mutable() and engage_padding_activities infallibleIan Jackson2022-08-174-12/+7
| | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826151 This gets rid of quite some Bug error paths.
* Move ChannelUsage from tor_proto to tor_chanmgrIan Jackson2022-08-175-15/+54
| | | | | | | | | | | Replace Channel::note_usage with Channel::engage_padding_activities, which unconditionally causes the channel to (start to) do netflow padding things. The condition now lives in chanmgr. Addresses https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826094