mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-20 13:02:21 +02:00
@@ -723,6 +723,15 @@ if [ "${baseImage}" = "raspbian" ]||[ "${baseImage}" = "raspios_arm64" ]||\
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# *** FALLBACK NODE LIST *** see https://github.com/rootzoll/raspiblitz/issues/1888
|
||||||
|
echo "*** FALLBACK NODE LIST ***"
|
||||||
|
sudo -u admin curl -H "Accept: application/json; indent=4" https://bitnodes.io/api/v1/snapshots/latest/ -o /home/admin/fallback.nodes
|
||||||
|
byteSizeList=$(sudo -u admin stat -c %s /home/admin/fallback.nodes)
|
||||||
|
if [ ${#byteSizeList} -eq 0 ] || [ ${byteSizeList} -lt 1024 ]; then
|
||||||
|
echo "FAIL: downloading FALLBACK NODE LIST --> https://bitnodes.io/api/v1/snapshots/latest/"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# *** FATPACK *** (can be activated by parameter - see details at start of script)
|
# *** FATPACK *** (can be activated by parameter - see details at start of script)
|
||||||
if [ "${fatpack}" == "true" ]; then
|
if [ "${fatpack}" == "true" ]; then
|
||||||
echo "*** FATPACK ***"
|
echo "*** FATPACK ***"
|
||||||
|
@@ -39,12 +39,13 @@ if [ "$1" = "peer-kickstart" ]; then
|
|||||||
|
|
||||||
# get raw node data from bitnodes.io (use Tor if available)
|
# get raw node data from bitnodes.io (use Tor if available)
|
||||||
#if [ "${runBehindTor}" == "on" ]; then
|
#if [ "${runBehindTor}" == "on" ]; then
|
||||||
# call over tor proxy
|
# call over tor proxy (CAPTCHA BLOCKED)
|
||||||
#bitnodesRawData=$(curl --socks5-hostname 127.0.0.1:9050 -H "Accept: application/json; indent=4" https://bitnodes.io/api/v1/snapshots/latest/ 2>/dev/null)
|
#bitnodesRawData=$(curl --socks5-hostname 127.0.0.1:9050 -H "Accept: application/json; indent=4" https://bitnodes.io/api/v1/snapshots/latest/ 2>/dev/null)
|
||||||
#else
|
#else
|
||||||
# call over clearnet
|
# call over clearnet
|
||||||
bitnodesRawData=$(curl -H "Accept: application/json; indent=4" https://bitnodes.io/api/v1/snapshots/latest/ 2>/dev/null)
|
# bitnodesRawData=$(curl -H "Accept: application/json; indent=4" https://bitnodes.io/api/v1/snapshots/latest/ 2>/dev/null)
|
||||||
#fi
|
#fi
|
||||||
|
bitnodesRawData=$(sudo -u admin cat /home/admin/fallback.nodes)
|
||||||
if [ ${#bitnodesRawData} -lt 100 ]; then
|
if [ ${#bitnodesRawData} -lt 100 ]; then
|
||||||
echo "error='no valid data from bitnodes.io'"
|
echo "error='no valid data from bitnodes.io'"
|
||||||
exit 1
|
exit 1
|
||||||
|
Reference in New Issue
Block a user