📜 ⬆️ ⬇️

How to connect to Hyperboria

Introduction

On Habré there are already several articles about the Hyperboria network:
Hyperboria: Internet 2.0
Hyperboria: How it all works
Hyperboria: Routing

In them you can read the details about the device and the principles of the network, the resolution of some problems and so on.

Here I want to write something like FAQ + guide on the connection.

FAQ

Q. What is it all about?
O. On a distributed decentralized p2p network built on the basis of cjdns
')
Q. And why is it needed?
A. Then that the current Internet is too dependent. Depends on providers and their regulatory states. The connection to the mesh network is completely open and free, the information cannot be censored, and it is impossible to match your ipv6 address on the network with the real physical address (in the case of a full-fledged mesh network).

Q. What do I need to connect?
O. Device with * nix-system (including OS X)

Q. What about Windows?
O. Development is underway.

Q. Do I need Internet access?
A. So far - it is needed, but in the strategic plan, the transition to a full-fledged mesh network.

Q. What is a mesh network?
A. Cjdns supports two modes of operation:

Connection

Build from source
This is the installation method officially proposed by the author (my translation).
Here's another README in Russian from shifttstas

You will need git, cmake and all sorts of other standard stuff.
For Debian \ Ubuntu:
sudo apt-get install cmake git build-essential 

Next, we download the repository from github and switch to the appropriate directory:
 git clone https://github.com/cjdelisle/cjdns.git cjdns cd cjdns 

Actually, the assembly:
 ./do 
With a successful build, you will see
 Build completed successfully 

There are installation instructions for ArchLinux and for Gentoo

Customization
0. Check that you have everything you need.
 cat /dev/net/tun 

If you get this:
 cat: /dev/net/tun: File descriptor in bad state 
so everything is OK! Go ahead

If received such a response
 cat: /dev/net/tun: No such file or directory 
Run the following commands:
 sudo mkdir /dev/net && sudo mknod /dev/net/tun c 10 200 && sudo chmod 0666 /dev/net/tun 

Try running again.
 cat /dev/net/tun 

If in return you get this
 cat: /dev/net/tun: Permission denied 
You are probably using a VPS based on the OpenVZ platform. Ask the hoster to turn on the TUN / TAP “tunnel interface” for you - this is a standard thing, they need to know how to do it.

1. Create a configuration file
 ./cjdroute --genconf >> cjdroute.conf 
This file is your everything! There are your keys, ipv6 address, access passwords, etc. etc., respectively, it must be well protected.

Set access rights to the file only for yourself and place it, for example, in home
 chmod 600 cjdroute.conf mv cjdroute.conf ~/.cjdroute.conf 

2. Find peers
The most difficult step is while the network is mainly working in overlay mode (i.e., over an Internet connection), to connect to Hyperboria you need to find someone who is already connected.

You can look at the project map , ask the irc: //irc.efnet.org/#cjdns in the IRC chat, try to ask on the Russian-speaking forum .

There are some public nodes, but they are bad because (because of the small number of nodes in general) they break down decentralization and become the connection centers themselves. You can connect through a public node, and then find someone inside the network (for example, there is an internal microblogging service ).

3. Add info peer to config
To connect to the feast, you need its ip and port, password and public key. Usually, all this is transmitted in the form of JSON, looks like this:
 "123.45.67.123:34567": { "password": "sjfhgwetuyfdgwudbjwedgu34", "publicKey": "amnfbwjhfbu4bwhcbuwyrho2iudh384rgiwyebuwygriwebdfgueyr.k" } 

Similar information should be inserted into the config in the 'connectTo' field
 // Nodes to connect to. "connectTo": { "0.1.2.3:45678": { "password": "thisIsNotARealConnection", "publicKey": "thisIsJustForAnExampleDoNotUseThisInYourConfFile.k" } } 
Or use my web interface (about it a little further ).

You can add as many peers as you like (and the more the better).

If you want to give someone access through your node, then the data is in the config in the comments next to the 'authorized Passwords' section.
You only need to enter your external ip-address.
In the 'authorized Passwords' section, you can add different passwords for different people, and in json-information about peers, you can add any fields to the 'connectTo' (for example, information about the node’s geographical location).

4. Check open ports!
After connecting to the network, your node will receive a white static ipv6 address (however, available only from Hyperboria), so it is important to check if there are any open ports unknown to you that anyone could connect to.

5. Let's go!
 sudo ./cjdroute < ~/.cjdroute.conf 

If you need to write logs:
 sudo ./cjdroute < ~/.cjdroute.conf > cjdroute.log 

Also, logs can be viewed "live" through my web admin panel.

To turn off cjdns
 sudo killall cjdroute 

To run cjdns not from the root, too, there is an instruction

You are online
Try accessing some Hyperboria service.
For example, an analogue Twitter: http://socialno.de
When you first start it may take a few minutes to build routes.

The web interface to the admin cjdns API
I wrote a small admin on nodejs , which I saved to the main cjdns repository.
To use, you will need node.js and a json file '~ / .cjdnsadmin' with the following contents:
 {"config":"~/.cjdroute.conf"} 

Go to the cjdns repository directory, then go to the admin directory:
 cd contrib/nodejs/admin 

Install node.js dependencies using npm:
 npm install 

Run admin panel:
 node admin.js 

By default, the admin panel starts at http: // localhost: 8084 , is not closed for access from the outside, so do not keep it running all the time.

In the admin, you can execute API methods, view logs of various levels on the air, edit peers. If hands reach, a visual network map will be available soon.
When saving a config from the admin after changing peers, the previous version is saved in the config directory.
The only drawback is that when saving, all comments are deleted, so if that happens, look at the very first version of the config.

Mesh connection
This type of connection currently works only for linux and does not work in OS X
In the ideal case, everything is simple: you need to find in the config the commented section 'ETHInterface' and uncomment it.
Also, you must specify in the 'bind' field the name of the network interface that you want to use to search for nodes (for example, 'eth0').

Restart cjdroute and if there are other cjdns nodes with 'ETHInterface' enabled in your network (physical), they will automatically connect to each other.

At the same time, if none of the nodes is connected to the Hyperboria peers, then you will get your own cjdns-LAN, with encrypted traffic and other joys by default.

Build OpenWRT with cjdns support

If you want to install cjdns on a router, you will have to tinker a little longer.

Once you are thinking about it, most likely, you will not be difficult to read the instructions in English .
The main joint that I myself made on the first attempt is an attempt to build OpenWRT directly on the router :)
Of course, this should be done on a normal computer, and then install the compiled firmware on the router.

Beforehand, check your router for compatibility .

By the way, on my Netgear WNDR3600 it started up, but after a week the router began to blunt terribly (even with cjdns turned off), I had to tear down OpenWRT and put dd-wrt back.

Capture the world

The global plans of the author cjdns and the community in general - replacing the current Internet with Hyperboria.
Now there are several mesh network sites in the States (the largest, if not mistaken, in Seattle).

I suggest that those interested in building a network in Russia (and in Moscow, in particular) come to the forum to develop a capture plan.

What is already in the network
List of famous sites

Sites about the project
http://hyperboria.net
http://projectmeshnet.org/
Project wiki
Russian site and forum

Source: https://habr.com/ru/post/192252/


All Articles