grep -rl 'astroport.localhost' ./ | xargs sed -i 's/astroport.localhost/ipfs.localhost/g'

This commit is contained in:
fred 2022-11-19 20:34:28 +01:00
parent 6ad39cbb12
commit 52dbd575b7
18 changed files with 24 additions and 21 deletions

View File

@ -17,7 +17,7 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
PORT=12345

View File

@ -13,7 +13,7 @@ espeak "Ding" > /dev/null 2>&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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
## CLEANING ~/.zen/tmp
rm -Rf ~/.zen/tmp

View File

@ -65,7 +65,7 @@ echo
# CRYPTO BUG. TODO use natools to protect and share key with Ŋ1 only ;)
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
echo " Passerelle : $myIP"

View File

@ -52,7 +52,7 @@ for PLAYER in $(ls -t ~/.zen/game/players/); do
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
echo "Getting latest online TW..."
YOU=$(ipfs swarm peers >/dev/null 2>&1 && echo "$USER" || ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);

View File

@ -24,7 +24,7 @@ ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1)
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
## EXPORT [tag[voeu]]
echo "## EXTRACTION DE NOUVEAUX VOEUX pour $PLAYER TW"

View File

@ -31,7 +31,7 @@ IPFSNODEID=$(ipfs id -f='<id>\n')
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
mkdir -p ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu

View File

@ -13,7 +13,7 @@ IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
PORT=12345

View File

@ -44,7 +44,7 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
URL="$1"
if [ $URL ]; then

View File

@ -8,7 +8,7 @@ MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
ME="${0##*/}"
TS=$(date -u +%s%N | cut -b1-13)

View File

@ -5,7 +5,7 @@ MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
IPFSNODEID=$(ipfs id -f='<id>\n')

View File

@ -23,7 +23,7 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
## LOCAL
[[ ${PLAYER} ]] && ASTRONAUTENS=$(ipfs key list -l | grep -w "${PLAYER}" | cut -d ' ' -f 1)
@ -197,7 +197,7 @@ G1PUB=$(cat /tmp/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
sed -i "s~k2k4r8kxfnknsdf7tpyc46ks2jb3s9uvd3lqtcv9xlq9rsoem7jajd75~${ASTRONAUTENS}~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
sed -i "s~ipfs.infura.io~tube.copylaradio.com~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or astroport.localhost)
sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or ipfs.localhost)
#
echo "# CRYPTO ENCODING myIP -> CRYPTIP"

View File

@ -49,7 +49,7 @@ sudo brother_ql_print /tmp/toprint.bin $LP
### PRINT PLAYER TW myIP link
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
TUBE=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 3)

View File

@ -19,7 +19,7 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
###############################

View File

@ -21,8 +21,8 @@ ipfs config --json Experimental.P2pHttpProxy true
ipfs config --json Swarm.ConnMgr.LowWater 20
ipfs config --json Swarm.ConnMgr.HighWater 40
[[ ! $isLAN ]] && ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://'$myIP':8080", "http://astroport.localhost:8080", "http://127.0.0.1:8080", "http://127.0.1.1:8080" ]' \
|| ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:8080", "http://astroport.localhost:8080", "http://127.0.1.1:8080" ]'
[[ ! $isLAN ]] && ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://'$myIP':8080", "http://ipfs.localhost:8080", "http://127.0.0.1:8080", "http://127.0.1.1:8080" ]' \
|| ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:8080", "http://ipfs.localhost:8080", "http://127.0.1.1:8080" ]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'

View File

@ -7,6 +7,9 @@
MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
ME="${0##*/}"
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
echo '
########################################################################
# \\///
@ -22,8 +25,8 @@ messfile="$2" # FICHIER A AJOUTER AU CORPS MESSAGE
[[ ! $1 ]] && mail="support@qo-op.com"
SUBJECT="[(♥‿‿♥)] Astronaute. Bonjour. "
MESSAGE="( ◕‿◕)\n\n Salut $PLAYER\n\n\n Activez votre TW http://tube.copylaradio.com:1234 .\n\nAstroport"
SUBJECT="[(♥‿‿♥)] Astronaute. Message votre Station Astroport.ONE"
MESSAGE="( ◕‿◕)\n\n Bonjour $PLAYER\n\n\n Activez votre TW http://tube.copylaradio.com:1234 .\n\nAstroport\n$IPFSNODEID"
echo "From: support@g1sms.fr
To: EMAIL

View File

@ -23,7 +23,7 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
alias zenity='zenity 2> >(grep -v GtkDialog >&2)'

View File

@ -27,7 +27,7 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
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])/")
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
[[ ! $myIP || $isLAN ]] && myIP="ipfs.localhost"
mkdir -p ~/.zen/game/players/${PLAYER}/vlog

View File

@ -124,7 +124,7 @@ function cacheIt (appName, hash, nodeId = '') {
var gatewayProtocol = 'http';
var gatewayDomain = 'astroport.localhost';
var gatewayDomain = 'ipfs.localhost';
var gatewayPort = '1234';