init: Prevent -noproxy and -proxy=0 from interacting with other settings#24837
Merged
maflcko merged 1 commit intobitcoin:masterfrom Apr 17, 2022
Merged
init: Prevent -noproxy and -proxy=0 from interacting with other settings#24837maflcko merged 1 commit intobitcoin:masterfrom
maflcko merged 1 commit intobitcoin:masterfrom
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.
ryanofsky
commented
Apr 12, 2022
Comment on lines
+663
to
+664
| std::string proxy_arg = args.GetArg("-proxy", ""); | ||
| if (proxy_arg != "" && proxy_arg != "0") { |
Contributor
Author
There was a problem hiding this comment.
In commit "init: Prevent -noproxy and -proxy=0 settings from interacting with other settings" (3429d67)
These lines are copied from AppInitMain below
luke-jr
reviewed
Apr 13, 2022
Comment on lines
+663
to
+664
| std::string proxy_arg = args.GetArg("-proxy", ""); | ||
| if (proxy_arg != "" && proxy_arg != "0") { |
Member
There was a problem hiding this comment.
Suggested change
| std::string proxy_arg = args.GetArg("-proxy", ""); | |
| if (proxy_arg != "" && proxy_arg != "0") { | |
| if (args.GetBoolArg("-proxy")) { |
Member
There was a problem hiding this comment.
Nevermind, this can do the wrong thing if a long decimal IP is specified.
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Apr 18, 2022
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevent
-noproxyand-proxy=0settings from interacting with-listen,-upnp, and-natpmpsettings.These settings started being handled inconsistently in the
AppInitMainandInitParameterInteractionfunctions 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