isLAN = ipfs.$(hostname).local:8080 & astroport.$(hostname).local:1234

This commit is contained in:
fred 2023-12-06 01:11:34 +01:00
parent 595a37c38b
commit 65bff37712
3 changed files with 4 additions and 3 deletions

View File

@ -133,7 +133,7 @@ while true; do
( nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && echo " (‿/‿) $PORT CONSUMED in "`expr $(date +%s) - $start`" seconds." ) &
else
mySalt | \
sed "s~http://127.0.0.1:12345~http://${myIP}:${PORT}~g" | \
sed "s~http://127.0.0.1:12345~http://${myASTROPORT}:${PORT}~g" | \
sed "s~https://ipfs.copylaradio.com/ipns/copylaradio.com~${myUPLANET}~g" | \
( nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && echo " (‿/‿) $PORT CONSUMED in "`expr $(date +%s) - $start`" seconds." ) &
fi

View File

@ -121,7 +121,7 @@ fi
if [[ ! $(cat /etc/hosts | grep -w "astroport.local" | head -n 1) ]]; then
cat /etc/hosts > /tmp/hosts
echo "127.0.1.1 $(hostname) $(hostname).local astroport astroport.local" >> /tmp/hosts
echo "127.0.1.1 $(hostname) $(hostname).local astroport.$(hostname).local ipfs.$(hostname).local astroport.local" >> /tmp/hosts
sudo cp /tmp/hosts /etc/hosts && rm /tmp/hosts
fi

View File

@ -433,8 +433,8 @@ myIP="$(myIp)" # "127.0.0.1"
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
myASTROPORT="http://astroport.localhost:1234" #astroport.localhost
myASTROPORT="http://${myIP}:1234" # BE ACCESSIBLE THROUGH LAN
myASTROPORT="http://astroport.$(hostname).local:1234" #astroport.localhost
myAPI="http://${myIP}:5001"
myDATA="https://data.gchange.fr"
myGCHANGE="https://www.gchange.fr"
@ -443,6 +443,7 @@ myG1BILLET="http://${myIP}:33101"
myHOST="$(myHostName)"
myIPFS="http://${myIP}:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker.
myIPFS="http://ipfs.$(hostname).local:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker.
myIPFSGW="$(myIpfsGw)"
myTUBE="$(myTube)"
myASTROTUBE="https://$(myAstroTube)"