aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-ptmgr
Commit message (Collapse)AuthorAgeFilesLines
...
* Bump patchlevel on crates with non-breaking changesNick Mathewson2023-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For these crates, the changes are nontrivial, so we _do_ bump the versions on which their dependent crates depend. Fortunately, since they are all pre-1.0, we don't need to distinguish semver-additions from other changes. (Except for arti, which _is_ post-1.0, but gets a patchlevel bump anyway.) These are unstable crates with breaking changes: ``` tor-hscrypto tor-hsclient ``` These have new or extended APIs: ``` safelog tor-bytes tor-cell tor-linkspec tor-llcrypto tor-proto tor-cert arti-client ``` These have new unstable APIs or features: ``` tor-netdoc tor-circmgr (also broke some unstable APIs) arti (is post-1.0) ``` These have bugfixes only: ``` caret tor-dirmgr ```
* Bump patchlevel on crates with semver-irrelevant changes.Nick Mathewson2023-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Their dependents are _not_ updated to a more recent version. These bumped the version of a dependency that they don't expose ``` tor-rtcompat fs-mistrust ``` This one had internal refactoring: ``` tor-netdir ``` These had trivial changes only: ``` tor-checkable tor-ptmgr tor-guardmgr arti-hyper arti-bench arti-testing ```
* tor-ptmgr: Fix fuzzer compilation.Nick Mathewson2023-03-131-0/+1
| | | | | | Since we made the internals of the ptmgr protocol parser conditionally private, we need to tell Cargo to build the fuzzer with the `experimental-api` feature so that it can access them.
* Patchlevel bumps for remaining changed crates.Nick Mathewson2023-02-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had small code changes, but no API additions: tor-config tor-socksproto tor-cert tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr arti tor-hsservice tor-congestion These crates have had API extensions: fs-mistrust tor-llcrypto tor-bytes tor-checkable tor-linkspec tor-netdoc tor-persist arti-client
* Merge branch 'logs' into 'main'Nick Mathewson2023-02-012-4/+9
|\ | | | | | | | | | | | | Report causes of errors Closes #680 See merge request tpo/core/arti!997
| * Use ErrorReport - run rustfmtIan Jackson2023-01-301-1/+5
| | | | | | | | Split off for ease of review and possible rebase.
| * Use ErrorReport for errors in error! in tor-ptmgrIan Jackson2023-01-301-1/+2
| |
| * Use ErrorReport for errors in warn! in tor-ptmgrIan Jackson2023-01-301-3/+3
| |
* | Bump the patch version of every crate that had API additionsNick Mathewson2023-02-011-2/+2
| | | | | | | | | | | | These crates had API or behavior changes that may affect downstream crates. Fortunately, they're all version 0.x, and don't need minor bumps for this.
* | Bump the patch-level version of crates with _minor_ changes.Nick Mathewson2023-02-011-5/+5
|/ | | | | | | These changes influence behavior, but not effect compatibility. (If I messed up, and any crate except for `arti` has non-breaking API changes, that's still fine, since they are all version 0.x.)
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* ptmgr: Add more logs when looking/creating a PT.Nick Mathewson2023-01-061-24/+46
| | | | | | | These are also based on temporary logs that I added locally while I was hunting bugs. Also part of #677.
* ptmgr: Add more logging to IPC code.Nick Mathewson2023-01-061-9/+34
| | | | | | | | This is based on logs that I added locally while I was trying to debug some startup issues. Hopefully they'll make things easier the next time there's something to debug. Part of #677.
* doc: consistent summary line for the READMEsEmil Engler2022-12-201-1/+1
| | | | | This commit introduces a consistency to the summary line of all README.md files in each and every crate.
* Fix typosDimitris Apostolou2022-12-091-1/+1
|
* Merge branch 'version_bump' into 'main'Nick Mathewson2022-11-301-9/+9
|\ | | | | | | | | Bump the minor version of every crate. See merge request tpo/core/arti!918
| * Bump the minor version of every crate.Nick Mathewson2022-11-301-9/+9
| | | | | | | | | | We made this job easy this time around: by incrementing our MSRV, we have forced ourselves to do at least a minor bump everywhere.
* | Hang onto a PT object after it is launchedNick Mathewson2022-11-301-0/+1
|/ | | | | | | If we don't do this, then snowflake's stdin will get closed and it will exit immediately. Found while investigating #333.
* ptmgr todo: Remove dead code allowIan Jackson2022-11-301-2/+0
|
* ptmgr: No need for state_dir in PtMgrIan Jackson2022-11-301-4/+1
| | | | This is used exclusively by the reactor.
* ptmgr todo: Tolerate exposing the Vec for nowIan Jackson2022-11-301-1/+1
| | | | | We may want to change this later, but this API is in a low level crate, so this isn't a blocker.
* Merge branch 'no_empty_select' into 'main'eta2022-11-301-1/+9
|\ | | | | | | | | | | | | ptmgr: Do not construct an empty select_all future. Closes #672 and #670 See merge request tpo/core/arti!907
| * ptmgr: Do not construct an empty select_all future.Nick Mathewson2022-11-301-1/+9
| | | | | | | | | | | | Closes #670. Closes #672.
* | ptmgr: change error UnconfiguredTransportDueToConcurrentReconfigurationIan Jackson2022-11-302-6/+8
| | | | | | | | | | | | | | | | Rename it from UnconfiguredTransport. Change descriptions, kind, and retry. Add a TODO. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/901#note_2858455
* | ptmgr: Clarify E::NotAFileIan Jackson2022-11-301-2/+6
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/901#note_2858454
* | ptmgr: Fix kind for E::StatedirCreateFailedIan Jackson2022-11-301-1/+1
|/ | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/901#note_2858456
* ptmgr: report an error if PT transports don't match requested.Nick Mathewson2022-11-292-2/+9
| | | | | (I think this may be impossible now, since we check in ipc.rs, but IMO it's best to check.)
* Register transport in pt reactor even if it has no pending requestsNick Mathewson2022-11-291-1/+1
|
* ptmgr: Use anonymize_home when displaying paths in errorsNick Mathewson2022-11-292-3/+5
|
* ptmgr: Use PluggableTransport::identity in logs.Nick Mathewson2022-11-292-2/+10
| | | | This lets us avoid logging the user's path.
* Centralize the "find an identifier for the pt name" logic in one place.Nick Mathewson2022-11-292-11/+37
|
* Merge remote-tracking branch 'eta/ptreactor-v1' into merge_ptreactorNick Mathewson2022-11-293-39/+263
|\ | | | | | | | | Resolved several conflicts while doing so; mostly with !893 and !895.
| * tor-ptmgr: add PtReactoreta2022-11-293-37/+264
| | | | | | | | | | | | This fleshes out the PtReactor that was previously a stub, making it actually do reactor-ey things. Note that this is entirely untested, and might not work at all. Hopefully it does, though.
* | Clarify internal error.Ian Jackson2022-11-291-2/+2
| |
* | ptmgr: Refine RetryTime for ChildSpawnFailed.Nick Mathewson2022-11-291-1/+7
| |
* | ptmgr: Rename ClientTransportFailed, document, and correct its RetryTime.Nick Mathewson2022-11-292-6/+7
| |
* | ptmgr: Replace StdioUnavailable with a PtError.Nick Mathewson2022-11-292-11/+12
| |
* | Rename LocalLoginFailed to ExternalToolFailed.Nick Mathewson2022-11-291-1/+1
|/
* PtMgr: Use a persistent state directory for PT state.Nick Mathewson2022-11-282-10/+8
| | | | | | | | | | This makes a `pt_state` directory inside .local/share/arti (or the local equivalent), right next to our existing `state` dir. Ideally we would use a separate directory for each PT, but we have a very fuzzy "what is a specific PT" notion. Closes #667
* Revise the API of "PtMgr::reconfigure"Nick Mathewson2022-11-281-2/+7
| | | | | | | | I prefer that it not take `&mut self`, since PtMgr already has interior mutability. I also need it to take `tor_config::Reconfigure` argument, in case it gains any more smarts about validation in the future.
* 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
|