Skip to content

tor-ptmgr/ipc: First cut of pluggable transport spawning

eta requested to merge eta/arti:pt-ipc-v1 into main

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 #394 (closed); part of #69 (closed)

Merge request reports

Loading