CRYPTIP MODE astroport.localhost
This commit is contained in:
parent
c95530d2d4
commit
0046e8506d
4
12345.sh
4
12345.sh
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
PORT=12345
|
||||
|
||||
@ -392,7 +392,7 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
||||
#
|
||||
# CRYPTO DECODING CRYPTIP -> myIP
|
||||
rm -f ~/.zen/tmp/myIP.2
|
||||
echo "$CRYPTIP" > ~/.zen/tmp/myIP.$G1PUB.enc.2
|
||||
echo -n "$CRYPTIP" > ~/.zen/tmp/myIP.$G1PUB.enc.2
|
||||
$MY_PATH/tools/natools.py decrypt -f pubsec -k ~/.zen/tmp/coucou/${MOATS}.secret.key -i ~/.zen/tmp/myIP.$G1PUB.enc.2 -o ~/.zen/tmp/myIP.2 > /dev/null 2>&1
|
||||
OLDIP=$(cat ~/.zen/tmp/myIP.2 > /dev/null 2>&1)
|
||||
|
||||
|
@ -12,8 +12,8 @@ espeak "Ding" > /dev/null 2>&1
|
||||
|
||||
|
||||
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
|
||||
[[ ! $myIP ]] && myIP="127.0.1.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"
|
||||
|
||||
## CLEANING ~/.zen/tmp
|
||||
rm -Rf ~/.zen/tmp
|
||||
|
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
echo " Passerelle : $myIP"
|
||||
|
||||
|
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.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);
|
||||
@ -87,7 +87,7 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(
|
||||
#
|
||||
# CRYPTO DECODING CRYPTIP -> myIP
|
||||
rm -f ~/.zen/tmp/myIP.2
|
||||
echo "$CRYPTIP" > ~/.zen/tmp/myIP.$G1PUB.enc.2
|
||||
echo -n "$CRYPTIP" > ~/.zen/tmp/myIP.$G1PUB.enc.2
|
||||
$MY_PATH/../tools/natools.py decrypt -f pubsec -k ~/.zen/game/players/$PLAYER/secret.dunikey -i ~/.zen/tmp/myIP.$G1PUB.enc.2 -o ~/.zen/tmp/myIP.2 > /dev/null 2>&1
|
||||
OLDIP=$(cat ~/.zen/tmp/myIP.2 > /dev/null 2>&1)
|
||||
|
||||
|
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
## EXPORT [tag[voeu]]
|
||||
echo "## EXTRACTION DE NOUVEAUX VOEUX pour $PLAYER TW"
|
||||
|
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu
|
||||
|
||||
|
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
URL="$1"
|
||||
if [ $URL ]; then
|
||||
|
2
start.sh
2
start.sh
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
ME="${0##*/}"
|
||||
TS=$(date -u +%s%N | cut -b1-13)
|
||||
|
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
|
||||
|
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
## LOCAL
|
||||
[[ ${PLAYER} ]] && ASTRONAUTENS=$(ipfs key list -l | grep -w "${PLAYER}" | cut -d ' ' -f 1)
|
||||
@ -200,7 +200,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 127.0.1.1)
|
||||
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)
|
||||
|
||||
#
|
||||
echo "# CRYPTO ENCODING myIP -> CRYPTIP"
|
||||
@ -212,15 +212,15 @@ G1PUB=$(cat /tmp/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||
echo "# CRYPTO DECODING CRYPTIP -> myIP"
|
||||
tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html --output ~/.zen/tmp --render '.' 'MadeInZion.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion'
|
||||
CRYPTIPENC=$(cat ~/.zen/tmp/MadeInZion.json | jq -r .[].secret | base16 -d)
|
||||
echo "$CRYPTIPENC" > ~/.zen/tmp/myIP.$G1PUB.enc.2
|
||||
rm -f ~/.zen/tmp/myIP.2
|
||||
# echo "$MY_PATH/natools.py decrypt -f pubsec -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -i $HOME/.zen/tmp/myIP.$G1PUB.enc.2 -o $HOME/.zen/tmp/myIP.2"
|
||||
echo -n "$CRYPTIPENC" > ~/.zen/tmp/myIP.$G1PUB.enc.2 ### PAS DE RETOUR CHARIOT !
|
||||
$MY_PATH/natools.py decrypt -f pubsec -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -i $HOME/.zen/tmp/myIP.$G1PUB.enc.2 -o $HOME/.zen/tmp/myIP.2
|
||||
#
|
||||
## CRYPTO PROCESS VALIDATED
|
||||
[[ -s ~/.zen/tmp/myIP.2 ]] && echo "$myIP _SECRET_ CRYPTIP SECURED" \
|
||||
|| sed -i "s~$CRYPTIP~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # Revert to plaintext _SECRET_ myIP
|
||||
|
||||
rm -f ~/.zen/tmp/myIP.2
|
||||
|
||||
## ADD SYSTEM TW
|
||||
tiddlywiki --verbose --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html \
|
||||
--import ~/.zen/Astroport.ONE/templates/data/local.api.json "application/json" \
|
||||
|
@ -40,7 +40,7 @@ select voeu in "${vlist[@]}"; 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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
VOEUXNS=$(ipfs key list -l | grep $voeu | cut -d ' ' -f1)
|
||||
|
||||
|
@ -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://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://127.0.1.1:8080" ]'
|
||||
[[ ! $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" ]'
|
||||
|
||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
|
||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
|
||||
|
@ -22,7 +22,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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
# ~/.zen/game/players/$PLAYER/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN
|
||||
# Astropot/Kodi/Vstream source reads ${PREFIX}ASTRXBIAN from http://${myIP}:8080/.$IPFNODEID/
|
||||
|
@ -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="127.0.1.1"
|
||||
[[ ! $myIP || $isLAN ]] && myIP="astroport.localhost"
|
||||
|
||||
mkdir -p ~/.zen/game/players/${PLAYER}/vlog
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user