Issue with Tor configuration causing unnecessary force closures
The Tor network is not very reliable, as it often experiences intermittent errors that can persist for weeks.
For some reason, the current implementation of Eclair does not allow for the establishment of outbound connections to clearnet addresses over Tor when
eclair.socks5.enabled = true
eclair.socks5.use-for-tor = true
eclair.socks5.use-for-ipv6 = true
eclair.socks5.use-for-ipv6 = true
As a result, unnecessary force closures occur when the connection to an onion address drops due to a Tor issue. When Eclair attempts to reconnect and fails repeatedly, it does not fall back to connecting to an available clearnet address over Tor, which could provide a more stable connection.
Additionally, I've encountered another issue that may be unrelated. When
eclair.socks5.enabled = true
eclair.socks5.use-for-tor = true
eclair.socks5.use-for-ipv6 = false
eclair.socks5.use-for-ipv6 = false
connections to onion addresses are not established at all. It appears that use-for-tor configuration parameters is not being honored, which is not the intended behavior when I initially introduced it.
The Tor network is not very reliable, as it often experiences intermittent errors that can persist for weeks.
For some reason, the current implementation of Eclair does not allow for the establishment of outbound connections to clearnet addresses over Tor when
eclair.socks5.enabled = true eclair.socks5.use-for-tor = true eclair.socks5.use-for-ipv6 = true eclair.socks5.use-for-ipv6 = true
Nit: the second ipv6 should be ipv4.
This sounds right: user has configured their socks proxy to be used for all connections (clearnet and tor). If their proxy is not reliable then the configuration should be changed.
Additionally, I've encountered another issue that may be unrelated. When
eclair.socks5.enabled = true eclair.socks5.use-for-tor = true eclair.socks5.use-for-ipv6 = false eclair.socks5.use-for-ipv6 = falseconnections to onion addresses are not established at all. It appears that
use-for-torconfiguration parameters is not being honored, which is not the intended behavior when I initially introduced it.
If the remote node only advertises onion addresses they should always be used, if they advertise both clearnet and onion addresses one of them will be picked randomly. Is it not what you see ?
If the remote node only advertises onion addresses they should always be used, if they advertise both clearnet and onion addresses one of them will be picked randomly. Is it not what you see ?
In this case only clearnet address get picked:
https://github.com/ACINQ/eclair/blob/650681f78e28b0839943b9dec25335ed5ef9ef19/eclair-core/src/main/scala/fr/acinq/eclair/io/ReconnectionTask.scala#L194-L197
This sounds right: user has configured their socks proxy to be used for all connections (clearnet and tor). If their proxy is not reliable then the configuration should be changed.
In this case only tor addresses get picked:
https://github.com/ACINQ/eclair/blob/650681f78e28b0839943b9dec25335ed5ef9ef19/eclair-core/src/main/scala/fr/acinq/eclair/io/ReconnectionTask.scala#L198-L200