Compare commits

...

6 Commits

10 changed files with 74 additions and 13595 deletions

View File

@ -18,8 +18,15 @@ IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
myIP=$(hostname -I | awk '{print $1}' | head -n 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])/") isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
[[ $isLAN ]] && myHOST="ipfs.localhost" && myHOSTPort="ipfs.localhost:8080" && myHTTP="http://" && myASTROPORT="http://astroport.localhost:1234" ## LAN STATION myDOMAINName=$(hostname -d 2>/dev/null)
[[ ! $isLAN || $USER == "zen" ]] && myHOST="astroport.copylaradio.com" && myHOSTPort="ipfs.copylaradio.com" && myHTTP="https://" && myASTROPORT="https://astroport.copylaradio.com" ## WAN STATION myHOSTName=$(hostname |sed 's/.'${myDOMAINName}'$//')
[ -n "$myDOMAINName" ] && myHOSTName="${myHOSTName}.${myDOMAINName}" || myDOMAINName=${myHOSTName#*.}
[ -z "$myDOMAINName" ] && myDOMAINName=localhost
myHOST="astroport.${myDOMAINName}"
myIPFS="http://ipfs.${myDOMAINName}:8080"
myASTROPORT="http://astroport.${myDOMAINName}:1234"
[[ ! $isLAN || $USER == "zen" ]] && myIPFS="https://ipfs.${myDOMAINName}" && myASTROPORT="https://astroport.${myDOMAINName}" ## WAN STATION
PORT=12345 PORT=12345
@ -36,7 +43,7 @@ ncrunning=$(ps auxf --sort=+utime | grep -w 'nc -l -p 1234' | grep -v -E 'color=
# Some client needs to respect that # Some client needs to respect that
HTTPCORS="HTTP/1.1 200 OK HTTPCORS="HTTP/1.1 200 OK
Access-Control-Allow-Origin: \* Access-Control-Allow-Origin: ${myASTROPORT}
Access-Control-Allow-Credentials: true Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET Access-Control-Allow-Methods: GET
Server: Astroport.ONE Server: Astroport.ONE
@ -81,7 +88,7 @@ while true; do
## CHECK 12345 PORT RUNNING (STATION FoF MAP) ## CHECK 12345 PORT RUNNING (STATION FoF MAP)
maprunning=$(ps auxf --sort=+utime | grep -w '_12345.sh' | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) maprunning=$(ps auxf --sort=+utime | grep -w '_12345.sh' | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
[[ ! $maprunning ]] \ [[ ! $maprunning ]] \
&& echo '(ᵔ◡◡ᵔ) LAUNCHING '${myHTTP}${myHOST}:'12345 (ᵔ◡◡ᵔ)' \ && echo '(ᵔ◡◡ᵔ) LAUNCHING '${myASTROPORT}:'12345 (ᵔ◡◡ᵔ)' \
&& exec $MY_PATH/_12345.sh & && exec $MY_PATH/_12345.sh &
############### ACTIVATE USE ON QUICK IPFS DRIVE ############### ACTIVATE USE ON QUICK IPFS DRIVE
@ -89,7 +96,7 @@ while true; do
#~ echo #~ echo
#~ ipfs key rm ${PORT} > /dev/null 2>&1 #~ ipfs key rm ${PORT} > /dev/null 2>&1
#~ SESSIONNS=$(ipfs key gen ${PORT}) #~ SESSIONNS=$(ipfs key gen ${PORT})
#~ echo "IPNS SESSION ${myHTTP}${myHOST}Port/ipns/$SESSIONNS CREATED" #~ echo "IPNS SESSION ${myIPFS}/ipns/$SESSIONNS CREATED"
### # USE IT # ### # USE IT #
### MIAM=$(echo ${PORT} | ipfs add -q) ### MIAM=$(echo ${PORT} | ipfs add -q)
@ -105,11 +112,11 @@ while true; do
# REPLACE myHOST in http response template (fixing next API meeting point) # REPLACE myHOST in http response template (fixing next API meeting point)
sed "s~127.0.0.1:12345~${myHOST}:${PORT}~g" $HOME/.zen/Astroport.ONE/templates/index.http > ~/.zen/tmp/coucou/${MOATS}.myHOST.http sed "s~127.0.0.1:12345~${myHOST}:${PORT}~g" $HOME/.zen/Astroport.ONE/templates/index.http > ~/.zen/tmp/coucou/${MOATS}.myHOST.http
sed -i "s~http://127.0.0.1:1234~${myASTROPORT}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http sed -i "s~http://127.0.0.1:1234~${myASTROPORT}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http
sed -i "s~http://127.0.0.1:8080~${myHTTP}${myHOSTPort}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http sed -i "s~http://127.0.0.1:8080~${myIPFS}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http
sed -i "s~:12345~:${PORT}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http sed -i "s~:12345~:${PORT}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http
sed -i "s~_SESSIONLNK_~${myHTTP}${myHOSTPort}/ipns/${SESSIONNS}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http sed -i "s~_SESSIONLNK_~${myIPFS}/ipns/${SESSIONNS}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http
sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http ## NODE PUBLISH sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http ## NODE PUBLISH
sed -i "s~_HOSTNAME_~$(hostname)~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http ## HOSTNAME sed -i "s~_HOSTNAME_~$(hostname)~g" ~/.zen/tmp/coucou/${MOATS}.myHOST.http ## HOSTNAME
@ -125,14 +132,14 @@ while true; do
HOST=$(echo "$HOSTP" | cut -d ':' -f 1) HOST=$(echo "$HOSTP" | cut -d ':' -f 1)
## TODO APPLY GENERAL isLAN or zen !isLAN CALACULA>TONS ## TODO APPLY GENERAL isLAN or zen !isLAN CALACULA>TONS
[[ ! $isLAN || $USER == "zen" ]] && myHOST="$HOST" && myHOSTPort="ipfs.$HOST" && myHTTP="https://" && myASTROPORT="https://$HOST" ## WAN STATION [[ ! $isLAN || $USER == "zen" ]] && myHOST="$HOSTNAME" && myHOSTPort="ipfs.$HOSTNAME" && myHTTP="https://" && myASTROPORT="https://$HOSTNAME" ## WAN STATION
############################################################################ ############################################################################
[[ $URL == "/test" || $URL == "" ]] && continue [[ $URL == "/test" || $URL == "" ]] && continue
echo "************************************************************************* " echo "************************************************************************* "
echo "ASTROPORT 1234 UP & RUNNING.......................... ${myHTTP}$HOST:1234 PORT" echo "ASTROPORT 1234 UP & RUNNING.......................... http://$HOST:1234 PORT"
echo "${MOATS} NEXT COMMAND DELIVERY PAGE ${myHTTP}$HOST:${PORT}" echo "${MOATS} NEXT COMMAND DELIVERY PAGE http://$HOST:${PORT}"
[[ $XDG_SESSION_TYPE == 'x11' ]] && espeak "Ding" >/dev/null 1>&2 [[ $XDG_SESSION_TYPE == 'x11' ]] && espeak "Ding" >/dev/null 1>&2
@ -144,14 +151,14 @@ while true; do
############################################################################ ############################################################################
## / CONTACT ## / CONTACT
if [[ $URL == "/" ]]; then if [[ $URL == "/" ]]; then
echo "/ CONTACT : ${myHTTP}$HOSTP" echo "/ CONTACT : $HOSTP"
echo "___________________________ Preparing default return register.html" echo "___________________________ Preparing default return register.html"
echo "$HTTPCORS" > ~/.zen/tmp/coucou/${MOATS}.index.redirect ## HTTP 1.1 HEADER + HTML BODY echo "$HTTPCORS" > ~/.zen/tmp/coucou/${MOATS}.index.redirect ## HTTP 1.1 HEADER + HTML BODY
sed "s~http://127.0.0.1:1234~${myASTROPORT}~g" $HOME/.zen/Astroport.ONE/templates/register.html >> ~/.zen/tmp/coucou/${MOATS}.index.redirect sed "s~http://127.0.0.1:1234~${myASTROPORT}~g" $HOME/.zen/Astroport.ONE/templates/register.html >> ~/.zen/tmp/coucou/${MOATS}.index.redirect
sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect
sed -i "s~_HOSTNAME_~$(hostname)~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect sed -i "s~_HOSTNAME_~$(hostname)~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect
sed -i "s~http://127.0.0.1:8080~${myHTTP}${myHOSTPort}~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect sed -i "s~http://127.0.0.1:8080~${myIPFS}~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect
## Random Background image ;) ## Random Background image ;)
@ -307,7 +314,7 @@ while true; do
### REPONSE=$(echo https://www.gchange.fr/#/app/user/${G1PUB}/ | ipfs add -q) ### REPONSE=$(echo https://www.gchange.fr/#/app/user/${G1PUB}/ | ipfs add -q)
### ipfs name publish --allow-offline --key=${PORT} /ipfs/$REPONSE ### ipfs name publish --allow-offline --key=${PORT} /ipfs/$REPONSE
### echo "SESSION ${myHTTP}${myHOST}:8080/ipns/$SESSIONNS " ### echo "SESSION ${myIPFS}/ipns/$SESSIONNS "
( (
cat ~/.zen/tmp/coucou/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 cat ~/.zen/tmp/coucou/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1
${MY_PATH}/tools/TW.cache.sh ${ASTRONAUTENS} ${MOATS} ${MY_PATH}/tools/TW.cache.sh ${ASTRONAUTENS} ${MOATS}
@ -495,9 +502,9 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
cat ~/.zen/tmp/${IPFSNODEID}/_timings | tail -n 1 cat ~/.zen/tmp/${IPFSNODEID}/_timings | tail -n 1
) & ) &
echo "$HTTPCORS - <meta http-equiv='refresh' content='3; url=\"http://"${myHOST}":8080/ipns/"$ASTRONAUTENS"\"'/> echo "$HTTPCORS - <meta http-equiv='refresh' content='3; url=\""${myIPFS}"/ipns/"$ASTRONAUTENS"\"'/>
<h1>BOOTING - ASTRONAUT $PSEUDO </h1> IPFS FORMATING - [$SALT + $PEPPER] (${EMAIL}) <h1>BOOTING - ASTRONAUT $PSEUDO </h1> IPFS FORMATING - [$SALT + $PEPPER] (${EMAIL})
<br>- TW - http://${myHOST}:8080/ipns/$ASTRONAUTENS <br> - GW - /ipns/$IPFSNODEID" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 & <br>- TW - ${myIPFS}/ipns/$ASTRONAUTENS <br> - GW - /ipns/$IPFSNODEID" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
continue continue
else else

View File

@ -37,44 +37,45 @@ MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
## CREATE APP NODE PLAYER PUBLICATION DIRECTORY ## CREATE APP NODE PLAYER PUBLICATION DIRECTORY
################################################################### ###################################################################
mkdir -p $HOME/.zen/tmp/$IPFSNODEID/G1CopierYoutube/$PLAYER/ mkdir -p $HOME/.zen/tmp/$IPFSNODEID/G1CopierYoutube/$PLAYER/
mkdir -p $HOME/.zen/game/players/$PLAYER/G1CopierYoutube/
################################################################### ###################################################################
## tag[CopierYoutube] EXTRACT ~/.zen/tmp/CopierYoutube.json FROM TW ## tag[CopierYoutube] EXTRACT ~/.zen/tmp/CopierYoutube.json FROM TW
################################################################### ###################################################################
rm -f ~/.zen/tmp/CopierYoutube.json rm -f ~/.zen/game/players/$PLAYER/G1CopierYoutube/CopierYoutube.json
tiddlywiki --load ${INDEX} \ tiddlywiki --load ${INDEX} \
--output ~/.zen/tmp \ --output ~/.zen/game/players/$PLAYER/G1CopierYoutube \
--render '.' 'CopierYoutube.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[CopierYoutube]]' --render '.' 'CopierYoutube.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[CopierYoutube]]'
echo "DEBUG : cat ~/.zen/tmp/CopierYoutube.json | jq -r" echo "DEBUG : cat ~/.zen/game/players/$PLAYER/G1CopierYoutube/CopierYoutube.json | jq -r"
BROWSER=$(xdg-settings get default-web-browser | cut -d '.' -f 1 | cut -d '-' -f 1) ## GET cookies-from-browser BROWSER=$(xdg-settings get default-web-browser | cut -d '.' -f 1 | cut -d '-' -f 1) ## GET cookies-from-browser
################################################################### ###################################################################
## URL EXTRACTION & yt-dlp.cache.$PLAYER upgrade ## URL EXTRACTION & yt-dlp.cache.$PLAYER upgrade
for YURL in $(cat ~/.zen/tmp/CopierYoutube.json | jq -r '.[].text' | grep 'http'); do for YURL in $(cat ~/.zen/game/players/$PLAYER/G1CopierYoutube/CopierYoutube.json | jq -r '.[].text' | grep 'http'); do
echo "Detected $YURL" echo "Detected $YURL"
echo "Extracting video playlist into yt-dlp.cache.$PLAYER" echo "Extracting video playlist into yt-dlp.cache.$PLAYER"
### yt-dlp.command ### yt-dlp.command
CMD=$(cat ~/.zen/tmp/$IPFSNODEID/yt-dlp.command 2>/dev/null | grep "$YURL" | tail -n 1) CMD=$(cat ~/.zen/game/players/$PLAYER/G1CopierYoutube/yt-dlp.command 2>/dev/null | grep "$YURL" | tail -n 1)
if [[ ! $CMD ]]; then if [[ ! $CMD ]]; then
echo "$PLAYER&$YURL:$MOATS" >> ~/.zen/tmp/$IPFSNODEID/yt-dlp.command echo "$PLAYER&$YURL:$MOATS" >> ~/.zen/game/players/$PLAYER/G1CopierYoutube/yt-dlp.command
echo "NOUVEAU CANAL $PLAYER&$YURL:$MOATS" echo "NOUVEAU CANAL $PLAYER&$YURL:$MOATS"
else else
lastrun=$(echo "$CMD" | rev | cut -d ':' -f 1 | rev) && echo "$CMD" lastrun=$(echo "$CMD" | rev | cut -d ':' -f 1 | rev) && echo "$CMD"
duree=$(expr ${MOATS} - $lastrun) duree=$(expr ${MOATS} - $lastrun)
[[ ! $lastrun ]] && echo "$PLAYER&$YURL:$MOATS" >> ~/.zen/tmp/$IPFSNODEID/yt-dlp.command && duree=604800000 [[ ! $lastrun ]] && echo "$PLAYER&$YURL:$MOATS" >> ~/.zen/game/players/$PLAYER/G1CopierYoutube/yt-dlp.command && duree=604800000
# ONE WEEK NEW SCAN # ONE WEEK NEW SCAN
if [[ duree -ge 604800000 ]]; then if [[ duree -ge 604800000 ]]; then
yt-dlp --cookies-from-browser $BROWSER --print "%(id)s&%(webpage_url)s" "${YURL}" >> ~/.zen/tmp/$IPFSNODEID/yt-dlp.cache.$PLAYER yt-dlp --cookies-from-browser $BROWSER --print "%(id)s&%(webpage_url)s" "${YURL}" >> ~/.zen/game/players/$PLAYER/G1CopierYoutube/yt-dlp.cache.$PLAYER
fi fi
fi fi
done # FINISH YURL loop done # FINISH YURL loop
## SORT UNIQ ~/.zen/tmp/$IPFSNODEID/yt-dlp.cache.$PLAYER ## CREATE SORT UNIQ ~/.zen/tmp/$IPFSNODEID/yt-dlp.cache.$PLAYER (12345 ONLINE)
cat ~/.zen/tmp/$IPFSNODEID/yt-dlp.cache.$PLAYER | sort | uniq > ~/.zen/tmp/yt-dlp.cache cat ~/.zen/game/players/$PLAYER/G1CopierYoutube/yt-dlp.cache.$PLAYER | sort | uniq > ~/.zen/tmp/yt-dlp.cache
cp ~/.zen/tmp/yt-dlp.cache ~/.zen/tmp/$IPFSNODEID/yt-dlp.cache.$PLAYER cp ~/.zen/tmp/yt-dlp.cache ~/.zen/tmp/$IPFSNODEID/yt-dlp.cache.$PLAYER
## UPDATE GLOBAL WITH PLAYER & SWARM yt-dlp NEEDS ## UPDATE GLOBAL WITH PLAYER & SWARM yt-dlp NEEDS
@ -110,7 +111,7 @@ if [[ ! ${TIDDLER} ]]; then
################################################################### ###################################################################
ZYURL=$(echo "$LINE" | cut -d '&' -f 2-) ZYURL=$(echo "$LINE" | cut -d '&' -f 2-)
echo "COPIE : $ZYURL" echo "COPIE : $ZYURL"
[[ $boucle == 13 ]] && echo "MAXIMUM COPY REACHED" && continue [[ $boucle == 13 ]] && echo "MAXIMUM COPY REACHED FOR TODAY" && continue
TITLE="$(yt-dlp --cookies-from-browser $BROWSER --print "%(title)s" "${ZYURL}")" TITLE="$(yt-dlp --cookies-from-browser $BROWSER --print "%(title)s" "${ZYURL}")"
TITLE=${TITLE//[^A-zÀ-ÿ0-9 ]/} TITLE=${TITLE//[^A-zÀ-ÿ0-9 ]/}
@ -128,14 +129,14 @@ if [[ ! ${TIDDLER} ]]; then
############################################################################# #############################################################################
## COPY FROM YOUTUBE (TODO DOUBLE COPY & MKV to MP4 OPTIMISATION) ## COPY FROM YOUTUBE (TODO DOUBLE COPY & MKV to MP4 OPTIMISATION)
## EXTRA PARAM TO TRY ## EXTRA PARAM TO TRY
# --cookies-from-browser browser (xdg-settings get default-web-browser) allow member copies # --write-subs --write-auto-subs --sub-langs "fr, en, en-orig" --embed-subs
# --dateafter DATE --download-archive myarchive.txt
yt-dlp -f "(bv*[ext=mp4][height<=720]+ba/b[height<=720])" \ yt-dlp -f "(bv*[ext=mp4][height<=720]+ba/b[height<=720])" \
--cookies-from-browser $BROWSER \ --cookies-from-browser $BROWSER \
--download-archive $HOME/.zen/.yt-dlp.list \ --download-archive $HOME/.zen/.yt-dlp.list \
-S "filesize:700M" --no-mtime --embed-thumbnail --add-metadata \ -S res,ext:mp4:m4a --recode mp4 --no-mtime --embed-thumbnail --add-metadata \
--write-subs --write-auto-subs --sub-langs "fr, en, en-orig" --embed-subs \
-o "$HOME/.zen/tmp/yt-dlp/$TITLE.%(ext)s" ${ZYURL} -o "$HOME/.zen/tmp/yt-dlp/$TITLE.%(ext)s" ${ZYURL}
################################################################################ ################################################################################
### ADAPT TO TW RYTHM (DELAY COPY?) ### ADAPT TO TW RYTHM (DELAY COPY?)
echo echo

View File

@ -3,7 +3,7 @@ COMPOSE_IGNORE_ORPHANS := true
DOCKER_IMAGES_MYOS := x2go:xfce-debian DOCKER_IMAGES_MYOS := x2go:xfce-debian
ENV_VARS += HOST_ASTROPORT_SERVICE_DOMAIN HOST_ASTROPORT_SERVICE_NAME HOST_ASTROPORT_SERVICE_1234_TAGS ENV_VARS += HOST_ASTROPORT_SERVICE_DOMAIN HOST_ASTROPORT_SERVICE_NAME HOST_ASTROPORT_SERVICE_1234_TAGS
HOST_ASTROPORT_SERVICE_DOMAIN ?= $(firstword $(DOMAIN)) HOST_ASTROPORT_SERVICE_DOMAIN ?= $(firstword $(DOMAIN))
HOST_ASTROPORT_SERVICE_NAME ?= astroport HOST_ASTROPORT_SERVICE_NAME ?= $(HOSTNAME)
HOST_ASTROPORT_SERVICE_1234_TAGS ?= $(call tagprefix,HOST_ASTROPORT,1234) HOST_ASTROPORT_SERVICE_1234_TAGS ?= $(call tagprefix,HOST_ASTROPORT,1234)
HOST_ASTROPORT_UFW_UPDATE := 1234/tcp 12245:12445/tcp 45720/tcp HOST_ASTROPORT_UFW_UPDATE := 1234/tcp 12245:12445/tcp 45720/tcp
MAKE_VARS += SSH_PORT User host MAKE_VARS += SSH_PORT User host

File diff suppressed because one or more lines are too long

View File

@ -1,113 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>[Astroport] Ouvrez votre TW :: Station _HOSTNAME_ (_IPFSNODEID_) </title>
<link rel="icon" type="image/png" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/logo.png" />
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/decoration.css" type="text/css" />
<link rel="stylesheet" href="http://127.0.0.1:8080/ipfs/QmaCh8mywWfxkXF3JziFzqZS6yZFo3eNS5fSfnzJqdSQvX/layout.css" type="text/css" />
</head>
<body>
<header>
<h6>
<a href="http://127.0.0.1:1234/"> <span>"Astroport /ipfs/"</span></a> (TW)
</h6>
</header>
<main>
<center>
<b>--- Astronaute ---</b><br>
Créez votre TW sur IPFS<br>
<h2>Astroport Ŋ1 Swarm#0</h2>
<form id="formlink" action = "http://127.0.0.1:1234" method = "GET">
<br>
<b>Associez vos phrases clefs à une adresse email</b></br></br>
Phrase Une ("identifiant") <input name=salt value=''></br>
Phrase Deux ("mot de passe") <input name=pepper value=''></br></br>
Accepter la déléguation de votre clef jusqu'à 20h12 : <input type="checkbox" id="g1pub" name="g1pub"></br></br>
Email : <input name=email value=''></br></br>
<input type='submit' value='CREER VOTRE TW'>
</form>
<p>
<b>Besoin d'aide ? Contactez support@qo-op.com</b>
</p>
</center>
<article>
<div class="row justify-center">
<h1 class="video-title">
<a href="https://git.p2p.legal/qo-op/Astroport.ONE" target="code">'Astroport' opère une digitalisation 100% blockchain</a>.<br>
<a target="code" href="http://opencollective.com/monnaie-libre/projects/bunker-box">Copiez, conservez, partagez, diffusez vos chaines multimédia et json dans IPFS, entre amis!<br>
Prenez possession de votre TW. Rendez in-censurable, in-arrêtable la liberté d'expression.</a>
</h1>
</div>
</article>
<article>
<div class="row justify-center">
</div>
</article>
<article>
<div class="row justify-center">
<p><h3> >>> Reformons INTERNET - Installez IPFS - Activez <a href="https://git.p2p.legal/qo-op/Astroport.ONE" target="code"><b>Astroport.ONE</b></a> <<< </h3>
<ul>
<li>Installez 'go-ipfs' <a href="https://docs.ipfs.tech/install/command-line/#official-distributions" target="code">KUBO</a> sur votre système</li>
<li>Ajoutez <a href="https://docs.ipfs.tech/install/ipfs-companion/" target="code"><b>ipfs-companion</b></a> à votre navigateur</li>
</ul>
</p>
</div>
</article>
<center>
<h6>
<a href="http://madeinzion.org"> Made In Zion _\/_ </a> powered by <a href="http://astroport.com"><span>"</span>Astroport<span>"</span></a>
</h6>
</center>
</main>
</body>
<script>
var arrTimes = [];
var i = 0; // start
var timesToTest = 3;
var tThreshold = 300; //ms
var testImage = "http://libra.copylaradio.com:8080/ipfs/QmUUyiuCM4yXgaeGyqC2SVUUXZksuxhDfHQYpUpZPuL2oS/astroport.jpg"; // small image in your server
var dummyImage = new Image();
var isConnectedFast = false;
testLatency(function(avg){
isConnectedFast = (avg <= tThreshold);
/** output */
document.body.appendChild(
document.createTextNode("Time: " + (avg.toFixed(2)) + "ms - Bunker BOX ready ? " + isConnectedFast)
);
});
/** test and average time took to download image from server, called recursively timesToTest times */
function testLatency(cb) {
var tStart = new Date().getTime();
if (i<timesToTest-1) {
dummyImage.src = testImage + '?t=' + tStart;
dummyImage.onload = function() {
var tEnd = new Date().getTime();
var tTimeTook = tEnd-tStart;
arrTimes[i] = tTimeTook;
testLatency(cb);
i++;
};
} else {
/** calculate average of array items then callback */
var sum = arrTimes.reduce(function(a, b) { return a + b; });
var avg = sum / arrTimes.length;
cb(avg);
}
}
</script>
</html>

View File

@ -76,7 +76,7 @@ p=0;Ei(69,e|0,28,i|0,r|0);Be=p;p=0;if(Be&1)break;p=0;Ge(45,u|0,18,f|0,a|0,t|0,n|
scanner.addListener('scan', function (content) { scanner.addListener('scan', function (content) {
$.ajax({ $.ajax({
url: "http://127.0.0.1:1234", url: "http://astroport.localhost:1234",
data: "qrcode="+content, data: "qrcode="+content,
type: 'GET' type: 'GET'
}); });
@ -105,11 +105,12 @@ p=0;Ei(69,e|0,28,i|0,r|0);Be=p;p=0;if(Be&1)break;p=0;Ge(45,u|0,18,f|0,a|0,t|0,n|
</script> </script>
<h2>Astronaute - Activez votre TW - </h2> <h2> - Activez TW - </h2>
<form action = "http://127.0.0.1:1234" method = "GET"> <form action = "http://astroport.localhost:1234" method = "GET" >
Phrase Une : <input name=salt value=''></br>
Phrase Deux : <input name=pepper value=''></br>
URL : <input name=g1pub value=''></br>
Email : <input name=email value=''></br> Email : <input name=email value=''></br>
Phrase Une : <input name=ph1 value=''></br>
Phrase Deux : <input name=ph2 value=''></br>
<input type='submit' value='OK'> <input type='submit' value='OK'>
</form> </form>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -115,8 +115,12 @@ do
-k ~/.zen/game/players/${PLAYER}/secret.dunikey \ -k ~/.zen/game/players/${PLAYER}/secret.dunikey \
-n "https://data.gchange.fr" \ -n "https://data.gchange.fr" \
stars -p ${liking_me} > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/${liking_me}.Gstars.json stars -p ${liking_me} > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/${liking_me}.Gstars.json
## ZOMBIE PROTECTION
[[ "$?" == "0" && ! -s ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/${liking_me}.Gstars.json ]] && rm -Rf ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me} && echo "${liking_me} is a ZOMBIE..." && continue ## ZOMBIE PROTECTION - PURGE AFTER 60 DAYS
find ~/.zen/game/players/${PLAYER}/FRIENDS/*.try -mtime +60 -type f -exec rm -f '{}' \;
try=$(cat ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}.try 2>/dev/null)
[[ $try > 3 ]] && echo "${liking_me} TOO MANY TRY" && continue
#### RECUP ANNONCES Gchange #### RECUP ANNONCES Gchange
## https://www.gchange.fr/#/app/records/wallet?q=2geH4d2sndR47XWtfDWsfLLDVyNNnRsnUD3b1sk9zYc4&old ## https://www.gchange.fr/#/app/records/wallet?q=2geH4d2sndR47XWtfDWsfLLDVyNNnRsnUD3b1sk9zYc4&old
@ -149,13 +153,13 @@ do
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); 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);
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/$FRIENDNS" echo "$LIBRA/ipns/$FRIENDNS"
echo "http://$myIP:8080/ipns/$FRIENDNS ($YOU)" echo "http://$myIP:8080/ipns/$FRIENDNS ($FRIENDTITLE)"
# DISPLAY TIMER # DISPLAY TIMER
${MY_PATH}/displaytimer.sh 17 & ${MY_PATH}/displaytimer.sh 60 &
[[ $YOU ]] && ipfs --timeout 17s cat /ipns/$FRIENDNS > ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html [[ $YOU ]] && ipfs --timeout 60s cat /ipns/$FRIENDNS > ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html
[[ ! -s ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html ]] && curl -m 17 -so ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html "$LIBRA/ipns/$FRIENDNS" [[ ! -s ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html ]] && curl -m 60 -so ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html "$LIBRA/ipns/$FRIENDNS"
## PLAYER TW EXISTING ? ## PLAYER TW EXISTING ?
if [ ! -s ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html ]; then if [ ! -s ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html ]; then
@ -164,26 +168,34 @@ do
echo "AUCUN TW ACTIF. PREVENONS LE" echo "AUCUN TW ACTIF. PREVENONS LE"
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" send -d "${liking_me}" -t "HEY BRO !" -m "G1 TW BunkerBOX >>> (⌐■_■) <<< https://ipfs.copylaradio.com/ipns/$ASTRONAUTENS >>> (ᵔ◡◡ᵔ) <<< " $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" send -d "${liking_me}" -t "HEY BRO !" -m "G1 TW BunkerBOX >>> (⌐■_■) <<< https://ipfs.copylaradio.com/ipns/$ASTRONAUTENS >>> (ᵔ◡◡ᵔ) <<< "
## I TRY
try=$((try+1)) && echo $try > ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}.try
else else
echo "COOL MON AMI EST SUR IPFS"
FTW="~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html" FTW="~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html"
echo "COOL MON AMI PUBLIE SUR IPFS : $FTW"
tiddlywiki --load ${FTW} --output ~/.zen/tmp --render '.' "${liking_me}.MadeInZion.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion' tiddlywiki --load ${FTW} --output ~/.zen/tmp --render '.' "${liking_me}.MadeInZion.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion'
[[ ! -s ~/.zen/tmp/${liking_me}.MadeInZion.json ]] && echo "~~~ BROKEN $FTW (☓‿‿☓) ~~~" && continue [[ ! -s ~/.zen/tmp/${liking_me}.MadeInZion.json ]] && echo "~~~ BROKEN $FTW (☓‿‿☓) BAD ~/.zen/tmp/${liking_me}.MadeInZion.json ~~~" && continue
FPLAYER=$(cat ~/.zen/tmp/${liking_me}.MadeInZion.json | jq -r .[].player) FPLAYER=$(cat ~/.zen/tmp/${liking_me}.MadeInZion.json | jq -r .[].player)
[[ ! $FPLAYER ]] && echo "NO PLAYER = BAD MadeInZion Tiddler" && continue [[ ! $FPLAYER ]] && echo "NO PLAYER = BAD MadeInZion Tiddler" && continue
## CREATING 30 DAYS RSS STREAM ## CREATING 30 DAYS RSS STREAM
tiddlywiki --load ${FTW} \ tiddlywiki --load ${FTW} \
--output ~/.zen/game/players/${PLAYER}/ipfs --render '.' "${FPLAYER}.rss.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[days:created[-30]]' --output ~/.zen/game/players/${PLAYER}/ipfs --render '.' "${FPLAYER}.rss.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[days:created[-30]]'
[[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.rss.json ]] && echo "NO ${FPLAYER} RSS - CONTINUE -" && continue [[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.rss.json ]] && echo "NO ${FPLAYER} RSS - BAD ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.rss.json -" && continue
echo "DEBUG RSS : cat ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.rss.json | jq -r"
echo
tiddlywiki --load ${FTW} \ tiddlywiki --load ${FTW} \
--output ~/.zen/game/players/${PLAYER}/ipfs --render '.' "${FPLAYER}.lightbeam-key.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key' --output ~/.zen/game/players/${PLAYER}/ipfs --render '.' "${FPLAYER}.lightbeam-key.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key'
[[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.lightbeam-key.json ]] && echo "NO ${FPLAYER} lightbeam-key - CONTINUE -" && continue [[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.lightbeam-key.json ]] && echo "NO ${FPLAYER} lightbeam-key - CONTINUE -" && continue
ASTRONAUTEFEED=$(cat ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.lightbeam-key.json | jq -r .[].text) ASTRONAUTEFEED=$(cat ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.lightbeam-key.json | jq -r .[].text)
echo "DEBUG LIGHTBEAM : cat ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.lightbeam-key.json | jq -r"
echo
## ADD THIS FPLAYER RSS FEED INTO PLAYER TW ## ADD THIS FPLAYER RSS FEED INTO PLAYER TW
## PUSH DATA TO 12345 SWARM KEY ## PUSH DATA TO 12345 SWARM KEY
mkdir -p ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER} mkdir -p ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}
@ -192,12 +204,12 @@ do
export FRIENDSFEEDS="$ASTRONAUTEFEED\n$FRIENDSFEEDS" export FRIENDSFEEDS="$ASTRONAUTEFEED\n$FRIENDSFEEDS"
echo "$FRIENDSFEEDS" > ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/FRIENDSFEEDS echo "$FRIENDSFEEDS" > ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/FRIENDSFEEDS
echo "(☉_☉ ) (☉_☉ ) (☉_☉ )" $FRIENDSFEEDS echo "(☉_☉ ) (☉_☉ ) (☉_☉ ) : FRIENDSFEEDS=" $FRIENDSFEEDS
export IFRIENDHEAD="<a target='you' href='/ipns/"$FRIENDNS"'>$$FRIENDTITLE</a>$IFRIENDHEAD" export IFRIENDHEAD="<a target='you' href='/ipns/"$FRIENDNS"'>$$FRIENDTITLE</a>$IFRIENDHEAD"
echo "$IFRIENDHEAD" > ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/IFRIENDHEAD echo "$IFRIENDHEAD" > ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/IFRIENDHEAD
echo "(☉_☉ ) (☉_☉ ) (☉_☉ )" $IFRIENDHEAD echo "(☉_☉ ) (☉_☉ ) (☉_☉ ) : IFRIENDHEAD=" $IFRIENDHEAD
echo "APP=RSS : PLAYER FPLAYER RSS PUBLICATION READY" echo "APP=RSS : PLAYER FPLAYER RSS PUBLICATION READY"
@ -206,7 +218,7 @@ do
fi fi
## ACTIVER RECUP ANNONCES... ## ACTIVER RECUP ANNONCES...
# SCRAPING DONNE LE BON COIN # SCRAPING DONNE LE BON COIN - DIFFICILE - UTILISER COOKIE NAVIGATEUR
# https://www.leboncoin.fr/recherche?text=donne&locations=Toulouse__43.59743304757555_1.4471155185604894_10000_5000&owner_type=private&sort=time&donation=1 # https://www.leboncoin.fr/recherche?text=donne&locations=Toulouse__43.59743304757555_1.4471155185604894_10000_5000&owner_type=private&sort=time&donation=1
## Get Ŋ2 LEVEL ## Get Ŋ2 LEVEL
@ -221,9 +233,12 @@ do
done done
else else
#########################################
## COOL FEATURE FOR GCHANGE ACCOUNT CONFIDENCE
## IS IT REALLY A FRIEND I LIKE ?
echo "BRO?" echo "BRO?"
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" send -d "${G1PUB}" -t "Bro ?" -m "https://www.gchange.fr/#/app/user/${liking_me}/" $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" send -d "${G1PUB}" -t "Bro ?" -m "https://www.gchange.fr/#/app/user/${liking_me}/"
try=$((try+1)) && echo $try > ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}.try
fi fi