Kaynağa Gözat

Merge branch 'stretch' of https://github.com/bashrc/freedombone

Bob Mottram 7 yıl önce
ebeveyn
işleme
b853161bd4

+ 37
- 18
doc/EN/mesh.org Dosyayı Görüntüle

@@ -33,12 +33,13 @@ Mesh networks are useful as a quick way to make a fully decentralised communicat
33 33
  - Voice chat (VoIP)
34 34
  - Private and public sharing of files
35 35
  - Blogging
36
+ - Social network stream. Follow/unfollow other peers
36 37
  - No network administration required
37
- - No servers, internet connection or cabling is needed.
38
- - Works from bootable USB drives or microSD drives.
38
+ - No servers, internet connection or cabling is needed
39
+ - Works from bootable USB drives or microSD drives
39 40
  - Data is mesh routed between systems
40
- - Private communications is end-to-end secured and forward secret.
41
- - Publicly shared data is /content addressable/.
41
+ - Private communications is end-to-end secured and forward secret
42
+ - Publicly shared data is /content addressable/
42 43
 
43 44
 This system should be quite scalable. Both qTox and IPFS are based upon distributed hash tables (DHT) so that each peer does not need to store the full index of data for the entire network. Caching or pinning of IPFS data and its content addressability means that if a file or blog becomes popular then performance should improve as the number of downloads increases, which is the opposite of the client/server paradigm.
44 45
 
@@ -67,14 +68,14 @@ sudo apt-get install gnome-multi-writer
67 68
 
68 69
 #+begin_src bash
69 70
 sudo apt-get install xz-utils wget
70
-wget https://freedombone.net/downloads/v3/freedombone-meshclient-3_all-i386.img.xz
71
-wget https://freedombone.net/downloads/v3/freedombone-meshclient-3_all-i386.img.xz.sig
72
-gpg --verify freedombone-meshclient-3_all-i386.img.xz.sig
73
-sha256sum freedombone-meshclient-3_all-i386.img.xz
74
-74f9eaad479f84d3bf9cb002067074d35a97028145e781c5746c74577f777ee5
75
-unxz freedombone-meshclient-3_all-i386.img.xz
71
+wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.xz
72
+wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.xz.sig
73
+gpg --verify freedombone-meshclient-i386.img.xz.sig
74
+sha256sum freedombone-meshclient-i386.img.xz
75
+f7e261d369d6f0ccf650dbbed18227bfe5ec427ae0b97f56e1f1e202afc6d0b3
76
+unxz freedombone-meshclient-i386.img.xz
76 77
 sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8
77
-sudo dd bs=1M if=freedombone-meshclient-3_all-i386.img of=/dev/sdX conv=fdatasync
78
+sudo dd bs=1M if=freedombone-meshclient-i386.img of=/dev/sdX conv=fdatasync
78 79
 #+end_src
79 80
 
80 81
 To get a number of systems onto the mesh repeat the /dd/ command to create however many bootable USB drives you need.
@@ -83,14 +84,14 @@ If you're in an emergency and don't have Atheros wifi dongles then there is also
83 84
 
84 85
 #+begin_src bash
85 86
 sudo apt-get install xz-utils wget
86
-wget https://freedombone.net/downloads/v3/freedombone-meshclient-insecure-3_all-i386.img.xz
87
-wget https://freedombone.net/downloads/v3/freedombone-meshclient-insecure-3_all-i386.img.xz.sig
88
-gpg --verify freedombone-meshclient-insecure-3_all-i386.img.xz.sig
89
-sha256sum freedombone-meshclient-insecure-3_all-i386.img.xz
90
-f1c5df24a4bfca47bd5c41dfd2568925e63a1abf83aecf0250480b4b8edc071d
91
-unxz freedombone-meshclient-insecure-3_all-i386.img.xz
87
+wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i386.img.xz
88
+wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i386.img.xz.sig
89
+gpg --verify freedombone-meshclient-insecure-i386.img.xz.sig
90
+sha256sum freedombone-meshclient-insecure-i386.img.xz
91
+3bfbcaedb587c5cbddec8b9fffcd48398d9e3b97486ef49aa645357f61a0f11f
92
+unxz freedombone-meshclient-insecure-i386.img.xz
92 93
 sudo dd if=/dev/zero of=/dev/sdX bs=1M count=8
93
-sudo dd bs=1M if=freedombone-meshclient-insecure-3_all-i386.img of=/dev/sdX conv=fdatasync
94
+sudo dd bs=1M if=freedombone-meshclient-insecure-i386.img of=/dev/sdX conv=fdatasync
94 95
 #+end_src
95 96
 
96 97
 ** Router images
@@ -233,6 +234,24 @@ One important point is that by default the microphone is turned off. When doing
233 234
 
234 235
 At present video doesn't work reliably, but text and voice chat do work well.
235 236
 
237
+** Social Network
238
+
239
+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.
240
+
241
+Double click on the "Social" icon to open the app, then add your nickname and optionally a description. If you want to choose an avatar image some can be found within the directory */usr/share/freedombone/avatars*. On older systems or systems without a hardware random number generator, Patchwork sometimes takes a long time (a few minutes) to open for the first time after clicking the icon. This is most likely due to the initial generation of encryption keys, so be patient.
242
+
243
+#+BEGIN_CENTER
244
+[[file:images/patchwork_setup.jpg]]
245
+#+END_CENTER
246
+
247
+Other Patchwork users on the mesh will appear automatically under the *local* list and you can select and follow them if you wish. It's also possible to select the dark theme from *settings* on the drop down menu if you prefer.
248
+
249
+#+BEGIN_CENTER
250
+[[file:images/patchwork_public.jpg]]
251
+#+END_CENTER
252
+
253
+The Secure Scuttlebutt protocol which Patchwork is based upon is intended to be robust to intermittent network connectivity, so you can write posts when out of range and they will sync once you are back in the network.
254
+
236 255
 ** Sharing Files
