txtorcon
txtorcon copied to clipboard
Provide actual defaults
Can we provide the actual Tor defaults nicely to the user? For example, to avoid stuff like this: https://github.com/warner/foolscap/pull/27/files#diff-500ebcf8cf805a51e5a42da402338000R155
Recent Tor versions have GETINFO config/defaults
(but, e.g. SOCKSPort isn't in there, but does get a default value). Might be a special-case for SOCKSPort?
Okay, so the answer is:
- yes, we can query all the default values using
getinfo config/defaults
(but not individual ones) - anything that is a StringList (e.g. SOCKSPort) doesn't work :(
- ...so might have to hard-code some defaults double-:(
But I think the approach should be that TorConfig
queries config/defaults
as it starts up (i.e. after querying info/names
) and then it can provide the "actual" defaults somehow. But, we should probably still reveal (somehow) through the API that these are defaults and not that they're set in the config (and also be careful not to actually-set them with a .save()
later).