-
Notifications
You must be signed in to change notification settings - Fork 39.2k
net: use the proxy if overriden when doing v2->v1 reconnections #35410
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
Merged
fanquake
merged 8 commits into
bitcoin:master
from
vasild:keep_using_override_proxy_for_v1_reconnects_with_functional_test
Jun 4, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fd230f9
net: use the proxy if overriden when doing v2->v1 reconnections
vasild d01b461
net: ensure no direct private broadcast connections
vasild 32d072a
doc: add release notes for #35319
vasild 2ffa81f
test: make reusable SOCKS5 server starting
vasild 2333be9
test: make reusable starting a standalone P2P listener
vasild ab35a02
test: make reusable filling of a node's addrman
vasild 5a3756d
test: add a regression test for private broadcast v1 retries
vasild bf0d257
net: un-default the OpenNetworkConnection()'s proxy_override argument
Crypt-iQ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| P2P and network changes | ||
| ----------------------- | ||
|
|
||
| - Fix a possible leak of the originator's IP address for transactions sent with | ||
| `sendrawtransaction` RPC when `-privatebroadcast=1`. When Bitcoin Core connects | ||
| to a peer, if that peer has been advertised to support P2P protocol v2, then | ||
| Bitcoin Core tries to use the v2 protocol and if that fails it retries the | ||
| connection using the v1 protocol. When the private broadcast is about to send a | ||
| transaction to an IPv4 or IPv6 peer it overrides the normal proxy selection and | ||
| forces the connection through the Tor proxy (and thus through the Tor network, | ||
| protecting the sender's IP address). However if v2 protocol is tried and it | ||
| fails, then the v1 retry connection would be made disregarding the "override | ||
| proxy" request, possibly making an IPv4 or IPv6 direct connection. In other | ||
| words, for this to happen the following must be true: | ||
| 1. An IPv4 or IPv6 address has been advertised to the sender, indicating v2 | ||
| support. | ||
| 2. The sender must have Tor configured. | ||
| 3. The sender's configuration must be such that connections to IPv4 or IPv6 | ||
| are made directly (no `-proxy=` is used for IPv4 or IPv6). | ||
| 4. The recipient does not support v2 (the flags from 1. are bogus). (#35319) | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Suggested alternative:
"Fix ip address leak when using the
-privatebroadcastfeature. Under certain circumstances connections were being made over clearnet rather than the enabled privacy network."I think long explanation could go on the website.
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.
Took something like this for the rel note in #35331. Can take further suggestion / additions to it there.