IPFS gateway astronaut login
This commit is contained in:
parent
c955dfd4ed
commit
a85775d2ae
|
@ -47,22 +47,22 @@ while true; do
|
||||||
# CHECK IPNS KEY EXISTENCE
|
# CHECK IPNS KEY EXISTENCE
|
||||||
ipfs key rm gchange 2>/dev/null
|
ipfs key rm gchange 2>/dev/null
|
||||||
rm -f ~/.zen/tmp/gchange.key
|
rm -f ~/.zen/tmp/gchange.key
|
||||||
${MY_PATH}/keygen -t ipfs -o ~/.zen/tmp/gchange.key "$SALT" "$PEPPER"
|
${MY_PATH}/tools/keygen -t ipfs -o ~/.zen/tmp/gchange.key "$SALT" "$PEPPER"
|
||||||
GNS=$(ipfs key import gchange -f pem-pkcs8-cleartext ~/.zen/tmp/gchange.key )
|
GNS=$(ipfs key import gchange -f pem-pkcs8-cleartext ~/.zen/tmp/gchange.key )
|
||||||
echo "/ipns/$GNS"
|
echo "/ipns/$GNS"
|
||||||
|
|
||||||
echo "Getting latest online TW..."
|
echo "Getting latest online TW..."
|
||||||
mkdir -p ~/.zen/tmp/TW
|
mkdir -p ~/.zen/tmp/TW
|
||||||
rm -f ~/.zen/tmp/TW/index.html
|
rm -f ~/.zen/tmp/TW/index.html
|
||||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
YOU=$(ps auxf --sort=+utime | grep -w "ipfs " | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||||
LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 2)
|
LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 2)
|
||||||
echo "$LIBRA/ipns/$GNS"
|
echo "$LIBRA/ipns/$GNS"
|
||||||
|
|
||||||
[[ $YOU ]] && ipfs --timeout 12s cat /ipns/$GNS > ~/.zen/tmp/TW/index.html \
|
[[ $YOU ]] && ipfs --timeout 12s cat /ipns/$GNS > ~/.zen/tmp/TW/index.html \
|
||||||
|| curl -so ~/.zen/tmp/TW/index.html "$LIBRA/ipns/$GNS"
|
|| curl -m 12 -so ~/.zen/tmp/TW/index.html "$LIBRA/ipns/$GNS"
|
||||||
|
|
||||||
if [ ! -s ~/.zen/tmp/TW/index.html ]; then
|
if [ ! -s ~/.zen/tmp/TW/index.html ]; then
|
||||||
rm -f ~/.zen/tmp/TW/index.html
|
|
||||||
echo "Aucun TW détecté! Creation TW Astronaute"
|
echo "Aucun TW détecté! Creation TW Astronaute"
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
PLAYER="$EMAIL"
|
PLAYER="$EMAIL"
|
||||||
|
@ -82,7 +82,7 @@ while true; do
|
||||||
|
|
||||||
|
|
||||||
# Create Player "IPNS Key" (key import)
|
# Create Player "IPNS Key" (key import)
|
||||||
${MY_PATH}/keygen -t ipfs -o ~/.zen/game/players/$PLAYER/secret.player "$SALT" "$PEPPER"
|
${MY_PATH}/tools/keygen -t ipfs -o ~/.zen/game/players/$PLAYER/secret.player "$SALT" "$PEPPER"
|
||||||
ipfs key import $PLAYER -f pem-pkcs8-cleartext ~/.zen/game/players/$PLAYER/secret.player
|
ipfs key import $PLAYER -f pem-pkcs8-cleartext ~/.zen/game/players/$PLAYER/secret.player
|
||||||
ASTRONAUTENS=$(ipfs key import $G1PUB -f pem-pkcs8-cleartext ~/.zen/game/players/$PLAYER/secret.player)
|
ASTRONAUTENS=$(ipfs key import $G1PUB -f pem-pkcs8-cleartext ~/.zen/game/players/$PLAYER/secret.player)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,14 @@ Content-Type: text/html; charset=UTF-8
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="30; url='http://127.0.0.1:12345'" />
|
||||||
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>CANAL TW ASTROPORT</h1>
|
<h1>ASTROPORT</h1>
|
||||||
|
<h2>Astronaute</h2>
|
||||||
|
<form action = "http://127.0.0.1:12345" method = "GET">
|
||||||
|
<input type='submit' value='OUVRIR VOTRE TW'>
|
||||||
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -5,7 +5,7 @@ Content-Type: text/html; charset=UTF-8
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="refresh" content="7; url='_TWLINK_'" />
|
<meta http-equiv="refresh" content="0; url='_TWLINK_'" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p>Please follow <a href="_TWLINK_">this link</a>.</p>
|
<p>Please follow <a href="_TWLINK_">this link</a>.</p>
|
||||||
|
|
Loading…
Reference in New Issue