mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-12 21:59:19 +02:00
parent
2d28aa0752
commit
a1cf9b97ce
@ -723,6 +723,15 @@ if [ "${baseImage}" = "raspbian" ]||[ "${baseImage}" = "raspios_arm64" ]||\
|
||||
|
||||
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)
|
||||
if [ "${fatpack}" == "true" ]; then
|
||||
echo "*** FATPACK ***"
|
||||
|
@ -39,12 +39,13 @@ if [ "$1" = "peer-kickstart" ]; then
|
||||
|
||||
# get raw node data from bitnodes.io (use Tor if available)
|
||||
#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)
|
||||
#else
|
||||
# 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
|
||||
bitnodesRawData=$(sudo -u admin cat /home/admin/fallback.nodes)
|
||||
if [ ${#bitnodesRawData} -lt 100 ]; then
|
||||
echo "error='no valid data from bitnodes.io'"
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user