From e1fe05b280d8be6695af252b810e25ddc8b28114 Mon Sep 17 00:00:00 2001 From: Pranav Jerry Date: Tue, 11 May 2021 13:10:31 +0530 Subject: [PATCH] added How It Works section in README.md Added the `-r` flag to `rm` in the uninstalling section. Changed how the default value of PREFIX is defined in the Makefile --- Makefile | 4 +--- README.md | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index f555506..04482a8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,4 @@ -ifeq ($(PREFIX),) - PREFIX := /usr -endif +PREFIX := /usr install: naxalnet install -d $(DESTDIR)$(PREFIX)/bin diff --git a/README.md b/README.md index a9ed187..a6abd11 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # naxalnet Naxalnet is an experiment to create an intranet and use it for -communicating during an internet shutdown. It tries to use +communicating with each other during an internet shutdown. It tries to use existing software and tech as much as possible. Currently you can only communicate with other peers running the same software. @@ -22,6 +22,19 @@ advocating the constitutional rights). --> +## How it works + +The program naxalnet copies predefined systemd-networkd configuration +into networkd's runtime configuration directory. It uses iwctl to start +an ad-hoc network named "Hello World". The wireless interface is linked to +`bat0`, the batman interface. A bridge `bridge0` is created so that other +devices such as wired connections and wireless ap can be bridged. `bat0` is +added to the bridge, and the bridge gets an ip address (link-local, or DHCP if +any of the computers have a DHCP server configured. If these were successful, +an intranet is created. You can now use services like [IPFS](https://ipfs.io), +[Jami](https://jami.net), [Secure Scuttlebutt](https://scuttlebutt.nz) +and others which can work without internet access. + ## Requirements * systemd v248 or more (for batman support) @@ -35,6 +48,8 @@ advocating the constitutional rights). ### Manually +Clone the repo and cd into it. + Run `sudo make install` to install naxalnet. This will install naxalnet in `/usr/{bin/naxalnet,share/naxalnet/,lib/systemd/system/naxalnet@.service}`. @@ -48,6 +63,7 @@ sudo systemctl daemon-reload ## Running the program +You need more than one computer running for the connection to work. Any network managers such as NetworkManager and wifi daemons like wpa_supplicant should be disabled: @@ -67,11 +83,11 @@ Now naxalnet will configure a batman interface on every boot. Currently there is now way to uninstall naxalnet than to manually removing the files: ``` -sudo rm /usr/{bin/naxalnet,share/naxalnet/,lib/systemd/system/naxalnet@.service} +sudo rm -r /usr/{bin/naxalnet,share/naxalnet/,lib/systemd/system/naxalnet@.service} ``` Or if you installed naxalnet in /usr/local: ``` -sudo rm /usr/local/{bin/naxalnet,share/naxalnet/,lib/systemd/system/naxalnet@.service} +sudo rm -r /usr/local/{bin/naxalnet,share/naxalnet/,lib/systemd/system/naxalnet@.service} ``` ## TODO