summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Schottelius <nico@nico-notebook.schottelius.org>2019-09-10 02:26:56 +0900
committerNico Schottelius <nico@nico-notebook.schottelius.org>2019-09-10 02:26:56 +0900
commit0bc99b0ace17890be6315aa79a1a794fa4aea639 (patch)
tree9ed093cfd50a1aad5775945a0d5ab049d456a6a0
parent4bb3b7918c3a709132ee015bac9691db8de820a7 (diff)
Add friend import-export
-rw-r--r--README.md35
-rwxr-xr-xrif-friendimportexport.sh20
2 files changed, 48 insertions, 7 deletions
diff --git a/README.md b/README.md
index 38e9b90..fcc6a13 100644
--- a/README.md
+++ b/README.md
@@ -159,6 +159,7 @@ curl -6 -s https://nico.ungleich.cloud/rifkeys | gpg --import
You can also use the included rif-importfriends.sh.
+
### Example: Updating your friends
Now that you have imported the friends of your friends, they have
@@ -178,17 +179,37 @@ gpg -a --export RIF > /var/www/html/rifkeys
Or use the included `rif-exportfriends.sh`
+### Example: Importing friends of all friends and exporting them
+
+From time to time you might want to checkup on which friends gained
+new friends and add them to your friend list. This is as easy as
+iterating over all your friends and importing their friends into your
+friends list. And because you are a good friend, you might want to
+export all friends again.
+
+To make things easy, the included a script `rif-friendimportexport.sh`
+automates this process.
+
+
### Example: Sending a message to a friend
-Simply use your mail program for that.
-And obviously enable signing & encrypting the email.
+You can probably just use your mail program for that - and you might
+even be able to send it IPv6 only!
+
+## Finding friends
+
+As real IPv6 friends are decentralised, there is no central registry
+of friends. Just startup the webserver on your machine, export your
+key(s) and ping your friend.
+With every friend that is added to your network, the reach grows in
+the chain of all friends of every friend!
-## To be added
+So just start in your small cycle and forward your friend URL to your
+friends!
-- advanced usage -> ipv6 email
-### CLI ideas
+## About
-- **rif prepare**: check webserver, keyring, etc.
-- **rif online**: check who is online
+Real IPv6 friend is a project launched by Nico Schottelius on 2019-09-10.
+If you want to become my friend, my friend URL is https://nico.ungleich.cloud.
diff --git a/rif-friendimportexport.sh b/rif-friendimportexport.sh
new file mode 100755
index 0000000..a248e2f
--- /dev/null
+++ b/rif-friendimportexport.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Nico Schottelius, 2019-09-10, Seoul
+
+tmp=$(mktemp)
+
+gpg --list-keys --with-colons | grep RIF | awk -F: '{ print $10 }' | sed 's/\\x3a/:/' | (
+ while read line
+ do
+ name=$(echo $line | sed 's/\(.*\)(.*/\1/')
+ url=$(echo $line | sed -e 's/.*(RIF //' -e 's/).*//')
+ keyurl=$url/rifkeys
+
+ echo "Getting friends from $name on $keyurl ..."
+ curl -6 -s "$keyurl" >> $tmp
+ done
+)
+
+
+gpg --import "$tmp"
+rm -f "$tmp"