txtorcon icon indicating copy to clipboard operation
txtorcon copied to clipboard

Provide actual defaults

Open meejah opened this issue 7 years ago • 2 comments

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

meejah avatar Jul 27 '16 17:07 meejah

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?

meejah avatar Aug 12 '16 01:08 meejah

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).

meejah avatar Aug 12 '16 04:08 meejah