-
Notifications
You must be signed in to change notification settings - Fork 37.7k
torcontrol : avoid to set wrong outbound proxy and network settings when creating an inbound onion service. #19358
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
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Concept ACK, good catch. Concept ACK on the doc change as well. Though I'd suggest not refering to "nameproxy" as that's an internal implementation detail. I think the gist is: + Note: Only the -proxy option will set the proxy used for DNS requests.
+ With this option these will not route over Tor.
+ So please use -proxy if you have privacy concerns with this. This is the case because BTW: as you found, the go-to document for configuring bitcoin over tor is
Last time I checked, |
87c33ef
to
959c31e
Compare
thx, hmm, lets put it that way. Suppose a user selects -onlynet=ipv4 selects -listen and -proxy or none. I guess the least thing a human would expect in that case, is that the node would use a forgotten open existing tor port, to kindly out and inbound route onion traffic. The more elleborate tor,md change when merged including your suggestions, at least warn now the user off this implications with the options use, but honestly, would you expect Fact is, exactly that happens, a node that had an onion tor past and knows some onions, even later with a pure -onlynet=ipv4 conf, will open automatic outbound to those onions over tor, if a configed tor lingers forgotten or not on that cruft. ̶I̶t̶s̶ ̶n̶o̶t̶ ̶e̶a̶s̶y̶ ̶t̶o̶ ̶c̶r̶a̶f̶t̶ ̶n̶o̶d̶e̶s̶ ̶t̶o̶ ̶d̶o̶ ̶t̶h̶i̶s̶ ̶i̶n̶ ̶a̶ ̶o̶n̶e̶ ̶s̶h̶o̶t̶ ̶t̶e̶s̶t̶ ̶s̶e̶t̶u̶p̶,̶ ̶I̶ ̶t̶r̶y̶ ̶t̶o̶ ̶p̶o̶s̶t̶ ̶h̶e̶r̶e̶ ̶a̶ ̶b̶a̶s̶h̶ ̶s̶c̶r̶i̶p̶t̶ ̶t̶h̶a̶t̶ ̶d̶o̶e̶s̶ ̶t̶h̶e̶ ̶s̶t̶e̶p̶s̶,̶ ̶s̶i̶n̶c̶e̶ ̶t̶h̶a̶t̶ ̶i̶s̶ ̶a̶ ̶b̶i̶t̶ ̶r̶e̶l̶a̶t̶e̶d̶ ̶t̶o̶ ̶w̶h̶a̶t̶ ̶w̶e̶ ̶f̶i̶x̶ ̶h̶e̶r̶e̶,̶ ̶m̶i̶g̶h̶t̶ ̶b̶e̶ ̶t̶h̶e̶ ̶r̶i̶g̶h̶t̶ ̶p̶l̶a̶c̶e̶?̶ Its a d-feature?. although u need some patience i.e. if you do just |
Craft a more elaborate description of what those options in regards to tor or network traffic do. Some wording is picked from @laanwj review in bitcoin#19358.
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.
Concept ACK. Would you mind adding test coverage for the issue and code changes (perhaps in test/functional/feature_proxy.py
)?
Craft a more elaborate description of what those options in regards to tor or network traffic do. Some wording is picked from @laanwj review in bitcoin#19358.
381ed7b
to
cdf0b20
Compare
Craft a more elaborate description of what those options in regards to tor or network traffic do. Some wording is picked from @laanwj review in bitcoin#19358.
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.
Concept NACK, I think... If we're using -torcontrol, it makes sense to override -proxy (which is primarily for non-onion connections, and only used as a default for onions if no other is specified).
Perhaps a better alternative would be to disable -torcontrol (parameter interaction) if -proxy or -onion are set?
I thought also about your suggestion, but dismissed that, since we have more problems that we should solve. If you say pure -onion how to make sure the node does not dox the hidden service when the nameproxy is only selected by -proxy? And -onlynet=onion had never worked for seeds since they use ipv4 connect and dns anyway in disregard of any conf and when you say -dns they resolve over tor and with 5 known correlated seeders on bootstrap you are doxed again. Pls look also at #14425 and the patch for -onlynet i posted there, Also #19043 -tortarget should be seen in that whole tor setup logic it make from a privacy perspective prefect sense to add such an option as you can easy forward over tor the hidden service from an other cruft, what makes things even more interesting if you want to have tx and mempool fill, uncorrelated to your normal node operations and somewhat quasi on the fly could enable this,. Cloud you outline how you would see the tor implementation work? |
Craft a more elaborate description of what those options in regards to tor or network traffic do. Some wording is picked from @laanwj review in bitcoin#19358.
Rebased addressed review and added the detrimental followup -onlynet fixup.commit e9452a1 |
…rvice. Before this fix default settings could override conf and you could end up not be able to connect to .onion nodes or connect over the wrong proxy. Side effect of this fix is that we no longer create the default Tor socks outbound proxy, that we would have created by chance if an inbound Tor service creation was successful. Since the old version anyway would have leaked our ip, this fix now dumps a warning that an outbound Tor proxy is not defined.
While the onlynet=onion problem is fixed by not creating and outbound proxy in torcontrol. We now with this fix respect also the possible fine grained ipv4/ipv6 setting combinations.
Rebased 901ac08 fixed the -onlynet settings for proxy use ready to review. |
Please note this should possibly resolve Issue #12641 when validating? -DA. |
I guess what u observe is that Tor can for sure over ip4/6 Tor exit nodes connect to nodes in the ip4/6 clearnet. if the address given to the socks5 proxy is not an onion address like from your seed.dat or address learned from other nodes.. Did u expect with -proxy just Tor onion address outbound connections? |
Good Afternoon,
Reply via email.
I guess what u observe is that Tor can for sure over ip4/6 Tor exit
nodes connect to nodes in the ip4/6 clearnet.
Well, yes if it is not set `onlynet=onion`
Did u expect with -proxy just Tor onion address outbound connections?
Both onion and proxy are set to the tor proxy.
-onlynet=onion
onlynet=onion is fine and connections to pure onion addresses works,
that is not the problem, the problem is not respecting the proxy
setting.
|
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
While fiddling around with torcontrol and other tor proxy settings,
I noticed that the node tried to connect over the default 9050 port and ignored my settings.
That was the case when the node try's to create a default hidden ephemeral tor service at startup.
So ,when we define our own proxy settings in conf, we don't want this to be skipped
by the default proxy creation that we setup while creating the
ephemeral hidden onion service.
Note; When -torcontrol and -proxy is defined in conf, we should not
override this with the default settings 127.0.0.1:9050.
Since the proxy ip and port might for good reasons have been set to other values.
Before this fix default settings could override conf and you could end
up not to be able to connect to .onion nodes or connect over the wrong proxy.
Also fixes #14722 some years ago noticed by qubenix
EDIT:
While check more options I wondered what PR #14425 is about?
And indeed the -onlynet flags are clearly disregarded in respect to onions
since #7553. We could merge #14425 or adapt the tor.md doku to the actual
behavior. Here my suggestion, with some British humor. 🤷♀️
My guess the consumption of the Catch22 movie, had influence when parts of
the option logic where implemented in the first place.
edit saibato
The Tor doc change laanwj mentioned later in review had moved to #20091
This PR now also fixes #13378 and is replacement for the fix from wodry #14425