Skip to content

Commit 799c91a

Browse files
authored
[WIP] - New release v0.5.0-rc.1 to master (#390)
Yggdrasil IPTunnel now does not change config files Yggdrasil IPtunnel drop in service adjustment Yggdrsail IPTunnel supports IPv6 and routed IPv6 Yggdrsail version bump Support for x86 and x64 Profile selection menu format changed in Dialog Rewritten and simplified board detection IPFS Improvments #284 CJDNS now module Prototype can run without CJDNS now Better docs Grafan database now can be removed when uninstalling Moved network config to interface.d model Removed Network Manager Added Modules.md Added confSet function and implemented confget/confset config files NodeJS now shared module NodeJS version bump MESH_NAME now a config Added ipv6 netcat option Localized Patch Foo in TOMESH repo to prevent version conflicts and outage Added support for PI4 Added support for Buster Fixed ETH0 vs BR0 issue on espressoBIN Prometheus version bump Raspberry Pi Watch Dog Timer
1 parent 2af4ad9 commit 799c91a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1592
-993
lines changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The following instructions will help you set up an encrypted mesh network on Raspberry Pi's. It takes about 15 minutes to set up a node with the Pi 3. Obviously, to have a mesh you will need more than one node.
66

7-
Many board that run [Armbian](https://www.armbian.com/) such as many models of Orange Pi hardware are also supported. The same installation steps can be followed, except you would flash the SD card with Armbian instead of Raspbian. See [Hardware Table](#hardware-table) for the full list of supported hardware and check for board specific installation details in our [Frequently Asked Questions](./docs/FAQ.md).
7+
The software also supports Debian running on x86 and x64 boards, and many board that run [Armbian](https://www.armbian.com/) (such as many models of Orange Pi hardware family). The same installation steps can be followed, except you would flash the SD card with Armbian instead of Raspbian or have Debian installed onto the computer. See [Hardware Table](#hardware-table) for the full list of supported hardware and check for board specific installation details in our [Frequently Asked Questions](./docs/FAQ.md).
88

99
## Set Up
1010

@@ -16,7 +16,7 @@ Many board that run [Armbian](https://www.armbian.com/) such as many models of O
1616
* For [802.11s Mesh Point](https://github.com/o11s/open80211s/wiki/HOWTO) wireless links (recommended), device such as the [TP-LINK TL-WN722N v1](http://www.tp-link.com/en/products/details/TL-WN722N.html), [Toplinkst TOP-GS07](https://github.com/tomeshnet/documents/blob/master/technical/20170208_mesh-point-with-topgs07-rt5572.md) or [another supported device](https://github.com/phillymesh/802.11s-adapters/blob/master/README.md).
1717
* For [ad-hoc](https://en.wikipedia.org/wiki/Wireless_ad_hoc_network) wireless links (experimental), any device that supports linux and ad-hoc.
1818

19-
1. Flash the SD card with [Raspbian Stretch Lite](https://www.raspberrypi.org/downloads/raspbian/).
19+
1. Flash the SD card with [Raspbian Buster Lite](https://www.raspberrypi.org/downloads/raspbian/).
2020

2121
1. Create an empty file named **ssh** to enable SSH when the Pi boots:
2222

@@ -44,6 +44,8 @@ Many board that run [Armbian](https://www.armbian.com/) such as many models of O
4444
4545
During the installation, you may be able to pick a profile, or choose between many modules. To learn what each module is for, look at [MODULES.md](./docs/MODULES.md). This is important for the installation.
4646
47+
There is also the [contrib](./contrib/) folder for software that has been contributed to the project, but which might not actually be maintained by the core developers.
48+
4749
## Check Status
4850
4951
1. Give the Pi about 15 seconds to reboot and SSH back into it. You should find the status of your mesh node automatically printed. You can also print this anytime by running `status`.
@@ -76,11 +78,13 @@ List of tested hardware:
7678
7779
| Hardware | Base OS | [CJDNS Benchmark](https://github.com/phillymesh/cjdns-optimizations) <sub>(salsa20/poly1305, switching)</sub> | iPerf3 | USB | Ethernet | Notes |
7880
| :-------------------------|:----------------|:--------------------------------------------------------------------------------------------------------------|:-------|:----|:---------|:---------|
79-
| Raspberry Pi 3b+ | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 405k, 119k | ~90 Mbps| 2 | 10/100/1000 | Eth only ~320mbps. Onboard wifi dual band |
80-
| Raspberry Pi 3b | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 350k, 100k | 89 Mbps | 2 | 10/100 | |
81-
| Raspberry Pi 2 | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 145k, 55k | 39 Mbps | 2 | 10/100 | |
82-
| Raspberry Pi 1 A+ | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 35k, - | ~9 Mbps | 1 | None | |
83-
| Raspberry Pi 1 B+ | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 51k, 22k | ~8 Mbps | 2 | 10/100 | |
81+
| Genericx x86 | Debian 9 | | | | | Performance depended on underlying hardware. |
82+
| Raspberry Pi 4B (2GB ram) | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 650k, 230k | ~160 Mbps| 4 | 10/100/1000 | Onboard wifi dual band |
83+
| Raspberry Pi 3b+ | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 405k, 119k | ~90 Mbps| 4 | 10/100/1000 | Eth only ~320mbps. Onboard wifi dual band |
84+
| Raspberry Pi 3b | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 350k, 100k | 89 Mbps | 4 | 10/100 | |
85+
| Raspberry Pi 2b | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 145k, 55k | 39 Mbps | 4 | 10/100 | |
86+
| Raspberry Pi 1a+ | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 35k, - | ~9 Mbps | 1 | None | |
87+
| Raspberry Pi 1b+ | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 51k, 22k | ~8 Mbps | 2 | 10/100 | |
8488
| Raspberry Pi Zero | [Raspbian Lite](https://www.raspberrypi.org/downloads/raspbian/) | 68k, 30k | ~9 Mbps | 1* | None | *Need OTG Cable No FPV |
8589
| Orange Pi Lite | [Armbian](https://dl.armbian.com/orangepilite/) | 160k, 74k | 67 Mbps | 2 | None | |
8690
| Orange Pi One | [Armbian](https://dl.armbian.com/orangepione/) | 160k, 74k | 67 Mbps | 1 | 10/100 | |
@@ -116,6 +120,8 @@ To add a new module, use **scripts/ipfs/** as an example to:
116120
117121
* We keep a list of [Frequently Asked Questions](./docs/FAQ.md). Feel free to add to this list with the issues you experienced on your boards.
118122
119-
* Your computer can be a node too! It will mesh with the Pi's over your router. See the [cjdns repository](https://github.com/cjdelisle/cjdns) on how to set this up.
123+
* We have a [Troubleshooting](./docs/TROUBLESHOOT.MD) doc with information to point you in the right direction of some common problems.
124+
125+
* Your computer can be a node too! It will mesh with the Pi's over your router. See the [cjdns repository](https://github.com/cjdelisle/cjdns) on how to set this up. You can now also install this prototype stack on debian/ubuntu PC hardware. This includes a Virtual Machine.
120126
121127
* Original plan for this repository and early benchmark results are available in [the doc folder](./docs).

contrib/GeoLocation/geo.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
// Place on a server as proxy for hideing the google API key
3+
$apiKey="<YOUR GOOGLE API KEY FOR GEO LOCATION";
4+
5+
$json= file_get_contents('php://input');
6+
$json = str_replace(",}}","}}",$json);
7+
8+
$url='https://www.googleapis.com/geolocation/v1/geolocate?key=' . $apiKey;
9+
10+
$ch = curl_init($url);
11+
curl_setopt($ch, CURLOPT_POST, 1);
12+
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
13+
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
14+
$result = curl_exec($ch);
15+
echo $result;
16+
?>

contrib/GeoLocation/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
sudo apt-get install -y jq
3+
sudo cp "nodeinfo-geolocation" /opt/tomesh/nodeinfo.d/geolocation
4+
sudo chmod +x /opt/tomesh/nodeinfo.d/geolocation
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
echo "{ "wifiAccessPoints": {" > /tmp/locationScan
4+
iwlist wlan0 scanning | grep Cell | grep Address | awk '{print "\"macAddress\": \""$5"\","}' >>/tmp/locationScan
5+
echo "}}" >> /tmp/locationScan
6+
7+
curl -d @/tmp/locationScan -H "Content-Type: application/json" "http://node2.e-mesh.net/geo.php" -o /tmp/locationResult > /dev/null
8+
9+
if [ -z "$(type jq)" ]; then
10+
a=$(cat /tmp/locationResult |grep \"accuracy\" | awk '{print $2}')
11+
lat=$(cat /tmp/locationResult |grep \"lat\" | awk '{print $2}')
12+
lng=$(cat /tmp/locationResult |grep \"lng\" | awk '{print $2}')
13+
else
14+
a=`jq -r ".accuracy" /tmp/locationResult 2>/dev/null`
15+
lat=`jq -r ".location.lat" /tmp/locationResult 2>/dev/null`
16+
lng=`jq -r ".location.lng" /tmp/locationResult 2>/dev/null`
17+
fi
18+
19+
echo "\"geolocation\": {"
20+
echo " \"latitude\": \"$lat\","
21+
echo " \"longitude\": \"$lng\","
22+
echo " \"accuracy\": \"$a\""
23+
echo "},"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
3+
# Break bridge configured by default
4+
5+
# Disable systemd management of network interfaces except to bring up eth0 with random MAC address
6+
sudo rm -rf /etc/systemd/network/*
7+
8+
sudo tee /etc/systemd/network/10-eth0.network << END
9+
[Match]
10+
Name=eth0
11+
[Network]
12+
DHCP=ipv4
13+
END
14+
15+
sudo tee /etc/systemd/network/10-eth0.link << END
16+
[Match]
17+
MACAddress=f0:ad:4e:03:64:7f
18+
[Link]
19+
MACAddressPolicy=random
20+
END

contrib/captive-portal/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# NoDogSplash captive portal
2+
3+
Source: https://github.com/nodogsplash/nodogsplash
4+
5+
Nodogsplash is a Captive Portal that offers a simple way to provide restricted access to the Internet by showing a splash page to the user before Internet access is granted.
6+
7+
This script install and configured the Nodogsplash captive portal to run on `wlan-ap` interface of the prototype stack.
8+
9+
## Installation
10+
11+
```
12+
chmod +x install-nodogsplash.sh
13+
./install-nodogsplash.sh
14+
```
15+
16+
## Issues
17+
18+
Some people have objections using captive portal because it hijacks traffic and could potentially be a privacy violation. Additionally it prevents headless devices from accessing the internet.
19+
20+
## Nice to have
21+
22+
- [ ] Nice tomesh splash screen (/etc/nodogsplash/htdocs/splash.sh)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
sudo apt install -y libmicrohttpd-dev
4+
5+
mkdir tmp
6+
cd tmp
7+
git clone https://github.com/nodogsplash/nodogsplash.git
8+
cd nodogsplash
9+
make
10+
sudo make install
11+
sudo cp debian/nodogsplash.service /etc/systemd/system
12+
cd ..
13+
cd ..
14+
rm -rf tmp
15+
16+
cp nodogsplash.conf /etc/nodogsplash/nodogsplash.conf
17+
sudo systemctl enable nodogsplash
18+
sudo systemctl start nodogsplash
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
GatewayInterface wlan-ap
2+
#login_option_enabled 1
3+
FirewallRuleSet authenticated-users {
4+
FirewallRule allow all
5+
}
6+
FirewallRuleSet preauthenticated-users {
7+
# FirewallRule allow tcp port 80 to 123.321.123.321
8+
}
9+
FirewallRuleSet users-to-router {
10+
FirewallRule allow udp port 53
11+
FirewallRule allow tcp port 53
12+
FirewallRule allow udp port 67
13+
FirewallRule allow tcp port 22
14+
# FirewallRule allow tcp port 80
15+
# FirewallRule allow tcp port 443
16+
}
17+
GatewayName ToMeshNode
18+
GatewayAddress 10.0.0.1
19+
GatewayPort 2050
20+
MaxClients 250
21+
AuthIdleTimeout 480

0 commit comments

Comments
 (0)