Reload configuration files (when they change?)
Arti now has the ability to change the configuration of a TorClient instance on the fly. But there's actually no way to do that on a running arti proxy. It would be cool if we had the ability to replace our configuration when the user wants us to.
Before we can do that, however, we should discuss the possibilities and decide what behavior we really want.
One possibility here is to reload on SIGHUP, like Unix programs typically do. But SIGHUP doesn't exist on Windows, so that wouldn't meet everybody's needs.
Another possibility is to monitor some or all the configuration files for changes, and reload them when they change. The notify
crate could be helpful there.
Maybe we want to allow the user to select the above possibilities, or disable reloading entirely.
In either case, we'll need to figure out how to handle broken configurations. The current Tor behavior is to shut down if you SIGHUP into a broken or incompatible configuration. The alternative is to give a warning in the logs, and then let the user provide a fixed configuration. As above, maybe we'd want the user to have the choice of which they prefer?
I'm putting this into 0.1.0, since it represents a good chance of actually exercising our "reload the configuration code".