lnd.check: streamisolation false in hybrid mode

a simple logic to cover #2787
This commit is contained in:
openoms 2021-12-19 22:36:39 +00:00
parent 9844476804
commit cf8d454988
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65

View file

@ -193,10 +193,17 @@ if [ "$1" == "prestart" ]; then
setting ${lndConfFile} ${insertLine} "tor.control" "9051"
setting ${lndConfFile} ${insertLine} "tor.socks" "9050"
setting ${lndConfFile} ${insertLine} "tor.privatekeypath" "\/mnt\/hdd\/lnd\/${netprefix}v3_onion_private_key"
setting ${lndConfFile} ${insertLine} "tor.streamisolation" "true"
setting ${lndConfFile} ${insertLine} "tor.v3" "true"
setting ${lndConfFile} ${insertLine} "tor.active" "true"
# take care of incompatible settings https://github.com/rootzoll/raspiblitz/issues/2787#issuecomment-991245694
if [ $(cat ${lndConfFile} | grep -c "tor.skip-proxy-for-clearnet-targets=true") -gt 0 ] ||
[ $(cat ${lndConfFile} | grep -c "tor.skip-proxy-for-clearnet-targets=1") -gt 0 ]; then
setting ${lndConfFile} ${insertLine} "tor.streamisolation" "false"
else
setting ${lndConfFile} ${insertLine} "tor.streamisolation" "true"
fi
# deprecate Tor password (remove if in lnd.conf)
sed -i '/^tor.password=*/d' ${lndConfFile}