diff --git a/doc/EN/index.org b/doc/EN/index.org
index 893757a5..f48edf86 100644
--- a/doc/EN/index.org
+++ b/doc/EN/index.org
@@ -45,7 +45,7 @@ After installation it's possible that you might want some advice on how to run y
If you find bugs, or want to add a new app to this system see the [[./devguide.html][Developers Guide]].
-Ready made disk images which can be copied onto USB or microSD drives are [[./downloads/v3][available here].
+Ready made disk images which can be copied onto USB or microSD drives are [[./downloads/current][available here]].
#+BEGIN_CENTER
This site can also be accessed via a Tor browser at http://pazyv7nkllp76hqr.onion. This documentation is under the [[https://www.gnu.org/licenses/fdl-1.3.txt][GNU Free Documentation License version 1.3]]
diff --git a/doc/EN/mesh.org b/doc/EN/mesh.org
index 9054839c..e8667b1f 100644
--- a/doc/EN/mesh.org
+++ b/doc/EN/mesh.org
@@ -54,6 +54,7 @@ The Freedombone mesh roughly follows MondoNet's ten social specifications:
- Voice chat (VoIP) and video calls
- Private and public sharing of files
- Blogging
+ - Collaborative editing of documents and presentations
- Creating and broadcasting audio media/podcasts
- Social network stream. Follow/unfollow other peers
- No network administration required
@@ -97,7 +98,7 @@ wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.x
wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.xz.sig
gpg --verify freedombone-meshclient-i386.img.xz.sig
sha256sum freedombone-meshclient-i386.img.xz
-995dd64538f46f6abf83ba258cca6cb82a72399cb9a099caeafc1de947ef795c
+61e474afae14774d7aa479b6727fd5e77bdc1854e547b3c5b630bf10542a9581
unxz freedombone-meshclient-i386.img.xz
sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8
sudo dd bs=1M if=freedombone-meshclient-i386.img of=/dev/sdX conv=fdatasync
@@ -113,7 +114,7 @@ wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i
wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i386.img.xz.sig
gpg --verify freedombone-meshclient-insecure-i386.img.xz.sig
sha256sum freedombone-meshclient-insecure-i386.img.xz
-b06e6ff5e56577025e6b994fe0bb28f02da7d2905ac32a2f38d7d074ffe801fc
+fec843303d7d280859f75f7a8edccd70512915a34d4cc0787b5de7d8fbde5c81
unxz freedombone-meshclient-insecure-i386.img.xz
sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8
sudo dd bs=1M if=freedombone-meshclient-insecure-i386.img of=/dev/sdX conv=fdatasync
@@ -154,7 +155,7 @@ wget https://freedombone.net/downloads/current/freedombone.tar.gz
wget https://freedombone.net/downloads/current/freedombone.tar.gz.sig
gpg --verify freedombone.tar.gz.sig
sha256sum freedombone.tar.gz
-fd0b3fe1527de893f4ece7ffe95fdf0c41e635a3f82d22a51b707c1aee541e88
+e2715e27b142a21fa257eab15778ddc96f86fda70f8d91d47c4c9aa19f22e272
tar -xzvf freedombone.tar.gz
cd freedombone
git checkout stretch
@@ -241,27 +242,17 @@ sudo openvpn myclient.ovpn
Where /myclient.ovpn/ comes from your VPN provider and with the password "/freedombone/".
** Connecting two meshes over the internet via a VPN tunnel
-Maybe the internet exists, but you don't care about getting any content from it and just want to use it as a way to connect mesh networks from different geographical locations together. VPN configuration, pem and stunnel files exist within the home directory. Edit the configuration with:
+Maybe the internet exists, but you don't care about getting any content from it and just want to use it as a way to connect mesh networks from different geographical locations together.
-#+begin_src bash
-nano ~/client.ovpn
-#+end_src
+In your home directory on a system connected via ethernet to an internet router you'll find a file called *vpn.tar.gz*. If you want another mesh to be able to connect to yours then send them this file and get them to uncompress it into their home directory also on an internet gateway machine. If they have an external IP address or domain name for your router then they will be able to VPN connect using the *Connect Meshes* icon. They should also forward port 653 from their internet router to the mesh gateway machine.
-Edit the IP address or domain for the mesh that you wish to connect to within the /route/ command:
+#+BEGIN_CENTER
+[[file:images/mesh_connect.jpg]]
+#+END_CENTER
-#+begin_src bash
-route [mesh IP or domain] 255.255.255.255 net_gateway
-#+end_src
+You should create a new *vpn.tar.gz* file for every other mesh which wants to be able to connect to yours. If you are prompted for a password it is 'freedombone'.
-Then you can connect to the other mesh with:
-
-#+begin_src bash
-cd /home/fbone
-sudo stunnel stunnel-client.conf
-sudo openvpn client.ovpn
-#+end_src
-
-Using the password "/freedombone/". From a deep packet inspection point of view the traffic going over the internet will just look like any other TLS connection to a server.
+From a deep packet inspection point of view the traffic going over the internet between mesh gateways will just look like any other TLS connection to a server.
** Mobile devices (phones, etc)
To allow mobile devices to connect to the mesh you will need a second wifi adapter connected to your laptop/netbook/SBC. Plug in a second wifi adapter then reboot the system. The second adaptor will then create a wifi hotspot which mobile devices can connect to. The hotspot name also contains its local IP address (eg. "/mesh-192.168.1.83/").
@@ -303,6 +294,21 @@ One important point is that by default the microphone is turned off. When doing
At present video doesn't work reliably, but text and voice chat do work well.
+** Collaborative document editing
+The mesh system includes the ability to collaboratively edit various sorts of documents using CryptPad. CryptPad is an almost peer-to-peer system in that it is designed for a client/server environment but that the server aspect of it is very minimal and limited to orchestrating the connected clients. With CryptPad installed on each mesh peer it effectively enables peer-to-peer collaborative editing. Documents are ephemeral and forgotten unless they're exported or copy-pasted to permanent storage.
+
+#+BEGIN_CENTER
+[[file:images/mesh_cryptpad1.jpg]]
+#+END_CENTER
+
+To create a document click on the CryptPad icon. Depending upon the specifications of your system it may take a few seconds to load, so don't be too disturned if the browser contents look blank for a while. Select _Rich Text Pad_ and give yourself a username.
+
+#+BEGIN_CENTER
+[[file:images/mesh_cryptpad2.jpg]]
+#+END_CENTER
+
+If you have the chat system running you can then copy and paste the URL for your pad into the chat, and the other user can then open the link and edit the document with you. You can repeat that for however many other users you wish to be able to edit.
+
** Social Network
Patchwork is available as a social networking system for the mesh. Like all social network systems it has a stream of posts and you can follow or unfollow other users. You can also send private messages to other users with end-to-end encryption.
diff --git a/img/avatars/connect.jpg b/img/avatars/connect.jpg
new file mode 100644
index 00000000..c68690da
Binary files /dev/null and b/img/avatars/connect.jpg differ
diff --git a/img/icon_cryptpad.png b/img/icon_cryptpad.png
new file mode 100644
index 00000000..9f7714fe
Binary files /dev/null and b/img/icon_cryptpad.png differ
diff --git a/img/mesh_connect.jpg b/img/mesh_connect.jpg
new file mode 100644
index 00000000..2db3f497
Binary files /dev/null and b/img/mesh_connect.jpg differ
diff --git a/img/mesh_cryptpad1.jpg b/img/mesh_cryptpad1.jpg
new file mode 100644
index 00000000..5c6984c4
Binary files /dev/null and b/img/mesh_cryptpad1.jpg differ
diff --git a/img/mesh_cryptpad2.jpg b/img/mesh_cryptpad2.jpg
new file mode 100644
index 00000000..5a4ed7bc
Binary files /dev/null and b/img/mesh_cryptpad2.jpg differ
diff --git a/src/freedombone-app-cryptpad b/src/freedombone-app-cryptpad
index 135fa962..5f648627 100755
--- a/src/freedombone-app-cryptpad
+++ b/src/freedombone-app-cryptpad
@@ -215,6 +215,165 @@ function remove_cryptpad {
userdel -r cryptpad
}
+function mesh_install_cryptpad {
+ if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" ]]; then
+ return
+ fi
+
+ if [ ! -d $rootdir/var/www/cryptpad ]; then
+ mkdir $rootdir/var/www/cryptpad
+ fi
+ if [ -d $rootdir$CRYPTPAD_DIR ]; then
+ rm -rf $rootdir$CRYPTPAD_DIR
+ fi
+
+ git_clone $CRYPTPAD_REPO $rootdir$CRYPTPAD_DIR
+
+ if [ ! -d $rootdir$CRYPTPAD_DIR ]; then
+ echo $'Unable to clone cryptpad repo'
+ exit 783251
+ fi
+
+ if [ -f $rootdir/root/$PROJECT_NAME/img/icon_cryptpad.png ]; then
+ cp $rootdir/root/$PROJECT_NAME/img/icon_cryptpad.png $rootdir$CRYPTPAD_DIR/icon_cryptpad.png
+ fi
+
+ # an unprivileged user to run as
+ chroot "$rootdir" useradd -d $CRYPTPAD_DIR/ cryptpad
+
+ cd $rootdir$CRYPTPAD_DIR
+ git checkout $CRYPTPAD_COMMIT -b $CRYPTPAD_COMMIT
+
+ chroot "$rootdir" chown -R cryptpad:cryptpad $CRYPTPAD_DIR
+
+ cryptpad_nginx_site=$rootdir/etc/nginx/sites-available/cryptpad
+ echo 'server {' > $cryptpad_nginx_site
+ echo " listen 80 default_server;" >> $cryptpad_nginx_site
+ echo " server_name P${PEER_ID}.local;" >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' # Logs' >> $cryptpad_nginx_site
+ echo ' access_log /dev/null;' >> $cryptpad_nginx_site
+ echo ' error_log /dev/null;' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' # Root' >> $cryptpad_nginx_site
+ echo " root $CRYPTPAD_DIR;" >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' index index.html;' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' add_header X-XSS-Protection "1; mode=block";' >> $cryptpad_nginx_site
+ echo ' add_header X-Content-Type-Options nosniff;' >> $cryptpad_nginx_site
+ echo ' add_header X-Frame-Options SAMEORIGIN;' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' if ($uri = /pad/inner.html) {' >> $cryptpad_nginx_site
+ echo " set \$scriptSrc \"'self' 'unsafe-eval' 'unsafe-inline'\";" >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' location = /cryptpad_websocket {' >> $cryptpad_nginx_site
+ echo " proxy_pass http://localhost:$CRYPTPAD_PORT;" >> $cryptpad_nginx_site
+ echo ' proxy_set_header X-Real-IP $remote_addr;' >> $cryptpad_nginx_site
+ echo ' proxy_set_header Host $host;' >> $cryptpad_nginx_site
+ echo ' proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' # WebSocket support (nginx 1.4)' >> $cryptpad_nginx_site
+ echo ' proxy_http_version 1.1;' >> $cryptpad_nginx_site
+ echo ' proxy_set_header Upgrade $http_upgrade;' >> $cryptpad_nginx_site
+ echo ' proxy_set_header Connection upgrade;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+
+ echo ' location ^~ /customize.dist/ {' >> $cryptpad_nginx_site
+ echo ' # This is needed in order to prevent infinite recursion between /customize/ and the root' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo ' location ^~ /customize/ {' >> $cryptpad_nginx_site
+ echo ' rewrite ^/customize/(.*)$ $1 break;' >> $cryptpad_nginx_site
+ echo ' try_files /customize/$uri /customize.dist/$uri;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo ' location = /api/config {' >> $cryptpad_nginx_site
+ echo ' default_type text/javascript;' >> $cryptpad_nginx_site
+ echo ' rewrite ^.*$ /customize/api/config break;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' location ^~ /blob/ {' >> $cryptpad_nginx_site
+ echo ' try_files $uri =404;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' location ^~ /register/ {' >> $cryptpad_nginx_site
+ echo ' try_files $uri =404;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' location ^~ /login/ {' >> $cryptpad_nginx_site
+ echo ' try_files $uri =404;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' location ^~ /about.html {' >> $cryptpad_nginx_site
+ echo ' try_files $uri =404;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' location ^~ /contact.html {' >> $cryptpad_nginx_site
+ echo ' try_files $uri =404;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' location ^~ /what-is-cryptpad.html {' >> $cryptpad_nginx_site
+ echo ' try_files $uri =404;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media)$ {' >> $cryptpad_nginx_site
+ echo ' rewrite ^(.*)$ $1/ redirect;' >> $cryptpad_nginx_site
+ echo ' }' >> $cryptpad_nginx_site
+ echo '' >> $cryptpad_nginx_site
+ echo ' try_files /www/$uri /www/$uri/index.html /customize/$uri;' >> $cryptpad_nginx_site
+ echo '}' >> $cryptpad_nginx_site
+
+ cd $rootdir$CRYPTPAD_DIR
+
+ get_npm_arch
+
+ cat <
There may be situations where you need to write the same disk image to multiple drives at the same time in order to maximize rate of deployment. In the instructions given below the dd command is used for writing to the target drive, but to write to multiple drives you can use a tool such as GNOME MultiWriter.
@@ -384,9 +385,9 @@ The MultiWriter tool is also available within mesh client images, so that you caRouters are intended to build network coverage for an area using small and low cost hardware. You can bolt them to walls or leave them on window ledges. They don't have any user interface and their only job is to haul network traffic across the mesh and to enable peers to find each other via running bootstrap nodes for Tox and IPFS. Copy the image to a microSD card and insert it into the router, plug in an Atheros wifi dongle and power on. That should be all you need to do.
It's better not to trust images downloaded from random places on the interwebs. Chances are that unless you are in the web of trust of the above GPG signatures then they don't mean very much to you. If you actually want something trustworthy then build the images from scratch. It will take some time. Here's how to do it.
@@ -571,9 +572,9 @@ The resulting image can be copied to a microSD card, inserted into a BeagleboneIf you want to make your own specially branded version, such as for a particular event, then to change the default desktop backgrounds edit the images within img/backgrounds and to change the available avatars and desktop icons edit the images within img/avatars. Re-create disk images using the instructions shown previously.
@@ -583,9 +584,9 @@ If you need particular dconf commands to alter desktop appearance or behaWhen you first boot from the USB drive the system will create some encryption keys, assign a unique network address to the system and then reboot itself. When that's done you should see a prompt asking for a username. This username just makes it easy for others to initially find you on the mesh and will appear in the list of users.
@@ -595,9 +596,9 @@ After a minute or two if you are within wifi range and there is at least one othIf the system doesn't boot and reports an error which includes /dev/mapper/loop0p1 then reboot with Ctrl-Alt-Del and when you see the grub menu press e and manually change /dev/mapper/loop0p1 to /dev/sdb1, then press Ctrl-x. If that doesn't work then reboot and try /dev/sdc1 instead.
@@ -607,9 +608,9 @@ After the system has booted successfully the problem should resolve itself on suOn the ordinary internet the date and time of your system would be set automatically via NTP. But this is not the internet and so you will need to manually ensure that your date and time settings are correct. You might need to periodically do this if your clock drifts. It's not essential that the time on your system be highly accurate, but if it drifts too far or goes back to epoch then things could become a little confusing in regard to the order of blog posts.
@@ -619,9 +620,9 @@ On the ordinary internet the date and time of your system would be set automaticUnlike with ordinary wifi, on the mesh you don't get a signal strength icon and so it's not simple to see if you have a good connection.
@@ -644,9 +645,9 @@ When you are finished close the window and then select the Network RestartIf you need to be able to access the internet from the mesh then connect one of the peers to an internet router using an ethernet cable, then reboot it. Other peers in the mesh, including any attached mobile devices, will then be able to access the internet using the ethernet attached peer as a gateway. Freifunk works in a similar way.
@@ -669,47 +670,38 @@ Where myclient.ovpn comes from your VPN provider and with the password "<-Maybe the internet exists, but you don't care about getting any content from it and just want to use it as a way to connect mesh networks from different geographical locations together. VPN configuration, pem and stunnel files exist within the home directory. Edit the configuration with: +Maybe the internet exists, but you don't care about getting any content from it and just want to use it as a way to connect mesh networks from different geographical locations together.
-nano ~/client.ovpn --
-Edit the IP address or domain for the mesh that you wish to connect to within the route command: +In your home directory on a system connected via ethernet to an internet router you'll find a file called vpn.tar.gz. If you want another mesh to be able to connect to yours then send them this file and get them to uncompress it into their home directory also on an internet gateway machine. If they have an external IP address or domain name for your router then they will be able to VPN connect using the Connect Meshes icon. They should also forward port 653 from their internet router to the mesh gateway machine.
-route [mesh IP or domain] 255.255.255.255 net_gateway --
-Then you can connect to the other mesh with: -
- -cd /home/fbone
-sudo stunnel stunnel-client.conf
-sudo openvpn client.ovpn
-
--Using the password "freedombone". From a deep packet inspection point of view the traffic going over the internet will just look like any other TLS connection to a server. +
+You should create a new vpn.tar.gz file for every other mesh which wants to be able to connect to yours. If you are prompted for a password it is 'freedombone'. +
+ ++From a deep packet inspection point of view the traffic going over the internet between mesh gateways will just look like any other TLS connection to a server. +
+To allow mobile devices to connect to the mesh you will need a second wifi adapter connected to your laptop/netbook/SBC. Plug in a second wifi adapter then reboot the system. The second adaptor will then create a wifi hotspot which mobile devices can connect to. The hotspot name also contains its local IP address (eg. "mesh-192.168.1.83").
@@ -731,9 +723,9 @@ On some android devices you may need to move the downloaded APK file from theEnsure that you're within wifi range of at least one other mesh peer (could be a router or client) and then you should see that the Chat and Other Users icons appear. Select the users icon and you should see a list of users on the mesh. Select the Chat icon and once you are connected you should see the status light turn green. If after a few minutes you don't get the green status light then try closing and re-opening the Tox chat application. Select the plus button to add a friend and then copy and paste in a Tox ID from the users list.
@@ -792,9 +784,42 @@ At present video doesn't work reliably, but text and voice chat do work well.+The mesh system includes the ability to collaboratively edit various sorts of documents using CryptPad. CryptPad is an almost peer-to-peer system in that it is designed for a client/server environment but that the server aspect of it is very minimal and limited to orchestrating the connected clients. With CryptPad installed on each mesh peer it effectively enables peer-to-peer collaborative editing. Documents are ephemeral and forgotten unless they're exported or copy-pasted to permanent storage. +
+ +
+
+To create a document click on the CryptPad icon. Depending upon the specifications of your system it may take a few seconds to load, so don't be too disturned if the browser contents look blank for a while. Select Rich Text Pad and give yourself a username. +
+ +
+
+If you have the chat system running you can then copy and paste the URL for your pad into the chat, and the other user can then open the link and edit the document with you. You can repeat that for however many other users you wish to be able to edit. +
+Patchwork is available as a social networking system for the mesh. Like all social network systems it has a stream of posts and you can follow or unfollow other users. You can also send private messages to other users with end-to-end encryption.
@@ -829,9 +854,9 @@ The Secure Scuttlebutt protocol which Patchwork is based upon is intended to beYou can make files publicly available on the network simply by dragging and dropping them into the Public folder on the desktop. To view the files belonging to another user select the desktop icon called Visit a site and enter the username or Tox ID of the other user.
@@ -846,9 +871,9 @@ You can make files publicly available on the network simply by dragging and dropTo create a blog post select the Blog icon on the desktop and then use the up and down cursor keys, space bar and enter key to add a new entry. Edit the title of the entry and add your text. You can also include photos if you wish - just copy them to the CreateBlog/content/images directory and then link to them as shown.