improved README

Let's see if anyone reads the comments :)
Changed python to python3 in Makefile
This commit is contained in:
Pranav Jerry 2021-07-29 22:36:53 +05:30
parent f6a5a8556b
commit 7b7ce8044b
No known key found for this signature in database
GPG Key ID: F1DCDC4FED0A0C5B
2 changed files with 49 additions and 34 deletions

View File

@ -2,10 +2,10 @@
all: build
build:
python setup.py build
python3 setup.py build
install: build
python setup.py install --root="$(DESTDIR)/" --optimize=1 --skip-build
python3 setup.py install --root="$(DESTDIR)/" --optimize=1 --skip-build
clean:
rm -rf build naxalnet.egg-info

View File

@ -1,13 +1,28 @@
# naxalnet
**naxalnet** is an experiment to create a wireless mesh network for
communicating with each other during an internet shutdown, using
existing software and tech as much as possible. Currently
you can only communicate with other peers running naxalnet or
using the same network as naxalnet. It uses
[B.A.T.M.A.N. Advanced][batman-adv],
an implementation of the B.A.T.M.A.N. routing protocol to
communicate with peers.
**naxalnet** is a program to create a wireless mesh network for
communicating with each other. It can be useful during an internet
shutdown, or to join online classes with a group of laptops.
It uses [B.A.T.M.A.N. Advanced][batman-adv],an implementation
of the B.A.T.M.A.N. routing protocol to communicate with peers.
WARNING:
This program uses an unencrypted network. This means,
you do not get any more privacy or security than with an open wifi
network.
<!-- NOTE TO ACTIVISTS
Running this program in the world's largest partly free democracy
may result in you getting arrested under the UAPA, and not
getting bail because of false evidence planted in your phone by
Pegasus, or by a forensic lab in Gujarat.
The author, not unlike the Government of India, does not wish
to take responsibility in your well-being if you get arrested under
a draconian national security law, which was once used to arrest
a person involved in the freedom struggle against British Raj.
-->
The name naxal comes from Naxalbari, a village in Darjeeling,
West Bengal.
@ -20,18 +35,15 @@ brigade; or 3) both, please be aware that this project is not affiliated
with any groups designated as "terrorist" groups in India.
Using the name Naxal does not imply any form of connection
with anyone the government of India collectively calles Urban
Naxals (human rights activists, lawyers, poets, writers, journalists
or anyone else advocating for their rights).
with anyone currently at risk of death in overcrowded prisons.
-->
## Requirements
- systemd{,-networkd} v248 or more (for [batman support][batman-systemd])
- Linux kernel with batman-adv module (if `modinfo batman-adv` shows
no error then you already have it)
- iwd (for starting ad-hoc network)
- [systemd v248 or more][batman-systemd])
- Linux kernel with batman-adv module
- iwd
- python3
- python-setuptools (for building)
- [python-dasbus][]
@ -83,30 +95,32 @@ sudo systemctl daemon-reload
You need more than one computer running for the connection to work.
### Communicate between peers
### Start naxalnet
Connect a wifi adapter to all the computers you intend to run
naxalnet.
Start the naxalnet service on all of them:
To start naxalnet, do the command on all the nodes:
```sh
sudo systemctl start naxalnet.service
```
To test if it works, run `ip addr` to find out your address.
Note the `inet` or `inet6` address of `bridge0`. Ping the address
from another computer (example: `ping 169.254.62.90`) to find out
if it is online. Press Ctrl-C to stop.
To test if it works, run `ip -c addr` to find out your address.
Note the `inet` address of `bridge0`. If there isn't one, try again
after a few seconds. If the address starts with 169.254, it has
got a link-local address.
### Getting internet access
Connect an ethernet to any of the peers and start naxalnet.
Now all the peers should be able to connect after renewing
their DHCP connection (`sudo networkctl renew bridge0`).
Connect an ethernet cable to any of the peers and
[start naxalnet][startnx]. Now all the peers should
be able to connect after renewing their DHCP connection
(`sudo networkctl renew bridge0`).
### Tethering via WiFi AP
Connect two wifi adapters on a device and start naxalnet.
If there are two adapters in a peer, naxalnet will start a
wifi ap (wifi hotspot) on one of them.
Connect two wifi adapters on a device and [start naxalnet][startnx].
Now an ap will be created on one of the adapters with
SSID `NaxalNet` and password `naxalnet256`.
If you had set up internet access on one of the peers, internet
@ -116,9 +130,9 @@ can be accessed from the AP.
Starting the service will stop `NetworkManager.service` and
`wpa_supplicant.service` if it is running. If you start either of these
services after naxalnet is started, systemd will stop naxalnet.
services after naxalnet was started, systemd will stop naxalnet.
To run naxalnet at boot, enable the service:
To run naxalnet at boot, enable the service on all the nodes:
```sh
sudo systemctl enable naxalnet.service
@ -194,12 +208,13 @@ license.
[batman-adv]: https://www.open-mesh.org/projects/batman-adv/wiki
[ipfs]: https://ipfs.io
[jami]: https://jami.net
[ssb]: https://scuttlebutt.nz
[python-dasbus]: https://github.com/rhinstaller/dasbus
[jami]: https://jami.net "Peer to peer video calls"
[ssb]: https://scuttlebutt.nz "Secure Scuttlebutt"
[python-dasbus]: https://github.com/rhinstaller/dasbus "Python D-Bus library"
[aur]: https://aur.archlinux.org/packages/naxalnet
[aur-devel]: https://aur.archlinux.org/packages/naxalnet-git
[arch-resolved]: https://wiki.archlinux.org/title/Systemd-resolved#DNS
[batman-systemd]: https://www.open-mesh.org/news/101
[libremesh]: https://libremesh.org
[disaster.radio]: https://disaster.radio/
[startnx]: #start-naxalnet