add ip2tor to all mobiles

This commit is contained in:
rootzoll 2020-05-27 01:55:03 +02:00
parent e5b584a706
commit f14de857ea

View File

@ -71,7 +71,7 @@ host=""
port=""
extraparameter=""
supportsTOR=0
usingIP2TOR=0
usingIP2TOR=""
if [ "${targetWallet}" = "zap-ios" ]; then
connector="lndconnect"
@ -83,6 +83,14 @@ if [ "${targetWallet}" = "zap-ios" ]; then
# normal ZAP uses gRPC ports
port="10009"
fi
if [ ${#ip2torGRPC_IP} -gt 0 ]; then
# when IP2TOR bridge is available - force using that
usingIP2TOR="LND-GRPC-API"
forceTOR=0
extraparameter=""
host="${ip2torGRPC_IP}"
port="${ip2torGRPC_PORT}"
fi
elif [ "${targetWallet}" = "zap-android" ]; then
connector="lndconnect"
@ -96,7 +104,7 @@ elif [ "${targetWallet}" = "zap-android" ]; then
fi
if [ ${#ip2torGRPC_IP} -gt 0 ]; then
# when IP2TOR bridge is available - force using that
usingIP2TOR=1
usingIP2TOR="LND-GRPC-API"
forceTOR=0
extraparameter=""
host="${ip2torGRPC_IP}"
@ -106,11 +114,19 @@ elif [ "${targetWallet}" = "zap-android" ]; then
elif [ "${targetWallet}" = "zeus-ios" ]; then
connector="lndconnect"
port="8080"
if [ ${#ip2torREST_IP} -gt 0 ]; then
# when IP2TOR bridge is available - force using that
usingIP2TOR="LND-REST-API"
forceTOR=0
extraparameter=""
host="${ip2torREST_IP}"
port="${ip2torREST_PORT}"
fi
if [ ${forceTOR} -eq 1 ]; then
echo "error='no tor support'"
exit 1
fi
port="8080"
elif [ "${targetWallet}" = "zeus-android" ]; then
@ -118,7 +134,7 @@ elif [ "${targetWallet}" = "zeus-android" ]; then
port="8080"
if [ ${#ip2torREST_IP} -gt 0 ]; then
# when IP2TOR bridge is available - force using that
usingIP2TOR=1
usingIP2TOR="LND-REST-API"
forceTOR=0
extraparameter=""
host="${ip2torREST_IP}"
@ -138,24 +154,48 @@ elif [ "${targetWallet}" = "sendmany-android" ]; then
forceTOR=0
fi
port="10009"
if [ ${#ip2torGRPC_IP} -gt 0 ]; then
# when IP2TOR bridge is available - force using that
usingIP2TOR="LND-GRPC-API"
forceTOR=0
extraparameter=""
host="${ip2torGRPC_IP}"
port="${ip2torGRPC_PORT}"
fi
elif [ "${targetWallet}" = "shango-ios" ]; then
connector="shango"
port="10009"
if [ ${#ip2torGRPC_IP} -gt 0 ]; then
# when IP2TOR bridge is available - force using that
usingIP2TOR="LND-GRPC-API"
forceTOR=0
extraparameter=""
host="${ip2torGRPC_IP}"
port="${ip2torGRPC_PORT}"
fi
if [ ${forceTOR} -eq 1 ]; then
echo "error='no tor support'"
exit 1
fi
port="10009"
elif [ "${targetWallet}" = "shango-android" ]; then
connector="shango"
port="10009"
if [ ${#ip2torGRPC_IP} -gt 0 ]; then
# when IP2TOR bridge is available - force using that
usingIP2TOR="LND-GRPC-API"
forceTOR=0
extraparameter=""
host="${ip2torGRPC_IP}"
port="${ip2torGRPC_PORT}"
fi
if [ ${forceTOR} -eq 1 ]; then
echo "error='no tor support'"
exit 1
fi
port="10009"
else
echo "error='unknown target wallet'"
@ -248,8 +288,8 @@ msg=""
if [ $(echo "${host}" | grep -c '192.168') -gt 0 ]; then
msg="Make sure you are on the same local network.\n(WLAN same as LAN - use WIFI not cell network on phone).\n\n"
fi
if [ ${usingIP2TOR} -eq 1 ]; then
msg="Your IP2TOR bridge is used for this connection.\n\n"
if [ ${#usingIP2TOR} -gt 0 ]; then
msg="Your IP2TOR bridge '${usingIP2TOR}' is used for this connection.\n\n"
fi
msg="You should now see the pairing QR code on the RaspiBlitz LCD.\n\n${msg}When you start the App choose to connect to your own node.\n(DIY / Remote-Node / lndconnect)\n\nClick on the 'Scan QR' button. Scan the QR on the LCD and <continue> or <console QRcode> to see it in this window."
whiptail --backtitle "Connecting Mobile Wallet" \