Astroport.ONE/README.md

383 lines
15 KiB
Markdown
Raw Normal View History

2023-02-25 18:30:03 +01:00
# Préambule - [read this introduction in english](https://github.com/papiche/Astroport.ONE/blob/master/README.en.md) -
2022-03-14 00:17:44 +01:00
Quand pourrons nous sortir de ce Méchant Cloud qui nous profile, nous scrute, nous analyse... Pour au final nous faire consommer.
Je n'ai pas suivi la formation dingénieur réseau pour fabriquer ça!
Alors j'ai fait autre chose.
2022-10-30 03:23:01 +01:00
Astroport est contruit sur IPFS pour former nos Cloud personnels échangés entre amis d'amis à labri des algorithmes de l'IA et du datamining sauvage qui règne ici bas.
2022-03-14 00:17:44 +01:00
L'avantage de ce système, une consommation énergétique divisé par 100, une répartition des données qui permet de fonctionner déconnecté, un système d'information pair à pair inaltérable, inviolable.
S'il vous plaît arrêtons cet Internet Supermarché de nous même...
C'est une bibliothèque du savoir à la base.
2022-12-26 19:17:52 +01:00
## https://astroport.com
2022-03-14 00:17:44 +01:00
Avec cette technologie, nous devenons chacun hébergeur et fournisseur d'accès, souverain monétaire et médiatique.
2023-01-20 18:56:17 +01:00
Avec cette technologie, nous établissons le "Crypto Département 96" dont la carte relie les territoires au delà des frontières et des pays.
2022-10-30 03:23:01 +01:00
**Astroport ONE propulse un monde numérique fait de toiles confiances interconnectées**
2022-03-14 00:17:44 +01:00
# Astroport.ONE
Chaque Station "Astroport.ONE" est une ambassade numérique qui dialogue et se synchronise avec ses pairs.
Les utilisateurs peuvent "déplacer leur compte". La dernière utilisée dans la journée devient "station officielle".
L'architecture attachée à chaque clefs publiques se déploie et en forme de "pétales de fleur" selon les cercles de confiance Ŋ1 et Ŋ2.
Des clefs dérivées sont crées pour exporter et explorer les "G1MotsClefs" associés au Tiddlers.
A chaque copie le tiddlers reçoit une nouvelle signature et déclenche le processus "G1PalPay".
[DOCUMENTATION](https://pad.p2p.legal/s/Astroport.ONE)
2022-12-26 19:14:54 +01:00
# INSTALLATION (Linux Mint / Ubuntu / DEBIAN)
2022-03-04 00:01:58 +01:00
2022-08-24 15:46:02 +02:00
```
# GIT.P2P.LEGAL
2022-08-24 15:46:02 +02:00
bash <(wget -qO- https://git.p2p.legal/qo-op/Astroport.ONE/raw/branch/master/install.sh)
# GITHHUB
bash <(wget -qO- https://raw.githubusercontent.com/papiche/Astroport.ONE/master/install.sh)
2022-08-24 15:46:02 +02:00
```
2022-03-04 00:01:58 +01:00
2022-10-27 14:13:02 +02:00
# LANCEMENT
Après l'installation, rendez-vous sur http://astroport.localhost:1234
2022-12-05 13:22:18 +01:00
2022-12-26 19:14:54 +01:00
## Comment Activer votre "Astroport" !
2023-01-07 19:19:33 +01:00
Commencez par créer (ou importer) un premier compte.
2023-01-07 19:19:33 +01:00
```
~/.zen/Astroport.ONE/command.sh
```
Permet la Gestion des PLAYER (et des G1VoeuX) en mode CLI
2022-12-04 23:02:09 +01:00
# "OPEN API" : "♥BOX"
2023-01-12 16:20:47 +01:00
## http://astroport.localhost:1234
2022-12-26 19:17:52 +01:00
2023-03-31 17:47:28 +02:00
Une fois votre Station Astroport démarrée:
* le port 1234 publie API (REPONSE PORT TCP 12145 à 12445 )
* le port 12345 publie MAP(*) (CARTE DE L'ESSAIM - BOOTSTRAP / STATIONS)
2023-03-26 19:02:01 +02:00
* le port 33101 publie G1BILLETS (REPONSE PORT TCP 33102)
2022-12-26 19:17:52 +01:00
2023-03-31 17:47:28 +02:00
* le port 8080, 4001 et 5001 sont ceux de la passerelle IPFS
2023-03-26 19:02:01 +02:00
⚠ ASTROPORT NETCAT SYSTEM ⚠
2022-12-26 19:17:52 +01:00
Astroport utilise l'outil réseau le plus simple "netcat". Il s'agit d'un moteur STEP donnant accès à une "OPEN API".
Notre programme est conçu pour fonctionner dans des conditions de réseau local.
Le premier HTTP GET envoie la commande, mais l'APP doit obtenir le PORT de réponse.
Voici comment procéder en BASH ou JAVASCRIPT
2023-01-20 20:56:42 +01:00
## RECUPERATION DU PORT DE REPONSE API : (◕‿‿◕)
2023-03-01 03:19:05 +01:00
### CLI
2023-01-20 20:56:42 +01:00
```
2023-01-21 13:51:44 +01:00
# PLAYER COPIER "_URL_" FAVORITE
curl -so ~/.zen/tmp/${MOATS}/astro.port "http://astroport.localhost:1234/?salt=0&pepper=0&g1pub=_URL_&email=${EMAIL}"
2023-01-20 20:56:42 +01:00
TELETUBE=$(cat ~/.zen/tmp/${MOATS}/astro.port | grep "(◕‿‿◕)" | cut -d ':' -f 2 | cut -d '/' -f 3)
TELEPORT=$(cat ~/.zen/tmp/${MOATS}/astro.port | grep "(◕‿‿◕)" | cut -d ':' -f 3 | cut -d '"' -f 1)
sleep 30
2023-01-21 13:51:44 +01:00
# RECUPERER SON JETON PLAYER
2023-01-20 20:56:42 +01:00
curl -so ~/.zen/tmp/${MOATS}/astro.rep "http://$TELETUBE:$TELEPORT"
```
2023-03-01 03:19:05 +01:00
### JS
Exemple :
2023-03-01 03:19:05 +01:00
```
var myURL = 'http://astroport.localhost:1234/?' + query;
async function fetchAstroport(myURL) {
try {
let one = await fetch(myURL); // Gets a promise
var doc = await one.text();
var regex = /url='([^']+)/i; // Get response PORT
var redirectURL = doc.match(regex)[1]
console.log(redirectURL)
setTimeout(function() {
// let two = await fetch(redirectURL);
// document.mydiv.innerHTML = await two.text(); // Replaces body with response
window.open( redirectURL, "AstroTab");
}, 5000);
} catch (err) {
console.log('Fetch error:' + err); // Error handling
}
}
```
2023-01-20 18:56:17 +01:00
Nous utilisons "astro.js" dans l'Application DEMO
```
2023-04-15 15:45:23 +02:00
<script src="http://127.0.0.1:8080/ipfs/Qmae5v9zydax9u6C9ceDijURu5PYdd5avmv4NkenCw7RFv/astro.js"></script>
```
2023-01-20 18:56:17 +01:00
## ➤ PRIVATE ZONE (fonctionne sur toutes les Stations.)
2022-12-26 19:17:52 +01:00
### ```/?salt=${SALT}&pepper=${PEPPER}&${APPNAME}=${WHAT}&${OBJ}=${VAL}...```
2023-04-14 17:42:58 +02:00
### Créer (ou téléporter) un PLAYER TW : OFFICIAL <3BOX :
2023-01-20 18:56:17 +01:00
```http
GET /?salt=${SALT}&pepper=${PEPPER}&g1pub=${URLENCODEDURL}&email=${PLAYER}
```
2022-12-28 14:28:31 +01:00
2023-01-20 18:56:17 +01:00
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `salt` | `string` | **Required**. Your passphrase one token |
| `pepper` | `string` | **Required**. Your passphrase two token |
2023-04-14 17:42:58 +02:00
| `g1pub` | `string` | **Required**. Your prefered _URL_ to copy video from |
| `email` | `email` | **Required**. Your email token |
2022-12-26 19:17:52 +01:00
### LOGOUT PLAYER (remove IPNS keys from Station)
```http
GET /?salt=${SALT}&pepper=${PEPPER}&logout=${PLAYER}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `salt` | `string` | **Required**. Your passphrase one token |
| `pepper` | `string` | **Required**. Your passphrase two token |
2023-04-14 17:42:58 +02:00
| `logout` | `string` | **Required**. Your email token |
### LOGIN PLAYER (Activate IPNS keys on Station)
```http
GET /?salt=${SALT}&pepper=${PEPPER}&login=${PLAYER}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `salt` | `string` | **Required**. Your passphrase one token |
| `pepper` | `string` | **Required**. Your passphrase two token |
2023-04-14 17:42:58 +02:00
| `login` | `string` | **Required**. Your email token |
2023-03-11 14:29:27 +01:00
### Définir le niveau ★ accordé à un "g1friend"
```http
GET /?salt=${SALT}&pepper=${PEPPER}&friend=${G1PUB}&stars=${1:5}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `salt` | `string` | **Required**. Your passphrase one token |
| `pepper` | `string` | **Required**. Your passphrase two token |
| `friend` | `string` | **Required**. G1PUB token of friend |
| `stars` | `number` | **Required**. Number between 1 to 5 |
2022-12-28 14:28:31 +01:00
2023-04-14 17:42:58 +02:00
### Lire Messagerie de la base "GChange"
2023-01-20 18:56:17 +01:00
```http
GET /?salt=${SALT}&pepper=${PEPPER}&messaging=on
```
2022-12-26 19:17:52 +01:00
2023-01-20 18:56:17 +01:00
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `salt` | `string` | **Required**. Your passphrase one token |
| `pepper` | `string` | **Required**. Your passphrase two token |
| `messaging` | `string` | **Required**. (on=json) output type |
2022-12-28 14:28:31 +01:00
2023-01-20 18:56:17 +01:00
### Conversion vers adresse IPNS
```http
GET /?salt=${SALT}&pepper=${PEPPER}&getipns=on
```
2022-12-26 19:17:52 +01:00
2023-01-20 18:56:17 +01:00
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `salt` | `string` | **Required**. Your passphrase one token |
| `pepper` | `string` | **Required**. Your passphrase two token |
| `getipns` | `string` | **Required** on |
2022-12-28 14:28:31 +01:00
2023-01-20 18:56:17 +01:00
### AppName=testcraft : Enregistrer JSON
```http
GET /?salt=${SALT}&pepper=${PEPPER}&testcraft=json&nodeid=_&dataid=$QRHASH
```
2022-12-26 19:17:52 +01:00
2023-01-20 18:56:17 +01:00
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `salt` | `string` | **Required**. Your passphrase one token |
| `pepper` | `string` | **Required**. Your passphrase two token |
| `testcraft` | `string` | **Required** AppNAME subcommand |
| `${OBJ}` | `${VAL}` | depends on App |
2022-12-26 19:17:52 +01:00
2023-04-14 17:42:58 +02:00
This IPFS object transfer needs that the client is using well configured WebRTC/IPFS relays
Look for example in ```www/upload_to_astroport.html```
```
'/dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star',
'/dns4/wrtc-star2.sjc.dwebops.pub/tcp/443/wss/p2p-webrtc-star'
```
2023-03-26 20:46:27 +02:00
### Redirections
2022-12-26 19:17:52 +01:00
* vers Gchange
2022-12-28 14:28:31 +01:00
2022-12-26 19:17:52 +01:00
```/?salt=${SALT}&pepper=${PEPPER}&g1pub=on```
* vers TW
2022-12-28 14:28:31 +01:00
2022-12-26 19:17:52 +01:00
```/?salt=${SALT}&pepper=${PEPPER}&g1pub=astro```
2023-04-14 17:42:58 +02:00
### Déclencher un Payement de Ğ1 à une G1PUB
2023-03-13 02:19:37 +01:00
```http
GET /?salt=${SALT}&pepper=${PEPPER}&pay=1&g1pub=DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `salt` | `string` | **Required**. Your passphrase one token |
| `pepper` | `string` | **Required**. Your passphrase two token |
| `pay` | `integer` | **Required** G1 AMOUNT |
| `g1pub` | `G1PUB` | **Required** destination "wallet key" |
## ➤ PLAYER ZONE (API Station qui héberge ${PLAYER})
2023-01-20 18:56:17 +01:00
### ```/?player=${PLAYER}&${APPNAME}=${WHAT}&${OBJ}=${VAL}...```
2022-12-27 15:48:58 +01:00
2023-01-20 18:56:17 +01:00
### Exporter Tiddlers.json depuis son TW selon valeur des "tags" ( ici TAG=G1CopierYoutube)
```http
GET /?player=${PLAYER}&moa=json&tag=G1CopierYoutube
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `player` | `string` | **Required**. Your EMAIL token |
| `moa` | `string` | **Required** APP = output format |
| `tag` | `${VAL}` | TW filtering default G1CopierYoutube |
2022-12-28 14:28:31 +01:00
2022-12-28 14:27:01 +01:00
2023-04-14 17:42:58 +02:00
### Modifier URL du G1Voeu "G1CopierYoutube" du PLAYER
```http
GET /?player=${PLAYER}&youtube=URLENCODED
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `player` | `string` | **Required**. Your EMAIL token |
| `youtube` | `string` | **Required** URL = Video URL |
2023-04-14 17:42:58 +02:00
MORE TEST NEEDED
2022-12-26 19:17:52 +01:00
2023-02-11 21:48:26 +01:00
### QRCODE (API SandBox)
2023-01-20 18:56:17 +01:00
```http
2023-03-11 14:29:27 +01:00
GET /?qrcode=${G1PUB}
```
| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `qrcode` | `string` | **Required**. Your G1PUB token |
> Look for details & extend as you like in ~/.zen/Astroport.ONE/API/QRCODE.sh
2023-04-14 17:42:58 +02:00
ACTUAL BEHAVIOUR IS TO RECEIVE QRCODE VALUES
1) Is IPNS key & PLAYER is local ? Redirect to G1BILLET
2023-04-14 17:42:58 +02:00
2) Is G1*? Redirect to G1WishApp / Export Tags from TW
http://astroport.localhost:1234/?qrcode=G1Serie&tw=k51qzi5uqu5dgobi9ozzzvdftqfd3hd7a1488nzymky1edz8j779jov7sbemc0
redirect to
http://ipfs.localhost:8080/ipns/k51qzi5uqu5din47zmnzk6tmk1tjqaeaj9pbb3qilmstbsf9uyc12qpdmigtd3/
http://astroport.localhost:1234/?qrcode=G1G1Serie&tw=k51qzi5uqu5dgobi9ozzzvdftqfd3hd7a1488nzymky1edz8j779jov7sbemc0&json
redirect to pure "tag=" result json
2023-04-14 17:42:58 +02:00
3) Is G1PUB ...
2023-04-14 17:42:58 +02:00
### LOW RESSOURCE STATION CAN ACTIVATE LOW MODE (disable ipfs daemon)
2023-04-04 20:33:01 +02:00
```
2023-04-14 17:42:58 +02:00
~/.zen/Astroport.ONE/tools/cron_VRFY.sh LOW
2023-04-04 20:33:01 +02:00
sudo systemctl restart astroport.service
sudo systemctl restart g1billet.service
2023-04-04 20:33:01 +02:00
```
### STATION : Show Station PLAYER's G1 investments levels
```http
GET /?qrcode=station
2023-01-20 18:56:17 +01:00
```
2022-12-26 19:17:52 +01:00
2023-04-12 11:57:51 +02:00
### STATION MAP & PLAYER DATA PROPAGATION
Chaque Station collecte et publie sur sa clef "self" (/ipns/$IPFSNODEID) les liens vers le cache de l'ensemble de l'essaim
http://localhost:12345 renvoi un json
```
{
"created" : "202304111854481040",
"hostname" : "kitty.localhost",
"myIP" : "192.168.1.14",
"ipfsnodeid" : "12D3KooWK1ACupF7RD3MNvkBFU9Z6fX11pKRAR99WDzEUiYp5t8j",
"astroport" : "http://192.168.1.14:1234",
"g1station" : "http://ipfs.localhost:8080/ipns/12D3KooWK1ACupF7RD3MNvkBFU9Z6fX11pKRAR99WDzEUiYp5t8j",
"g1swarm" : "http://ipfs.localhost:8080/ipns/k51qzi5uqu5djv0qz9wkl8i94opzm62csh56mnp9zove8i543e4vv4cy9gvr1o"
}
```
| Parameter | Description |
| :-------- | :------- |
| created | date de creation du document |
| hostname | nom de la station |
| myIP | adresse IP de la station |
| ipfsnodeid | date de creation du document |
| astroport | Lien vers l'API de la station |
| g1station | Lien vers la carte PLAYER de la Station |
| g1swarm | Lien vers la carte des cartes des Stations de l'essaim |
Afin de propager la carte chaque Stations lors de son raffraichissement de cache demande aux Boostrap de la récupérer
```
STATION MAP UPSYNC : http://$nodeip:12345/?${GNODEID}=${IPFSNODEID}
```
2022-12-26 19:17:52 +01:00
2022-12-15 02:35:59 +01:00
# 20H12
2022-11-01 16:16:22 +01:00
Chaque jour, les ASTROBOTs captent les :star: de leurs PLAYERs puis exécutent le protocole de synchronisation Ŋ1
2022-12-15 02:35:59 +01:00
[20H12.sh](/qo-op/Astroport.ONE/src/branch/master/20h12.sh)
2022-11-01 16:16:22 +01:00
Ils analysent les données et extraient des flux json selon les G1Voeu présent dans chaque TW.
Le niveau informationnel de confiance exploré permet de proposer des alertes issues du niveau Ŋ2.
## EXEMPLE DE FLUX TW :
2022-11-01 16:16:22 +01:00
2023-01-07 19:19:33 +01:00
[![TW FEEDS](https://ipfs.copylaradio.com/ipfs/Qma9zvrYHGcUPisLKBcG9U9sktThX5VfVci8jfM8D9RspT)](https://pad.p2p.legal/s/G1TWFeed#)
2022-12-26 19:07:32 +01:00
# IPFS : UN STOCKAGE INALTERABLE ET INTELLIGENT
2022-10-30 03:23:01 +01:00
[![](http://ipfs.localhost:8080/ipfs/QmafsWdAeB5W9HcNPQWK2yjTgcW8eTxHoSD7bzE55mtrdP)
2022-10-30 03:23:01 +01:00
### "The Barefoot Architect" de Johan Van Lengen.
Lignes de commandes
```
ipfs ls Qme6a6RscGHTg4e1XsRrpRoNbfA6yojC6XNCBrS8nPSEox/
2022-12-10 22:10:31 +01:00
ipfs cat QmbfVUAyX6hsxTMAZY7MhvUmB3AkfLS7KqWihjGfu327yG > /tmp/vdoc.pub_the-barefoot-architect.pdf && xdg-open /tmp/vdoc.pub_the-barefoot-architect.pdf
2022-10-30 03:23:01 +01:00
```
Après un passage par [ajouter_media.sh](/qo-op/Astroport.ONE/src/branch/master/ajouter_media.sh)
2022-12-10 22:10:31 +01:00
Vos données son stockées [dans des Tiddlers](https://ipfs.copylaradio.com/ipns/k51qzi5uqu5dioeckikst5f8jw1tbljom6acjbw9zerl3671921krs4nm1531r#:[tag[G1Films]])
2022-10-30 03:23:01 +01:00
### Foret Enchantée - PROJET ASTROPORT.pdf
2022-12-04 19:12:02 +01:00
https://ipfs.copylaradio.com/ipfs/QmUtGpGeMZvwp47ftqebVmoFWCmvroy5wEtWsKvWvDWJpR
2022-10-30 03:23:01 +01:00
2022-05-10 00:37:10 +02:00
---
2022-03-04 00:01:58 +01:00
2023-01-07 19:19:33 +01:00
## SIMULATIONS LOOPY
2022-10-29 14:08:15 +02:00
> [Simulateur Astronaute/Voeux](https://ncase.me/loopy/v1.1/?data=[[[3,646,229,0.5,%22Astronaute%22,5],[4,806,372,0.16,%22G1Voeu%22,3],[5,449,133,0.83,%22G1Talent%22,1],[6,928,124,0.5,%22Astronaute%22,0],[7,1055,293,0.5,%22Astronaute%22,0],[8,883,587,0.5,%22Astronaute%22,0],[10,691,54,0.5,%22G1Voeu%22,3]],[[3,5,82,1,0],[3,4,-87,1,0],[6,4,83,1,0],[4,5,176,1,0],[8,8,85,1,12],[8,4,-45,1,0],[7,4,34,1,0],[5,3,49,1,0],[7,7,101,1,225],[6,6,113,1,-84],[3,3,90,1,75],[5,4,-293,1,0],[3,10,34,1,0]],[],10%5D)
2022-12-10 22:10:31 +01:00
> [Essaim Astroport.ONE](https://ncase.me/loopy/v1.1/?data=[[[1,419,351,1,%22Astroport.ONE%22,3],[2,506,530,1,%22Terrien%22,5],[3,499,95,1,%22IPFS%22,1],[4,272,225,1,%22Astroport.ONE%22,3],[5,620,297,0.16,%22Astroport.ONE%22,4],[7,927,69,0.66,%22Astroport.ONE%22,3],[8,798,175,0.66,%22Astroport.ONE%22,3]],[[2,1,94,-1,0],[1,2,89,1,0],[2,5,-122,1,0],[5,3,58,1,0],[3,5,25,1,0],[4,3,117,1,0],[3,4,-152,1,0],[1,3,60,1,0],[3,1,-18,1,0],[7,3,-44,1,0],[3,7,15,1,0],[8,3,37,1,0],[3,8,-47,1,0]],[[798,557,%22https%253A%252F%252Fipfs.copylaradio.com%253A1234%250A(salt%2520%252F%2520pepper%2520%252F%2520email)%2520%253D%2520TW%2520%252B%2520AstroBot%2520API%22],[256,141,%22Station%2520Officielle%250A(Bootstrap%2520%252B%2520RoundRobin%2520DNS)%22],[868,332,%22D%25C3%25A9l%25C3%25A9gation%2520de%2520clef%250A(Tiers%2520de%2520confiance)%22]],9%5D)
2022-10-29 14:08:15 +02:00
2022-12-16 15:26:01 +01:00
## Stargazers over time
[![Stargazers over time](https://starchart.cc/papiche/Astroport.ONE.svg)](https://starchart.cc/papiche/Astroport.ONE)