Repository navigation
Conversation
|
Yes, this fixes it! |
|
Concept ACK |
|
Concept NACK. |
For anyone interested in following, I answered here. I would say let's keep the conceptual discussion about parameter interaction in the issue @luke-jr, so we don't have to argue the same things in two places. |
| } else { | ||
| if (gArgs.GetArg("-onion", "") != "0" && gArgs.GetArg("-proxy", "") != "0") { | ||
| // Don't do this if -onion or -proxy are explicitly disabled | ||
| LogPrint(BCLog::TOR, "Onion proxy not configured yet. Trying to use TorControl connection to set proxy.\n"); |
There was a problem hiding this comment.
nit: "to set proxy" sounds like it will set the proxy for all, ie -proxy. Maybe "... to set the onion proxy" or "... to set it" would be better?
| } else { | ||
| if (gArgs.GetArg("-onion", "") != "0" && gArgs.GetArg("-proxy", "") != "0") { |
There was a problem hiding this comment.
nit: can use } else if (...) { which would reduce the indentation of the block below
|
Closing this, see discussion in #25265. |
Should close #25265
The onion proxy can be set either via
-onionor via-proxy(grepinit.cppforonion_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-onionwas set but if-proxywas set it was still running and overwriting the existing onion proxy configured in-proxy.Instead of using
gArgsI am checking if a valid proxy is set already. This should not make a difference in behavior since init error are thrown if-onionor-proxyare set but not valid. There is also another check if-onionor-proxyare 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.