meejah / txtorcon

Twisted-based asynchronous Tor control protocol implementation. Includes unit-tests, examples, state-tracking code and configuration abstraction.
http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/
MIT License
250 stars 72 forks source link

Provide actual defaults #177

Open meejah opened 8 years ago

meejah commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Okay, so the answer is:

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