Skip to content

tor-client: refactor TorClient::bootstrap's args into a config object

eta requested to merge eta/arti:eta/tor-client-config into main

The three arguments TorClient::bootstrap requires by way of configuration have been factored into a new TorClientConfig object.

This object gains two associated functions: one which uses tor_config's CfgPath machinery to generate sane defaults for the state and cache directories, and one that accepts said directories in order to create a config object with those inserted.

(this commit was inspired by trying to use arti as a library and being somewhat overwhelmed by the amount of config stuff there was to do :p)

Merge request reports