mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-20 04:37:19 +02:00
#592 user choice to IBD behind TOR or IP
This commit is contained in:
@@ -70,10 +70,9 @@ dialog --backtitle "RaspiBlitz" --msgbox "OK - RPC password changed \n\nNow star
|
|||||||
# https://github.com/rootzoll/raspiblitz/issues/592
|
# https://github.com/rootzoll/raspiblitz/issues/592
|
||||||
###################
|
###################
|
||||||
|
|
||||||
whiptail --title ' Privacy Level - How do you want to run your node? ' --yes-button='Public IP' --no-button='TOR NETWORK' --yesno "
|
whiptail --title ' Privacy Level - How do you want to run your node? ' --yes-button='Public IP' --no-button='TOR NETWORK' --yesno "Running your Lightning node with your Public IP is common and faster, but might reveal your personal identity and location.\n
|
||||||
Running your node with your Public IP is the default but might reveal your personal identity and location.\n
|
You can better protect your privacy with running your lightning node as a TOR Hidden Service from the start, but it can make it harder to connect with other non-TOR nodes and remote mobile apps later on.
|
||||||
You can better protect your privacy with running your node as a Hidden Service within the TOR network, but that makes syncing slower, makes it harder to connect with other non-TOR nodes and remote mobile apps.
|
" 12 75
|
||||||
" 14 75
|
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
echo "runBehindTor=on" >> /home/admin/raspiblitz.info
|
echo "runBehindTor=on" >> /home/admin/raspiblitz.info
|
||||||
fi
|
fi
|
||||||
|
@@ -17,20 +17,10 @@ if [ "$network" = "bitcoin" ]; then
|
|||||||
# raspberryPi 3 and lower
|
# raspberryPi 3 and lower
|
||||||
msg=" This old RaspberryPi has very limited CPU power.\n"
|
msg=" This old RaspberryPi has very limited CPU power.\n"
|
||||||
msg="$msg To sync & validate the complete blockchain\n"
|
msg="$msg To sync & validate the complete blockchain\n"
|
||||||
msg="$msg can take multiple days - even weeksn"
|
msg="$msg can take multiple days - even weeks\n"
|
||||||
msg="$msg Its recommended to use another option.\n"
|
msg="$msg Its recommended to use another option.\n"
|
||||||
msg="$msg \n"
|
msg="$msg \n"
|
||||||
msg="$msg So do you really want start syncing now?"
|
msg="$msg So do you really want start syncing now?"
|
||||||
else
|
|
||||||
# raspberryPi 4 and up
|
|
||||||
msg=" Your RaspiBlitz will sync and validate\n"
|
|
||||||
msg="$msg the complete blockchain by itself.\n"
|
|
||||||
msg="$msg This can take multiple days, but\n"
|
|
||||||
msg="$msg its the best to do it this way.\n"
|
|
||||||
msg="$msg \n"
|
|
||||||
msg="$msg So do you want start syncing now?"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dialog --title " WARNING " --yesno "${msg}" 11 57
|
dialog --title " WARNING " --yesno "${msg}" 11 57
|
||||||
response=$?
|
response=$?
|
||||||
case $response in
|
case $response in
|
||||||
@@ -38,6 +28,19 @@ if [ "$network" = "bitcoin" ]; then
|
|||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
255) exit 1;;
|
255) exit 1;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ask if really sync behind TOR
|
||||||
|
if [ "${runBehindTor}" = "on" ]; then
|
||||||
|
whiptail --title ' Sync Blockchain from behind TOR? ' --yes-button='Public-Sync' --no-button='TOR-Sync' --yesno "You decided to run your node behind TOR and validate the blockchain with your RaspiBlitz - thats good. But downloading the complete blockchain thru TOR can add some extra time (maybe a day) to the process and adds a heavy load on the TOR network.\n
|
||||||
|
Your RaspiBlitz can just run the initial blockchain download with your public IP (Public-Sync) but keep your Lighting node safe behind TOR.
|
||||||
|
It would speed up the self-validation while not revealing your Lightning node identity. But for most privacy choose (TOR-Sync).
|
||||||
|
" 15 76
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
# set flag to not run bitcoin behind TOR during IDB
|
||||||
|
echo "ibdBehindTor=off" >> /home/admin/raspiblitz.info
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
clear
|
clear
|
||||||
if [ ${raspberryPi} -lt 4 ]; then
|
if [ ${raspberryPi} -lt 4 ]; then
|
||||||
@@ -71,7 +74,7 @@ elif [ ${kbSizeRAM} -gt 1500000 ]; then
|
|||||||
# RP3/4 1GB
|
# RP3/4 1GB
|
||||||
else
|
else
|
||||||
echo "Detected RAM <=1GB --> optimizing ${network}.conf"
|
echo "Detected RAM <=1GB --> optimizing ${network}.conf"
|
||||||
sudo sed -i "s/^dbcache=.*/dbcache=768/g" /home/admin/assets/${network}.conf
|
sudo sed -i "s/^dbcache=.*/dbcache=512/g" /home/admin/assets/${network}.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "*** Activating Blockain Sync ***"
|
echo "*** Activating Blockain Sync ***"
|
||||||
|
@@ -37,10 +37,21 @@ if [ ${mountOK} -eq 1 ]; then
|
|||||||
|
|
||||||
###### ACTIVATE TOR IF SET DURING SETUP
|
###### ACTIVATE TOR IF SET DURING SETUP
|
||||||
if [ "${runBehindTor}" = "on" ]; then
|
if [ "${runBehindTor}" = "on" ]; then
|
||||||
echo "TOR was selected ..."
|
|
||||||
|
echo "runBehindTor --> ON"
|
||||||
sudo /home/admin/config.scripts/internet.tor.sh on
|
sudo /home/admin/config.scripts/internet.tor.sh on
|
||||||
|
|
||||||
|
# but if IBD is allowed to be public switch off TOR just fro bitcoin
|
||||||
|
# until IBD is done. background service will after that switch TOR on
|
||||||
|
if [ "${ibdBehindTor}" = "off" ]; then
|
||||||
|
echo "ibdBehindTor --> OFF"
|
||||||
|
sudo /home/admin/config.scripts/internet.tor.sh btcconf-off
|
||||||
else
|
else
|
||||||
echo "TOR was not selected"
|
echo "ibdBehindTor --> ON"
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "runBehindTor --> OFF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###### START NETWORK SERVICE
|
###### START NETWORK SERVICE
|
||||||
|
@@ -109,7 +109,7 @@ if [ ${lndRunning} -eq 0 ]; then
|
|||||||
|
|
||||||
###### ACTIVATE TOR IF SET DURING SETUP
|
###### ACTIVATE TOR IF SET DURING SETUP
|
||||||
if [ "${runBehindTor}" = "on" ]; then
|
if [ "${runBehindTor}" = "on" ]; then
|
||||||
echo "TOR was selected ..."
|
echo "TOR was selected"
|
||||||
sudo /home/admin/config.scripts/internet.tor.sh lndconf-on
|
sudo /home/admin/config.scripts/internet.tor.sh lndconf-on
|
||||||
else
|
else
|
||||||
echo "TOR was not selected"
|
echo "TOR was not selected"
|
||||||
|
Reference in New Issue
Block a user