-
Notifications
You must be signed in to change notification settings - Fork 37.7k
init: Prevent -noproxy and -proxy=0 from interacting with other settings #24837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…her settings Prevent -noproxy and -proxy=0 settings from interacting with -listen, -upnp, and -natpmp settings. These settings started being handled inconsistently in the `AppInitMain` and `InitParameterInteraction` functions starting in commit baf0507 from bitcoin#6272: https://github.com/bitcoin/bitcoin/blob/baf05075fae2cc2625a2a74b35cc66902f3cbfa3/src/init.cpp#L990-L991 https://github.com/bitcoin/bitcoin/blob/baf05075fae2cc2625a2a74b35cc66902f3cbfa3/src/init.cpp#L687 This commit changes both functions to handle proxy arguments the same way so there are not side effects from specifying a proxy=0 setting.
std::string proxy_arg = args.GetArg("-proxy", ""); | ||
if (proxy_arg != "" && proxy_arg != "0") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In commit "init: Prevent -noproxy and -proxy=0 settings from interacting with other settings" (3429d67)
These lines are copied from AppInitMain
below
std::string proxy_arg = args.GetArg("-proxy", ""); | ||
if (proxy_arg != "" && proxy_arg != "0") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::string proxy_arg = args.GetArg("-proxy", ""); | |
if (proxy_arg != "" && proxy_arg != "0") { | |
if (args.GetBoolArg("-proxy")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, this can do the wrong thing if a long decimal IP is specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 3429d67, tested on Ubuntu 22.04.
…ting with other settings 3429d67 init: Prevent -noproxy and -proxy=0 settings from interacting with other settings (Ryan Ofsky) Pull request description: Prevent `-noproxy` and `-proxy=0` settings from interacting with `-listen`, `-upnp`, and `-natpmp` settings. These settings started being handled inconsistently in the `AppInitMain` and `InitParameterInteraction` functions starting in commit baf0507 from bitcoin#6272: https://github.com/bitcoin/bitcoin/blob/baf05075fae2cc2625a2a74b35cc66902f3cbfa3/src/init.cpp#L990-L991 https://github.com/bitcoin/bitcoin/blob/baf05075fae2cc2625a2a74b35cc66902f3cbfa3/src/init.cpp#L687 This commit changes both functions to handle proxy arguments the same way so there are not side effects from specifying a proxy=0 setting. This change was originally part of bitcoin#24830 but really is independent and makes more sense as a separate PR ACKs for top commit: hebasto: ACK 3429d67, tested on Ubuntu 22.04. Tree-SHA512: c4c6b4aeb3c07321700e974c16fd47a1bd3d469f273a6b308a69638db81c88c4e67208fddc96fcda9c8bd85f3ae22c98ca131c9622895edaa34eb65c194f35db
Prevent
-noproxy
and-proxy=0
settings from interacting with-listen
,-upnp
, and-natpmp
settings.These settings started being handled inconsistently in the
AppInitMain
andInitParameterInteraction
functions starting in commit baf0507 from #6272:bitcoin/src/init.cpp
Lines 990 to 991 in baf0507
bitcoin/src/init.cpp
Line 687 in baf0507
This commit changes both functions to handle proxy arguments the same way so
there are not side effects from specifying a proxy=0 setting.
This change was originally part of #24830 but really is independent and makes more sense as a separate PR