-
Notifications
You must be signed in to change notification settings - Fork 276
Fix reconnection to clearnet addresses via Tor #3054
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
Fix reconnection to clearnet addresses via Tor #3054
Conversation
|
At first glance, this seems to be incorrect: it will incorrectly use Tor in some configurations. But I'll need to spend more time looking at this again and how we configure it to be sure. @sstone does that ring a bell? I'm pretty sure we had these distinct cases for a good reason. |
|
The proposed change do not check |
It appears to be a logical approach. When outgoing Tor connections are disabled, we are effectively unable to connect to Tor addresses, so we default to selecting only clearnet addresses. Conversely, if Tor connections are enabled, we consider all available addresses - both Tor and clearnet - and randomly select one. |
|
It can be incorrect if I think we can remove |
6ad6c83 to
9aaffa2
Compare
I added a handler for this unlikely case, too. |
9aaffa2 to
add2616
Compare
|
@sstone can you take another look at this? |
add2616 to
1f35971
Compare
|
Any updates about this fix? I had to manually patch the second major release to have a usable Eclair version... |
|
@sstone will look into it shortly, we've been busy with taproot work but should have time to finalize this next week. Sorry for the delay. |
sstone
left a comment
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.
I think your reasoning makes sense but I added a comment because it was not really obvious: the decision to use a proxy or not is made later when we try to connect, so we should only filter out addresses that we know we won't able to connect to, and it's only true for tor addresses when we don't have a proxy with useForTor set.
I checked our documentation and it does not need to be updated.
eclair-core/src/main/scala/fr/acinq/eclair/io/ReconnectionTask.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Fabrice Drouin <[email protected]>
Fixes #3051