summaryrefslogtreecommitdiff
path: root/crates/tor-ptmgr/src/err.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rename ClientTransportGaveError to TransportGaveErrorSaksham Mittal2023-09-131-3/+3
|
* Fix typosDimitris Apostolou2022-12-091-1/+1
|
* ptmgr: change error UnconfiguredTransportDueToConcurrentReconfigurationIan Jackson2022-11-301-5/+7
| | | | | | | | 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: Use anonymize_home when displaying paths in errorsNick Mathewson2022-11-291-3/+4
|
* Merge remote-tracking branch 'eta/ptreactor-v1' into merge_ptreactorNick Mathewson2022-11-291-5/+34
|\ | | | | | | | | Resolved several conflicts while doing so; mostly with !893 and !895.
| * tor-ptmgr: add PtReactoreta2022-11-291-5/+34
| | | | | | | | | | | | 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.
* | ptmgr: Refine RetryTime for ChildSpawnFailed.Nick Mathewson2022-11-291-1/+7
| |
* | ptmgr: Rename ClientTransportFailed, document, and correct its RetryTime.Nick Mathewson2022-11-291-5/+6
| |
* | ptmgr: Replace StdioUnavailable with a PtError.Nick Mathewson2022-11-291-7/+0
| |
* | Rename LocalLoginFailed to ExternalToolFailed.Nick Mathewson2022-11-291-1/+1
|/
* ptmgr: Fill in some error-related code; resolve TODOs.Nick Mathewson2022-11-281-6/+40
|
* Draft: Pluggable transport managereta2022-11-281-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* tor-ptmgr/ipc: First cut of pluggable transport spawningeta2022-10-261-0/+67
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