Should close #25265
The onion proxy can be set either via -onion
or via -proxy
(grep init.cpp
for onion_proxy
). Additionally, when TorControl is configured and successfully connected, there is a fallback that tries to setup the onion proxy via that connection. This fallback was only checking if -onion
was set but if -proxy
was set it was still running and overwriting the existing onion proxy configured in -proxy
.
Instead of using gArgs
I am checking if a valid proxy is set already. This should not make a difference in behavior since init error are thrown if -onion
or -proxy
are set but not valid. There is also another check if -onion
or -proxy
are explicitly disabled. I think this is the most reasonable behavior for such corner cases, though I am not sure if there are valid use cases for such a configuration.
This also adds some more explicit logging that should help users better understand what is happening.