How to connect to Hyperboria


There are already several articles on Habré about the Hyperboria network:
Hyperboria: Internet 2.0
Hyperboria: How it works
Hyperboria: Routing
In them you can read details about the device and the principles of the network, resolving some problems and all that.

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


Q. What are we talking about?
A. About the distributed decentralized p2p-network built on the basis of cjdns
B. And why is it needed?
A. Then, that the current Internet is too dependent. Depends on providers and on the states regulating them. Connection to the mesh network is absolutely open and free, information cannot be censored, and it is impossible to match your IPv6 address on the network with a real physical address (in the case of a full mesh network).

Q. What do I need to connect?
O. Device with * nix-system (including OS X)
B. But what about Windows?
A. Development is in progress.
Q. Do you need Internet access?
A. For now - you need, but in a strategic plan, the transition to a full mesh network.

Q. What is a mesh network?
A. Cjdns supports two modes of operation:
  • overlay mode - when the connection between nodes occurs over a regular Internet connection
  • Mesh mode - when the nodes are connected directly (for example, via Wi-Fi two nearby routers), without connecting to the Internet


Assembly from source
This is the installation method officially proposed by the author (my translation).
Here is still README in Russian from shifttstas

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

Next, we pump out a repository with github and switch to the appropriate directory:
git clone cjdns
cd cjdns

Actually, the assembly:
If you build successfully, you’ll see
Build completed successfully

There are installation instructions for ArchLinux and for Gentoo

0. Check that there is everything you need
cat /dev/net/tun

If this happens:
cat: /dev/net/tun: File descriptor in bad state
then everything is ok! Go ahead
If you get this answer
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 again
cat /dev/net/tun

If in return you get this
cat: /dev/net/tun: Permission denied
You are probably using VPS based on the OpenVZ platform. Ask the host to enable you the “tunnel interface” TUN / TAP 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 put it, for example, in home
chmod 600 cjdroute.conf
mv cjdroute.conf ~/.cjdroute.conf

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

You can look at the project map , ask in the IRC chat irc: //, try to ask on the Russian-language forum .

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

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

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

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

If you want to give someone access through your node, the data is in the config in the comment next to the 'authorizedPasswords' section.
You only need to enter your external ip-address.
In the 'authorizedPasswords' section, you can add different passwords for different people, and you can add any fields to the json-information about peers in 'connectTo' (for example, information about the geographic location of a node).

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 someone could connect to.

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

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

Also, logs can be watched "live" through my web admin
panel. To turn off cjdns
sudo killall cjdroute

To run cjdns not from root, there is also an instruction

You are online
Try logging into some Hyperboria service.
For example, an analogue of Twitter:
At the first start, it may take several minutes to build routes.

Web interface to cjdns admin API
I wrote a small admin on nodejs that was frozen into the main cjdns repository.
For use, you will need node.js and the json file '~ / .cjdnsadmin' with the following contents:

We 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 the admin panel:
node admin.js

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

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

Mesh Connection
This type of connection so far only works for linux and does not work in OS X.
Ideally, everything is simple: you need to find the commented out section 'ETHInterface' in the config 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 in your network (physical) with ETHInterface enabled, they will automatically connect to each other.

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

OpenWRT assembly with cjdns support

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

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

First, check your router for compatibility .

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

World capture

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

I suggest 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 on the network
List of famous sites

Project sites
Project wiki
Russian-language website and forum