forked from axiom-team/astrXbian
Prefer 4001 port addresses
This commit is contained in:
parent
36f0fbaea2
commit
fd47c1bb82
|
@ -70,7 +70,7 @@ do
|
|||
|
||||
|
||||
# control ip isLAN?
|
||||
peerline=$(cat ~/.zen/A_swarm_map.txt | grep "$ipfsnodeid" | tail -n 1)
|
||||
peerline=$(cat ~/.zen/A_swarm_map.txt | grep "$ipfsnodeid" | grep '/4001/' | tail -n 1) ## Prefer 4001 port addresses
|
||||
[[ ! $peerline ]] && peerline=$(cat /tmp/ipfs_swarm_peers | grep "$ipfsnodeid" | tail -n 1)
|
||||
ip=$(cat /tmp/ipfs_swarm_peers | grep "$ipfsnodeid" | awk -F '/' '{print $3}' | tail -n 1) && [[ ! $ip ]] && continue
|
||||
isLAN=$(echo $ip | cut -f3 -d '/' | grep -E "(^127\.)|(^192\.168\.)|(^fd42\:)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||
|
|
Loading…
Reference in New Issue