237 256
 You 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.
238 257
 

BIN
img/patchwork_public.jpg Dosyayı Görüntüle


BIN
img/patchwork_setup.jpg Dosyayı Görüntüle


+ 6
- 2
src/freedombone-app-ipfs Dosyayı Görüntüle

@@ -408,13 +408,13 @@ function mesh_install_ipfs_go {
408 408
     if [[ $ARCHITECTURE == *"amd64" || $ARCHITECTURE == "x86_64" ]]; then
409 409
         IPFS_ARCH=amd64
410 410
     fi
411
-    if [[ $ARCHITECTURE == *"arm"* ]]; then
411
+    if [[ $ARCHITECTURE == *"arm"* || $ARCHITECTURE == *"aarch"* ]]; then
412 412
         IPFS_ARCH=arm
413 413
     fi
414 414
     if [ ! $IPFS_ARCH ]; then
415 415
         echo $'No architecture specified'
416 416
         ARCHITECTURE=$(uname -m)
417
-        if [[ $ARCHITECTURE == "arm"* ]]; then
417
+        if [[ $ARCHITECTURE == "arm"* || $ARCHITECTURE == *"aarch"* ]]; then
418 418
             IPFS_ARCH=arm
419 419
             echo $"Using $IPFS_ARCH"
420 420
         fi
@@ -427,6 +427,10 @@ function mesh_install_ipfs_go {
427 427
             echo $"Using $IPFS_ARCH"
428 428
         fi
429 429
     fi
430
+    if [ ! $IPFS_ARCH ]; then
431
+        echo $'Architecture not detected for IPFS install'
432
+        exit 738765235
433
+    fi
430 434
 
431 435
     IPFS_FILE=go-ipfs_v${IPFS_GO_VERSION}_linux-${IPFS_ARCH}.tar.gz
432 436
     wget https://ipfs.io/ipns/dist.ipfs.io/go-ipfs/v${IPFS_GO_VERSION}/${IPFS_FILE}

+ 13
- 7
src/freedombone-base-email Dosyayı Görüntüle

@@ -1380,12 +1380,17 @@ function configure_gpg {
1380 1380
         MY_GPG_PUBLIC_KEY_ID=$(gpg_pubkey_from_email "$MY_USERNAME" "$MY_EMAIL_ADDRESS")
1381 1381
         if [ ${#MY_GPG_PUBLIC_KEY_ID} -lt 4 ]; then
1382 1382
             echo $'GPG public key ID could not be obtained'
1383
+        else
1384
+            if [[ "$MY_GPG_PUBLIC_KEY_ID" == *'error'* ]]; then
1385
+                echo $"Can't locate gpg key"
1386
+            else
1387
+                chown -R $MY_USERNAME:$MY_USERNAME $gpg_dir
1388
+                chmod 700 $gpg_dir
1389
+                chmod 600 $gpg_dir/*
1390
+                mark_completed $FUNCNAME
1391
+                return
1392
+            fi
1383 1393
         fi
1384
-        chown -R $MY_USERNAME:$MY_USERNAME $gpg_dir
1385
-        chmod 700 $gpg_dir
1386
-        chmod 600 $gpg_dir/*
1387
-        mark_completed $FUNCNAME
1388
-        return
1389 1394
     fi
1390 1395
 
1391 1396
     if [ ! -d $gpg_dir ]; then
@@ -1396,6 +1401,9 @@ function configure_gpg {
1396 1401
 
1397 1402
     sed -i "s|keyserver hkp://keys.gnupg.net|keyserver $GPG_KEYSERVER|g" $gpg_dir/gpg.conf
1398 1403
 
1404
+    gpg_agent_setup root
1405
+    gpg_agent_setup $MY_USERNAME
1406
+
1399 1407
     if ! grep -q "# default preferences" $gpg_dir/gpg.conf; then
1400 1408
         echo '' >> $gpg_dir/gpg.conf
1401 1409
         echo '# default preferences' >> $gpg_dir/gpg.conf
@@ -1456,8 +1464,6 @@ function configure_gpg {
1456 1464
         chmod 700 /root/.gnupg
1457 1465
         chmod 600 /root/.gnupg/*
1458 1466
     fi
1459
-    gpg_agent_setup root
1460
-    gpg_agent_setup $MY_USERNAME
1461 1467
 
1462 1468
     mark_completed $FUNCNAME
1463 1469
 }

+ 11
- 7
src/freedombone-image-customise Dosyayı Görüntüle

@@ -568,6 +568,9 @@ install_patchwork() {
568 568
     get_npm_arch
569 569
 
570 570
     git clone $PATCHWORK_REPO $rootdir/etc/patchwork
571
+    if [ ! -d $rootdir/etc/patchwork ]; then
572
+        exit 7823520
573
+    fi
571 574
     cd $rootdir/etc/patchwork
572 575
     git checkout $PATCHWORK_COMMIT -b $PATCHWORK_COMMIT
573 576
 
@@ -581,12 +584,6 @@ npm install --arch=$NPM_ARCH git-ssb
581 584
 EOF
582 585
     chroot "$rootdir" /bin/chmod +x /usr/bin/install_patchwork
583 586
     chroot "$rootdir" /usr/bin/install_patchwork
584
-    if [ ! -f /usr/bin/patchwork ]; then
585
-        if [ ! -f /usr/local/bin/patchwork ]; then
586
-            echo $'Unable to install SSB Patchwork peer'
587
-            exit 783524
588
-        fi
589
-    fi
590 587
     rm $rootdir/usr/bin/install_patchwork
591 588
 
592 589
     echo '#!/bin/bash' > $rootdir/usr/bin/start_patchwork
@@ -595,7 +592,7 @@ EOF
595 592
     chmod +x $rootdir/usr/bin/start_patchwork
596 593
 
597 594
     # Copy icon to an accesible location
598
-    cp /root/$PROJECT_NAME/img/icon_patchwork.png /etc/patchwork/icon_patchwork.png
595
+    cp $rootdir/root/$PROJECT_NAME/img/icon_patchwork.png $rootdir/etc/patchwork/icon_patchwork.png
599 596
 }
600 597
 
601 598
 initialise_mesh() {
@@ -1170,6 +1167,13 @@ function image_setup_utils {
1170 1167
     if [[ $ARCHITECTURE == *"arm"* ]]; then
1171 1168
         GOARCH=armv6l
1172 1169
     fi
1170
+    if [[ $ARCHITECTURE == *"aarch"* || $ARCHITECTURE == *"arm64"* ]]; then
1171
+        GOARCH=arm64
1172
+    fi
1173
+    if [ ! $GOARCH ]; then
1174
+        echo $'System architecture was not specified when installing Go'
1175
+        exit 6734378
1176
+    fi
1173 1177
     GO_SOURCE=https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz
1174 1178
 
1175 1179
     if [ ! -d ${rootdir}/root/build ]; then

+ 5
- 0
src/freedombone-image-mesh Dosyayı Görüntüle

@@ -589,6 +589,11 @@ if [ -f $MESH_INSTALL_SETUP ]; then
589 589
         rm $INSTALL_LOG
590 590
     fi
591 591
 
592
+    # Remove SSB/Patchwork files
593
+    if [ -d /home/$MY_USERNAME/.ssb ]; then
594
+        rm -rf /home/$MY_USERNAME/.ssb
595
+    fi
596
+
592 597
     echo $'Beginning mesh node setup' >> $INSTALL_LOG
593 598
 
594 599
     if [ -d /home/$MY_USERNAME/.config ]; then

+ 6
- 1
src/freedombone-utils-backup Dosyayı Görüntüle

@@ -77,6 +77,9 @@ function configure_backup_key {
77 77
         return
78 78
     fi
79 79
 
80
+    gpg_agent_setup root
81
+    gpg_agent_setup $MY_USERNAME
82
+
80 83
     # Generate a GPG key for backups
81 84
     BACKUP_KEY_EXISTS=$(gpg_key_exists "$MY_USERNAME" "$MY_NAME (backup key)")
82 85
     if [[ $BACKUP_KEY_EXISTS == "no" ]]; then
@@ -108,12 +111,14 @@ function configure_backup_key {
108 111
     echo "Backup key: $MY_BACKUP_KEY_ID"
109 112
     MY_BACKUP_KEY=/home/$MY_USERNAME/backup_key
110 113
     su -m root -c "gpg --homedir /home/$MY_USERNAME/.gnupg --output ${MY_BACKUP_KEY}_public.asc --armor --export $MY_BACKUP_KEY_ID" - $MY_USERNAME
111
-    su -m root -c "echo '$BACKUP_DUMMY_PASSWORD' | gpg --homedir /home/$MY_USERNAME/.gnupg --output ${MY_BACKUP_KEY}_private.asc --armor --batch --passphrase-fd 0 --export-secret-key $MY_BACKUP_KEY_ID" - $MY_USERNAME
112 114
 
113 115
     if [ ! -f ${MY_BACKUP_KEY}_public.asc ]; then
114 116
         echo 'Public backup key could not be exported'
115 117
         exit 36829
116 118
     fi
119
+
120
+    su -m root -c "echo '$BACKUP_DUMMY_PASSWORD' | gpg --homedir /home/$MY_USERNAME/.gnupg --output ${MY_BACKUP_KEY}_private.asc --armor --batch --passphrase-fd 0 --export-secret-key $MY_BACKUP_KEY_ID" - $MY_USERNAME
121
+
117 122
     if [ ! -f ${MY_BACKUP_KEY}_private.asc ]; then
118 123
         echo 'Private backup key could not be exported'
119 124
         exit 29235

+ 13
- 1
src/freedombone-utils-go Dosyayı Görüntüle

@@ -32,7 +32,7 @@
32 32
 # before getting to the version we want
33 33
 GO_INTERMEDIATE_VERSION=1.4.2
34 34
 
35
-GO_VERSION=1.8
35
+GO_VERSION=1.9
36 36
 
37 37
 GO_REPO="https://go.googlesource.com/go"
38 38
 GO_PACKAGE_MANAGER_REPO="https://github.com/gpmgo/gopm"
@@ -147,6 +147,9 @@ function mesh_upgrade_golang {
147 147
     if [[ $ARCHITECTURE == *"arm"* ]]; then
148 148
         GOARCH=armv6l
149 149
     fi
150
+    if [[ $ARCHITECTURE == *"aarch"* || $ARCHITECTURE == *"arm64"* ]]; then
151
+        GOARCH=arm64
152
+    fi
150 153
     if [ ! $GOARCH ]; then
151 154
         echo $'No architecture specified'
152 155
         ARCHITECTURE=$(uname -m)
@@ -154,6 +157,10 @@ function mesh_upgrade_golang {
154 157
             GOARCH=armv6l
155 158
             echo $"Using $GOARCH"
156 159
         fi
160
+        if [[ $ARCHITECTURE == *"aarch"* || $ARCHITECTURE == *"arm64"* ]]; then
161
+            GOARCH=arm64
162
+            echo $"Using $GOARCH"
163
+        fi
157 164
         if [[ $ARCHITECTURE == "amd"* || $ARCHITECTURE == "x86_64" ]]; then
158 165
             GOARCH=amd64
159 166
             echo $"Using $GOARCH"
@@ -163,6 +170,11 @@ function mesh_upgrade_golang {
163 170
             echo $"Using $GOARCH"
164 171
         fi
165 172
     fi
173
+    if [ ! $GOARCH ]; then
174
+        echo $'System architecture was not detected when installing Go'
175
+        echo "uname reports: $(uname -m)"
176
+        exit 63945284
177
+    fi
166 178
     GO_SOURCE=https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GOARCH}.tar.gz
167 179
 
168 180
     if [ ! -d ${rootdir}${INSTALL_DIR} ]; then

+ 4
- 4
src/freedombone-utils-gpg Dosyayı Görüntüle

@@ -102,15 +102,15 @@ function gpg_create_key {
102 102
     echo $'Generating a new GPG key'
103 103
     su -m root -c "gpg --homedir /home/$key_username/.gnupg --batch --full-gen-key /home/$key_username/gpg-genkey.conf" - $key_username
104 104
     chown -R $key_username:$key_username /home/$key_username/.gnupg
105
-    KEY_EXISTS=$(gpg_key_exists "$key_username" "${key_username}@${HOSTNAME}")
105
+    KEY_EXISTS=$(gpg_key_exists "$key_username" "$MY_EMAIL_ADDRESS")
106 106
     if [[ $KEY_EXISTS == "no" ]]; then
107
-        echo $"A GPG key for ${key_username}@${HOSTNAME} could not be created"
107
+        echo $"A GPG key for $MY_EMAIL_ADDRESS could not be created"
108 108
         exit 63621
109 109
     fi
110 110
     shred -zu /home/$key_username/gpg-genkey.conf
111
-    CURR_GPG_PUBLIC_KEY_ID=$(gpg_pubkey_from_email "$key_username" "${key_username}@${HOSTNAME}")
111
+    CURR_GPG_PUBLIC_KEY_ID=$(gpg_pubkey_from_email "$key_username" "$MY_EMAIL_ADDRESS")
112 112
     if [ ${#CURR_GPG_PUBLIC_KEY_ID} -lt 4 ]; then
113
-        echo $"GPG public key ID could not be obtained for ${key_username}@${HOSTNAME}"
113
+        echo $"GPG public key ID could not be obtained for $MY_EMAIL_ADDRESS"
114 114
         exit 825292
115 115
     fi
116 116
     gpg_set_permissions $key_username

+ 52
- 39
src/freedombone-utils-nodejs Dosyayı Görüntüle

@@ -50,6 +50,10 @@ function get_npm_arch {
50 50
         NPM_ARCH='armv7l'
51 51
         N_ARCH='arm'
52 52
     fi
53
+    if [[ $ARCHITECTURE == *"aarch"* ]]; then
54
+        NPM_ARCH='arm64'
55
+        N_ARCH='arm64'
56
+    fi
53 57
     if [[ $ARCHITECTURE == 'x86_64' || $ARCHITECTURE == 'amd64' ]]; then
54 58
         NPM_ARCH='x64'
55 59
         N_ARCH='x64'
@@ -165,49 +169,58 @@ function install_nodejs {
165 169
         return
166 170
     fi
167 171
 
168
-    if [ ! -f /usr/bin/nodejs ]; then
169
-        # Note: this has to be jessie for now
170
-        wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > /root/node.gpg.key
171
-        apt-key add /root/node.gpg.key
172
-        echo "deb https://deb.nodesource.com/node_6.x jessie main" > /etc/apt/sources.list.d/nodesource.list
173
-        echo "deb-src https://deb.nodesource.com/node_6.x jessie main" >> /etc/apt/sources.list.d/nodesource.list
174
-
175
-        apt-get update
176
-
177
-        apt-get -yq remove --purge nodejs
178
-
179
-        if [ -d /usr/local/lib/node_modules ]; then
180
-            rm -rf /usr/local/lib/node_modules
181
-        fi
182
-        if [ -f /usr/local/bin/node ]; then
183
-            rm /usr/local/bin/node
184
-        fi
185
-        if [ -f /usr/bin/node ]; then
186
-            rm /usr/bin/node
187
-        fi
188
-        if [ -f /usr/bin/nodejs ]; then
189
-            rm /usr/bin/nodejs
190
-        fi
191
-
192
-        apt-get -yq install nodejs
193
-        apt-get -yq install curl
194
-
195
-        if [ ! -f /usr/bin/nodejs ]; then
196
-            echo $'nodejs was not installed'
197
-            exit 63962
198
-        fi
172
+    if [ ! $ARCHITECTURE ]; then
173
+        ARCHITECTURE=$(uname -m)
199 174
     fi
175
+    rootdir=
176
+    mesh_install_nodejs
200 177
 
201
-    npm install -g npm@${NPM_VERSION} --save
202
-    npm install -g n@${NODEJS_N_VERSION} --save
203
-    n ${NODEJS_VERSION}
204
-    npm install -g pug@2.0.0-beta6 --save
205
-    npm install -g graceful-fs@4.1.10 --save
206
-    npm install -g minimatch@3.0.3 --save
178
+
179
+    #if [ ! -f /usr/bin/nodejs ]; then
180
+        # Note: this has to be jessie for now
181
+    #    wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key > /root/node.gpg.key
182
+    #    apt-key add /root/node.gpg.key
183
+    #    echo "deb https://deb.nodesource.com/node_6.x stretch main" > /etc/apt/sources.list.d/nodesource.list
184
+    #    echo "deb-src https://deb.nodesource.com/node_6.x stretch main" >> /etc/apt/sources.list.d/nodesource.list
185
+
186
+    #    apt-get update
187
+
188
+    #    apt-get -yq remove --purge nodejs
189
+
190
+    #    if [ -d /usr/local/lib/node_modules ]; then
191
+    #        rm -rf /usr/local/lib/node_modules
192
+    #    fi
193
+    #    if [ -f /usr/local/bin/node ]; then
194
+    #        rm /usr/local/bin/node
195
+    #    fi
196
+    #    if [ -f /usr/bin/node ]; then
197
+    #        rm /usr/bin/node
198
+    #    fi
199
+    #    if [ -f /usr/bin/nodejs ]; then
200
+    #        rm /usr/bin/nodejs
201
+    #    fi
202
+
203
+    #    apt-get -yq install nodejs
204
+    #    apt-get -yq install curl
205
+
206
+    #    if [ ! -f /usr/bin/nodejs ]; then
207
+    #        echo $'nodejs was not installed'
208
+    #        exit 63962
209
+    #    fi
210
+    #fi
211
+
212
+    #npm install -g npm@${NPM_VERSION} --save
213
+    #npm install -g n@${NODEJS_N_VERSION} --save
214
+    #n ${NODEJS_VERSION}
215
+    #npm install -g pug@2.0.0-beta6 --save
216
+    #npm install -g graceful-fs@4.1.10 --save
217
+    #npm install -g minimatch@3.0.3 --save
207 218
     npm install -g npm@${NPM_VERSION} --save
208 219
 
209
-    cp /usr/local/bin/node /usr/bin/nodejs
210
-    cp /usr/local/bin/npm /usr/bin/npm
220
+    #cp /usr/local/bin/node /usr/bin/nodejs
221
+    if [ -f /usr/local/bin/npm ]; then
222
+        cp /usr/local/bin/npm /usr/bin/npm
223
+    fi
211 224
 
212 225
     # node seems tricky so here we're going to double check
213 226
     # that the versions we expect did get installed

+ 3
- 0
src/freedombone-utils-onion Dosyayı Görüntüle

@@ -275,6 +275,9 @@ function install_tor {
275 275
         exit 38259
276 276
     fi
277 277
 
278
+    # For torify
279
+    apt-get -yq install torsocks
280
+
278 281
     # turn off logging
279 282
     sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
280 283
     sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc

+ 106
- 68
website/EN/mesh.html Dosyayı Görüntüle

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2017-09-15 Fri 22:19 -->
6
+<!-- 2017-09-18 Mon 11:40 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title></title>
@@ -274,13 +274,13 @@ for the JavaScript code in this tag.
274 274
 </colgroup>
275 275
 <tbody>
276 276
 <tr>
277
-<td class="org-left"><a href="#orgc6406cc">What the system can do</a></td>
277
+<td class="org-left"><a href="#org81ddb36">What the system can do</a></td>
278 278
 <td class="org-left">-</td>
279
-<td class="org-left"><a href="#orgf24c15c">Disk Images</a></td>
279
+<td class="org-left"><a href="#orgdc7c539">Disk Images</a></td>
280 280
 <td class="org-left">-</td>
281
-<td class="org-left"><a href="#org08c02eb">Building Disk Images</a></td>
281
+<td class="org-left"><a href="#orgef64a0e">Building Disk Images</a></td>
282 282
 <td class="org-left">-</td>
283
-<td class="org-left"><a href="#orgfce6a77">How to use it</a></td>
283
+<td class="org-left"><a href="#orgf01387f">How to use it</a></td>
284 284
 </tr>
285 285
 </tbody>
286 286
 </table>
@@ -293,21 +293,22 @@ The Freedombone Mesh is a wireless solution for autonomous communication that ca
293 293
 Mesh networks are useful as a quick way to make a fully decentralised communications system which is not connected to or reliant upon the internet. Think festivals, hacker conferences, onboard ships at sea, disaster/war zones, small business internal office communications, protests, remote areas of the world, temporary "digital blackouts", scientific expeditions and off-world space colonies. The down side is that you can't access any internet content. The upside is that you can securely communicate with anyone on the local mesh. No ISPs. No payments or subscriptions beyond the cost of obtaining the hardware. Systems need to be within wifi range of each other for the mesh to be created. It can be an ultra-convenient way to do purely local communications.
294 294
 </p>
295 295
 
296
-<div id="outline-container-orgc6406cc" class="outline-2">
297
-<h2 id="orgc6406cc">What the system can do</h2>
298
-<div class="outline-text-2" id="text-orgc6406cc">
296
+<div id="outline-container-org81ddb36" class="outline-2">
297
+<h2 id="org81ddb36">What the system can do</h2>
298
+<div class="outline-text-2" id="text-org81ddb36">
299 299
 <ul class="org-ul">
300 300
 <li>Discovery of other users on the network</li>
301 301
 <li>Text based chat, one-to-one and in groups</li>
302 302
 <li>Voice chat (VoIP)</li>
303 303
 <li>Private and public sharing of files</li>
304 304
 <li>Blogging</li>
305
+<li>Social network stream. Follow/unfollow other peers</li>
305 306
 <li>No network administration required</li>
306
-<li>No servers, internet connection or cabling is needed.</li>
307
-<li>Works from bootable USB drives or microSD drives.</li>
307
+<li>No servers, internet connection or cabling is needed</li>
308
+<li>Works from bootable USB drives or microSD drives</li>
308 309
 <li>Data is mesh routed between systems</li>
309
-<li>Private communications is end-to-end secured and forward secret.</li>
310
-<li>Publicly shared data is <i>content addressable</i>.</li>
310
+<li>Private communications is end-to-end secured and forward secret</li>
311
+<li>Publicly shared data is <i>content addressable</i></li>
311 312
 </ul>
312 313
 
313 314
 <p>
@@ -316,13 +317,13 @@ This system should be quite scalable. Both qTox and IPFS are based upon distribu
316 317
 </div>
317 318
 </div>
318 319
 
319
-<div id="outline-container-orgf24c15c" class="outline-2">
320
-<h2 id="orgf24c15c">Disk Images</h2>
321
-<div class="outline-text-2" id="text-orgf24c15c">
320
+<div id="outline-container-orgdc7c539" class="outline-2">
321
+<h2 id="orgdc7c539">Disk Images</h2>
322
+<div class="outline-text-2" id="text-orgdc7c539">
322 323
 </div>
323
-<div id="outline-container-org88842fc" class="outline-3">
324
-<h3 id="org88842fc">Writing many images quickly</h3>
325
-<div class="outline-text-3" id="text-org88842fc">
324
+<div id="outline-container-org41eb788" class="outline-3">
325
+<h3 id="org41eb788">Writing many images quickly</h3>
326
+<div class="outline-text-3" id="text-org41eb788">
326 327
 <p>
327 328
 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 <b>dd</b> command is used for writing to the target drive, but to write to multiple drives you can use a tool such as <a href="https://wiki.gnome.org/Apps/MultiWriter">GNOME MultiWriter</a>.
328 329
 </p>
@@ -346,9 +347,9 @@ Or on Debian based systems:
346 347
 </div>
347 348
 </div>
348 349
 </div>
349
-<div id="outline-container-org4a8b638" class="outline-3">
350
-<h3 id="org4a8b638">Client images</h3>
351
-<div class="outline-text-3" id="text-org4a8b638">
350
+<div id="outline-container-orgb7d45bb" class="outline-3">
351
+<h3 id="orgb7d45bb">Client images</h3>
352
+<div class="outline-text-3" id="text-orgb7d45bb">
352 353
 <div class="org-center">
353 354
 
354 355
 <div class="figure">
@@ -363,14 +364,14 @@ Or on Debian based systems:
363 364
 
364 365
 <div class="org-src-container">
365 366
 <pre><code class="src src-bash">sudo apt-get install xz-utils wget
366
-wget https://freedombone.net/downloads/v3/freedombone-meshclient-3_all-i386.img.xz
367
-wget https://freedombone.net/downloads/v3/freedombone-meshclient-3_all-i386.img.xz.sig
368
-gpg --verify freedombone-meshclient-3_all-i386.img.xz.sig
369
-sha256sum freedombone-meshclient-3_all-i386.img.xz
370
-74f9eaad479f84d3bf9cb002067074d35a97028145e781c5746c74577f777ee5
371
-unxz freedombone-meshclient-3_all-i386.img.xz
367
+wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.xz
368
+wget https://freedombone.net/downloads/current/freedombone-meshclient-i386.img.xz.sig
369
+gpg --verify freedombone-meshclient-i386.img.xz.sig
370
+sha256sum freedombone-meshclient-i386.img.xz
371
+f7e261d369d6f0ccf650dbbed18227bfe5ec427ae0b97f56e1f1e202afc6d0b3
372
+unxz freedombone-meshclient-i386.img.xz
372 373
 sudo dd <span class="org-variable-name">if</span>=/dev/zero <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">count</span>=8
373
-sudo dd <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">if</span>=freedombone-meshclient-3_all-i386.img <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">conv</span>=fdatasync
374
+sudo dd <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">if</span>=freedombone-meshclient-i386.img <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">conv</span>=fdatasync
374 375
 </code></pre>
375 376
 </div>
376 377
 
@@ -384,29 +385,29 @@ If you're in an emergency and don't have Atheros wifi dongles then there is also
384 385
 
385 386
 <div class="org-src-container">
386 387
 <pre><code class="src src-bash">sudo apt-get install xz-utils wget
387
-wget https://freedombone.net/downloads/v3/freedombone-meshclient-insecure-3_all-i386.img.xz
388
-wget https://freedombone.net/downloads/v3/freedombone-meshclient-insecure-3_all-i386.img.xz.sig
389
-gpg --verify freedombone-meshclient-insecure-3_all-i386.img.xz.sig
390
-sha256sum freedombone-meshclient-insecure-3_all-i386.img.xz
391
-f1c5df24a4bfca47bd5c41dfd2568925e63a1abf83aecf0250480b4b8edc071d
392
-unxz freedombone-meshclient-insecure-3_all-i386.img.xz
388
+wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i386.img.xz
389
+wget https://freedombone.net/downloads/current/freedombone-meshclient-insecure-i386.img.xz.sig
390
+gpg --verify freedombone-meshclient-insecure-i386.img.xz.sig
391
+sha256sum freedombone-meshclient-insecure-i386.img.xz
392
+3bfbcaedb587c5cbddec8b9fffcd48398d9e3b97486ef49aa645357f61a0f11f
393
+unxz freedombone-meshclient-insecure-i386.img.xz
393 394
 sudo dd <span class="org-variable-name">if</span>=/dev/zero <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">count</span>=8
394
-sudo dd <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">if</span>=freedombone-meshclient-insecure-3_all-i386.img <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">conv</span>=fdatasync
395
+sudo dd <span class="org-variable-name">bs</span>=1M <span class="org-variable-name">if</span>=freedombone-meshclient-insecure-i386.img <span class="org-variable-name">of</span>=/dev/sdX <span class="org-variable-name">conv</span>=fdatasync
395 396
 </code></pre>
396 397
 </div>
397 398
 </div>
398 399
 </div>
399 400
 
400
-<div id="outline-container-org519744c" class="outline-3">
401
-<h3 id="org519744c">Router images</h3>
402
-<div class="outline-text-3" id="text-org519744c">
401
+<div id="outline-container-orgb012fc0" class="outline-3">
402
+<h3 id="orgb012fc0">Router images</h3>
403
+<div class="outline-text-3" id="text-orgb012fc0">
403 404
 <p>
404 405
 Routers 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.
405 406
 </p>
406 407
 </div>
407
-<div id="outline-container-org909807a" class="outline-4">
408
-<h4 id="org909807a">Beaglebone Black</h4>
409
-<div class="outline-text-4" id="text-org909807a">
408
+<div id="outline-container-org86225c6" class="outline-4">
409
+<h4 id="org86225c6">Beaglebone Black</h4>
410
+<div class="outline-text-4" id="text-org86225c6">
410 411
 <div class="org-center">
411 412
 
412 413
 <div class="figure">
@@ -443,9 +444,9 @@ There is still a software freedom issue with the Beaglebone Black, but it doesn'
443 444
 </div>
444 445
 </div>
445 446
 
446
-<div id="outline-container-org08c02eb" class="outline-2">
447
-<h2 id="org08c02eb">Building Disk Images</h2>
448
-<div class="outline-text-2" id="text-org08c02eb">
447
+<div id="outline-container-orgef64a0e" class="outline-2">
448
+<h2 id="orgef64a0e">Building Disk Images</h2>
449
+<div class="outline-text-2" id="text-orgef64a0e">
449 450
 <p>
450 451
 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.
451 452
 </p>
@@ -533,9 +534,9 @@ The resulting image can be copied to a microSD card, inserted into a Beaglebone
533 534
 </div>
534 535
 </div>
535 536
 
536
-<div id="outline-container-org0dec35a" class="outline-2">
537
-<h2 id="org0dec35a">Customisation</h2>
538
-<div class="outline-text-2" id="text-org0dec35a">
537
+<div id="outline-container-org6358707" class="outline-2">
538
+<h2 id="org6358707">Customisation</h2>
539
+<div class="outline-text-2" id="text-org6358707">
539 540
 <p>
540 541
 If 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 <b>img/backgrounds</b> and to change the available avatars and desktop icons edit the images within <b>img/avatars</b>. Re-create disk images using the instructions shown previously.
541 542
 </p>
@@ -545,9 +546,9 @@ If you need particular <i>dconf</i> commands to alter desktop appearance or beha
545 546
 </p>
546 547
 </div>
547 548
 </div>
548
-<div id="outline-container-orgfce6a77" class="outline-2">
549
-<h2 id="orgfce6a77">How to use it</h2>
550
-<div class="outline-text-2" id="text-orgfce6a77">
549
+<div id="outline-container-orgf01387f" class="outline-2">
550
+<h2 id="orgf01387f">How to use it</h2>
551
+<div class="outline-text-2" id="text-orgf01387f">
551 552
 <p>
552 553
 When 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.
553 554
 </p>
@@ -557,9 +558,9 @@ After a minute or two if you are within wifi range and there is at least one oth
557 558
 </p>
558 559
 </div>
559 560
 
560
-<div id="outline-container-org2a6eb8c" class="outline-3">
561
-<h3 id="org2a6eb8c">Boot trouble</h3>
562
-<div class="outline-text-3" id="text-org2a6eb8c">
561
+<div id="outline-container-org5ee0eb2" class="outline-3">
562
+<h3 id="org5ee0eb2">Boot trouble</h3>
563
+<div class="outline-text-3" id="text-org5ee0eb2">
563 564
 <p>
564 565
 If the system doesn't boot and reports an error which includes <b>/dev/mapper/loop0p1</b> then reboot with <b>Ctrl-Alt-Del</b> and when you see the grub menu press <b>e</b> and manually change <b>/dev/mapper/loop0p1</b> to <b>/dev/sdb1</b>, then press <b>Ctrl-x</b>. If that doesn't work then reboot and try <b>/dev/sdc1</b> instead.
565 566
 </p>
@@ -569,9 +570,9 @@ After the system has booted successfully the problem should resolve itself on su
569 570
 </p>
570 571
 </div>
571 572
 </div>
572
-<div id="outline-container-org92cd6d5" class="outline-3">
573
-<h3 id="org92cd6d5">Set the Date</h3>
574
-<div class="outline-text-3" id="text-org92cd6d5">
573
+<div id="outline-container-org57403bb" class="outline-3">
574
+<h3 id="org57403bb">Set the Date</h3>
575
+<div class="outline-text-3" id="text-org57403bb">
575 576
 <p>
576 577
 On 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.
577 578
 </p>
@@ -581,9 +582,9 @@ On the ordinary internet the date and time of your system would be set automatic
581 582
 </p>
582 583
 </div>
583 584
 </div>
584
-<div id="outline-container-org2aa12f0" class="outline-3">
585
-<h3 id="org2aa12f0">Check network status</h3>
586
-<div class="outline-text-3" id="text-org2aa12f0">
585
+<div id="outline-container-orge4196db" class="outline-3">
586
+<h3 id="orge4196db">Check network status</h3>
587
+<div class="outline-text-3" id="text-orge4196db">
587 588
 <p>
588 589
 Unlike 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.
589 590
 </p>
@@ -607,9 +608,9 @@ When you are finished close the window and then select the <i>Network Restart</i
607 608
 </div>
608 609
 </div>
609 610
 
610
-<div id="outline-container-org2f1dfa6" class="outline-3">
611
-<h3 id="org2f1dfa6">Chat System</h3>
612
-<div class="outline-text-3" id="text-org2f1dfa6">
611
+<div id="outline-container-org07b0383" class="outline-3">
612
+<h3 id="org07b0383">Chat System</h3>
613
+<div class="outline-text-3" id="text-org07b0383">
613 614
 <p>
614 615
 Ensure 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 <i>Chat</i> and <i>Other Users</i> icons appear. Select the users icon and you should see a list of users on the mesh. Select the <i>Chat</i> 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.
615 616
 </p>
@@ -668,9 +669,46 @@ At present video doesn't work reliably, but text and voice chat do work well.
668 669
 </div>
669 670
 </div>
670 671
 
671
-<div id="outline-container-org75993b2" class="outline-3">
672
-<h3 id="org75993b2">Sharing Files</h3>
673
-<div class="outline-text-3" id="text-org75993b2">
672
+<div id="outline-container-org56b3e5d" class="outline-3">
673
+<h3 id="org56b3e5d">Social Network</h3>
674
+<div class="outline-text-3" id="text-org56b3e5d">
675
+<p>
676
+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.
677
+</p>
678
+
679
+<p>
680
+Double click on the "Social" icon to open the app, then add your nickname and optionally a description. If you want to choose an avatar image some can be found within the directory <b>/usr/share/freedombone/avatars</b>. On older systems or systems without a hardware random number generator, Patchwork sometimes takes a long time (a few minutes) to open for the first time after clicking the icon. This is most likely due to the initial generation of encryption keys, so be patient.
681
+</p>
682
+
683
+<div class="org-center">
684
+
685
+<div class="figure">
686
+<p><img src="images/patchwork_setup.jpg" alt="patchwork_setup.jpg" />
687
+</p>
688
+</div>
689
+</div>
690
+
691
+<p>
692
+Other Patchwork users on the mesh will appear automatically under the <b>local</b> list and you can select and follow them if you wish. It's also possible to select the dark theme from <b>settings</b> on the drop down menu if you prefer.
693
+</p>
694
+
695
+<div class="org-center">
696
+
697
+<div class="figure">
698
+<p><img src="images/patchwork_public.jpg" alt="patchwork_public.jpg" />
699
+</p>
700
+</div>
701
+</div>
702
+
703
+<p>
704
+The Secure Scuttlebutt protocol which Patchwork is based upon is intended to be robust to intermittent network connectivity, so you can write posts when out of range and they will sync once you are back in the network.
705
+</p>
706
+</div>
707
+</div>
708
+
709
+<div id="outline-container-orgc281f16" class="outline-3">
710
+<h3 id="orgc281f16">Sharing Files</h3>
711
+<div class="outline-text-3" id="text-orgc281f16">
674 712
 <p>
675 713
 You can make files publicly available on the network simply by dragging and dropping them into the <i>Public</i> folder on the desktop. To view the files belonging to another user select the desktop icon called <i>Visit a site</i> and enter the username or Tox ID of the other user.
676 714
 </p>
@@ -685,9 +723,9 @@ You can make files publicly available on the network simply by dragging and drop
685 723
 </div>
686 724
 </div>
687 725
 
688
-<div id="outline-container-org86cab79" class="outline-3">
689
-<h3 id="org86cab79">Blogging</h3>
690
-<div class="outline-text-3" id="text-org86cab79">
726
+<div id="outline-container-org12f7a3e" class="outline-3">
727
+<h3 id="org12f7a3e">Blogging</h3>
728
+<div class="outline-text-3" id="text-org12f7a3e">
691 729
 <p>
692 730
 To create a blog post select the <i>Blog</i> 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 <b>CreateBlog/content/images</b> directory and then link to them as shown.
693 731
 </p>