summaryrefslogtreecommitdiff
path: root/crates/tor-ptmgr
Commit message (Collapse)AuthorAgeFilesLines
...
* ptmgr: Note a TODO issue around TempDir.Nick Mathewson2022-11-281-0/+2
|
* ptmgr: Fill in some error-related code; resolve TODOs.Nick Mathewson2022-11-282-8/+50
|
* ptmgr: clear up unused_import exceptions.Nick Mathewson2022-11-282-16/+21
|
* PtMgr: New features section in README.mdNick Mathewson2022-11-282-6/+13
| | | | | | | Per convention, have a `full` feature. Also, downgrade the 'TODO pt-client' entries in README::limitations, since they are not blockers for 1.1.0.
* ptmgr: Mark PtMessage and next_message as experimental-api.Nick Mathewson2022-11-283-3/+26
| | | | | | | | These are implementation details and we don't want to mark them as stable. To do this, I needed to apply some additional options to the example code's configuration in Cargo.toml.
* Draft: Pluggable transport managereta2022-11-286-70/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements `PtMgr`, a pluggable transport manager responsible for keeping track of spawned PTs and spawning them to satisfy client requests on demand. It does this in two parts: the `PtMgr` type exported to the rest of the code, and the background `PtReactor` that actually does the spawning; this design ensures that only one attempt to spawn a PT is active at a time, and will prove useful later for implementing e.g. timeouts. A few changes were necessary to the rest of the code in order to make this all work out. Namely: - `TransportRegistry`'s API didn't make any sense for two reasons: - It wasn't feasible for implementors to implement `ChannelFactory`, since that'd require constructing a `ChanBuilder` (which requires a bootstrap reporting event sender). - Treating the PT manager as a registry is over-general; it's only necessary for it to spawn pluggable transports, so saddling it with other concerns didn't make any sense. - (It's possible to get extensibility for arbitrary user customization by just letting the user swap in a new `ChannelFactory`, anyway.) - Therefore, the `PtMgr` implements the new `AbstractPtMgr` trait, which is far more narrowly focused; this only exists to solve a dependency loop, and is documented as such. - This provides a `TransportHelper` instead of a `ChannelFactory`.
* Replace TransportRegistry with AbstractPtMgreta2022-11-221-32/+1
| | | | | | | | | | | | | | | | | | It doesn't make much sense to have the pluggable transport manager be a registry, so replace its interface with a more narrowly defined, less generic version. Other changes: - instead of returning a &-reference, it returns an owned Arc, which should make the ptmgr easier to implement while allowing efficient reuse - provision for error handling is added, but will probably be revised in a future commit pending discussion - tor-ptmgr code that would generate warnings as a result of this change is temporarily removed This is a split out version of arti!886, intended so work on arti#659 can proceed.
* tor-ptmgr: make configuration use builders, plumb into arti-clienteta2022-11-162-8/+40
| | | | | | | This brings the draft configuration mechanisms in tor-ptmgr in line with the config in other crates, using builders. It also plumbs the config type through into the main `arti-client` config, and adds some example lines to `arti-example-config.toml`.
* bump rust-version to 1.60 in every crate.Nick Mathewson2022-11-101-1/+1
|
* Run add_warnings.Nick Mathewson2022-11-031-0/+1
|
* set all crate edition to 2021trinity-1686a2022-11-011-1/+1
|
* Merge branch 'fuzz_ptmgr_ipc' into 'main'eta2022-10-273-0/+36
|\ | | | | | | | | ptmgr: Add a fuzzer for ptmessage. See merge request tpo/core/arti!814
| * ptmgr: Add a fuzzer for ptmessage.Nick Mathewson2022-10-263-0/+36
| |
* | ptmgr::ipc: Try an alternate approach to initial quotes.Nick Mathewson2022-10-261-10/+5
|/ | | | This lets us use `chars()` rather than `char_indices()`.
* tor-ptmgr/ipc: First cut of pluggable transport spawningeta2022-10-265-1/+963
| | | | | | | | | | | | | | | | | | | | | | | The new `ipc` module inside `tor-ptmgr` implements the Pluggable Transport Specification version 1 (`pt-spec.txt`, https://gitlab.torproject.org/tpo/core/torspec/-/blob/main/pt-spec.txt). This enables module users to spawn pluggable transport binaries inside a child process asynchronously, and receive structured information about how to connect to the transports provided by said binaries. Internally, this is structured as a pure set of serialisers and deserialisers for the protocol in the specification (in the form of environment variables, and the PT's stdout), a wrapper to run the PT binary and enable accessing its output asynchronously, and a user-facing wrapper that handles ensuring all the requested transports launched properly. The included `run-pt` example is an exceedingly minimal wrapper program that was useful in testing. More tests can and should be added in a further MR. closes arti#394; part of arti#69
* Merge branch 'factory_redux' into 'main'Nick Mathewson2022-10-131-3/+1
|\ | | | | | | | | chanmgr: Build and use chanmgr factory APIs See merge request tpo/core/arti!769
| * chanmgr: Clean up async-ness on factory types.Nick Mathewson2022-10-121-3/+1
| | | | | | | | | | | | | | | | 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.
* | 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-34/+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
* Bump minor version of tor-rtcompat and most of its dependentsNick Mathewson2022-10-031-3/+3
| | | | | | | (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-1/+1
|
* Add a few comments based on review.Nick Mathewson2022-09-231-0/+3
|
* Add the skeleton of a tor-ptmgr crateNick Mathewson2022-09-234-0/+244
When complete, this crate will handle launching and using pluggable transports on demand.