Skip to content

Commit 3d2ce14

Browse files
author
Lars Gierth
committed
Merge commit '562cd8ac1f17f8c5e9640bbc6a5365a33e3af749'
2 parents 7627f3c + 562cd8a commit 3d2ce14

14 files changed

+152
-46
lines changed

doc/achievements.md

+34-35
Original file line numberDiff line numberDiff line change
@@ -21,45 +21,46 @@ Achievements expire, so if at any given time you don't qualify, you lose those p
2121
9. Launch and maintain a webserver on Hyperboria.
2222
10. Provide an RSS feed so others can subscribe for updates.
2323
11. Help a newb on EFNet.
24-
12. Read everything in [Project Meshnet's documentation repository](https://github.com/projectmeshnet/documentation).
25-
13. `watch` the Documentation repository so you hear about updates.
24+
12. Read everything in [the documentation repository](https://github.com/hyperboria/docs).
25+
13. `watch` the documentation repository so you hear about updates.
2626
14. Set up an IRC bouncer and point it at HypeIRC so you don't miss anything. Combinations of command line clients and tmux or screen are considered equivalent.
2727
15. Contribute to the documentation repository at least once a month.
28-
16. Participate in [keysigning Tuesday](#).
29-
17. Make (or contribute to) a meshlocal page for your area.
30-
18. Have a hype-enabled xmpp account
31-
19. Configure a persistent link between nodes independent of the internet.
32-
20. Blag about cjdns or Project Meshnet.
33-
21. Design some form of rich media for Project Meshnet (graphics, video, animation, audio, presentation slides).
34-
22. Discover a bug in cjdns, and give it a memorable name.
35-
23. Host or register a cjdns, Project Meshnet, or Mesh-local mailing list.
36-
24. Subscribe to any of the above lists.
37-
25. Learn HTML
38-
26. Have someone else quote you and commit the results to a HypeIRC bot's factoid system.
39-
27. Build cjdns on an android phone.
40-
28. Read all of [xkcd](http://xkcd.com/).
41-
29. Install at least one Linux distribution other than Ubuntu.
42-
30. Erase Microsoft windows from every computer you own.
43-
31. Host your own email server.
44-
32. Host your own ircd.
45-
33. _Don't_ run your irc client as root!
46-
34. Host a show on [HypeRadio](http://radio.cynical.us/hostashow.html).
47-
35. Cross compile cjdns for another platform.
48-
36. Contribute to [Hyperboria's news agency](http://news.hyperboria.net/).
49-
37. Document an undocumented function or component of cjdns.
50-
38. Implement a function or component of cjdns in an alternate language
51-
39. Translate an article into another language (and maintain it).
52-
40. Update cjdns without pinging out on IRC.
53-
41. Configure an authorizedPassword without restarting cjdns.
54-
42. Find out whether your home router can run cjdns: [OpenWrt table of hardware](http://wiki.openwrt.org/toh/start)
55-
43. Try out the [Meshbox firmware](https://github.com/seattlemeshnet/meshbox) on your home router.
28+
16. Make (or contribute to) a meshlocal page for your area.
29+
17. Have a hype-enabled xmpp account.
30+
18. Configure a persistent link between nodes independent of the internet.
31+
19. Blag about cjdns or Project Meshnet.
32+
20. Design some form of rich media for Project Meshnet (graphics, video, animation, audio, presentation slides).
33+
21. Discover a bug in cjdns, and give it a memorable name.
34+
22. Host or register a cjdns, Project Meshnet, or Mesh-local mailing list.
35+
23. Subscribe to any of the above lists.
36+
24. Learn HTML
37+
25. Have someone else quote you and commit the results to a HypeIRC bot's factoid system.
38+
26. Build cjdns on an android phone.
39+
27. Read all of [xkcd](http://xkcd.com/).
40+
28. Install at least one Linux distribution other than Ubuntu or Mint.
41+
29. Erase Microsoft windows from every computer you own.
42+
30. Host your own email server.
43+
31. Host your own ircd.
44+
32. _Don't_ run your irc client as root!
45+
33. Host a show on [HypeRadio](http://radio.cynical.us/hostashow.html).
46+
34. Cross compile cjdns for another platform.
47+
35. Contribute to [Hyperboria's news agency](http://news.hyperboria.net/).
48+
36. Document an undocumented function or component of cjdns.
49+
37. Implement a function or component of cjdns in an alternate language
50+
38. Translate an article into another language (and maintain it).
51+
39. Update cjdns without pinging out on IRC.
52+
40. Configure an authorizedPassword without restarting cjdns.
53+
41. Find out whether your home router can run cjdns: [OpenWrt table of hardware](http://wiki.openwrt.org/toh/start)
54+
42. Try out the [Meshbox firmware](https://github.com/seattlemeshnet/meshbox) on your home router.
55+
43. Harden your cjdns OpenWrt router by building OpenWrt with cjdns from source and make sure [seccomp](http://lwn.net/Articles/475043/), [SSP](http://lwn.net/Articles/584225/) and [RELRO](http://tk-blog.blogspot.de/2009/02/relro-not-so-well-known-memory.html) are enabled. Using [musl](http://www.musl-libc.org/) instead of [uClibc](http://www.uclibc.org/) may make you sleep even better. See [buildsdk.sh](https://github.com/SeattleMeshnet/meshbox/blob/master/buildsdk.sh) to see how this can work.
56+
44. Monitor your nodes' cjdns preformance and make pretty graphs with munin (hint: [here's a nice munin plugin to help](https://github.com/thefinn93/munin-plugins/blob/master/cjdns/cjdns_bandwidth.py))
5657

5758
## Penalties
5859

59-
Avoid qualifying for these _achievements_, as they count against your score.
60+
*Don't do the following*, they count against your score:
6061

61-
1. Provide peering credentials without including a means of getting in contact.
62-
2. Provide peering credentials with extra information in the form of line or block comments. (You should be embedding them as JSON attributes instead!)
62+
1. Provide peering credentials without including a means of getting in contact, such as an email address
63+
2. Provide peering credentials with extra information in the form of line or block comments. You should be embedding them as JSON attributes instead!
6364
3. Provide peering credentials without the IPV6 included. (You can get by with just a password and publicKey, and your IPV6 can always be inferred from your publicKey, but it means more work to figure out who you are).
6465

6566

@@ -71,5 +72,3 @@ Avoid qualifying for these _achievements_, as they count against your score.
7172
* **Newest is best**. Every now and then there are intentionally breaking changes. This happens when the network is suffering because of old nodes. In such cases, modifications are made which cause up to date nodes to drop old nodes' traffic. If you don't update, you might fall off the map. If you are running a protocol in between the cutoff point and the bleeding edge, you may be the link which allows older nodes to continue participating in the network. Please update so we can all use the latest features to better diagnose bugs.
7273
* **There is no substitute for understanding**. People build tools that streamline difficult processes, but ultimately you cannot rely on software to fix all of your problems. At some point, bad behaviour has to change, and that means understanding the principles behind security, exercising discipline, and informing those around you when they are putting themselves (and possibly others) at risk.
7374
* **We cannot rely entirely on the experts**. This is closely related to [Brooks' Law](http://en.wikipedia.org/wiki/Brooks%27s_law). An expert in a subject is in an excellent position to push further, and learn those things which are out of reach of those with less experience in the subject. Unfortunately, this often means they are in the position of having to choose between learning more about the subject in question, and spending their time sharing disseminating their knowledge. It is very important to understand that when people take the time to help you understand a difficult subject, they need you to help share that information with those who know are less experienced than you. In the Hypeborian community, we've taken to referring to this method as [WTFM](http://www.roaming-initiative.com/blog/posts/wtfm).
74-
75-

doc/bugs/distro-quirks.md

+23
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,26 @@
1616
```
1717

1818
There you have it, Macs don't autopeer via ethernet frames.
19+
20+
This is also probably why it doesn't work on windows, either.
21+
22+
## Raspbian
23+
24+
### Failure to start Cjdns
25+
When running Cjdns on Raspberry Pi with Raspbian you can run in to problems because IPv6 is not enabled by default. This causes Cjdns to fail on startup with the following error message:
26+
27+
```
28+
CRITICAL Configurator.c:107 Got error [UDPAddrIface.c:273 call to uv_udp_bind() failed [bad file descriptor]] calling [UDPInterface_new]
29+
```
30+
31+
Enable IPv6 with
32+
33+
```bash
34+
$ sudo modprobe ipv6
35+
```
36+
37+
and Cjdns should start correctly. To keep IPv6 on after reboot add `ipv6` to the end of the file `/etc/modules`
38+
39+
```bash
40+
$ sudo sh -c 'echo ipv6 >> /etc/modules'
41+
```

doc/bugs/horizon.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
One of the central ideas behind the development of cjdns is that networking protocols should scale up smoothly.
2+
Early development dealt with problems like **not** constructing circular routes, and while that was not yet solved it made sense to limit the length of a path to what would fit within 64 bits of memory.
3+
4+
At this point, many of the early issues that were once challenging have been dealt with, and tucked away into a list of things that we shouldn't forget, but which are no longer relevant.
5+
As the protocol has improved and allowed nodes to see and route further into the network, though, we have begun to encounter bugs which we previously had no opportunity to debug, and consequentially, no opportunity to fix.
6+
7+
The **Horizon** bug is one that we knew was coming, but now we've officially started to hit its limitation.
8+
9+
## The nature of the bug
10+
11+
* nodes have 64 bits of memory in which they can store a path to another node
12+
* each node along the path consumes a variable number of bits dependiung on the number of peers between which they must distinguish (see [switchfun.txt](../switchfun.txt) for some idea of how this works)
13+
* your node cannot route to any node beyond this _horizon_ for the lack of bits required
14+
15+
## So what are the implications of this bug?
16+
17+
1. nodes with more peers consume more bits, and are generally a good thing as they reduce the number of hops to a wider audience of nodes
18+
2. nodes with fewer peers consume fewer bits, and result in more hops on average, however, their simpler encoding will allow your node to reach further into the network
19+
3. If you want to have effective routing to the greatest number of nodes possible, the onus is on you to evaluate your position in the network and peer in such a way that the nodes you wish to connect to are within a reasonable distance (via 'backhaul' links with few peers, or via hubs which connect you within a few hops to a large portion of the net)
20+
21+
## How can we deal with this?
22+
23+
Naturally, we can approach the problem from a few angles, so whatever your skill set is, there's likely something that you can do to help.
24+
25+
1. help rewrite the parts of cjdns which encode the paths such that a variable number of bits can be used
26+
2. use the admin interface to figure out which parts of the network your node can see, and compare those results against a wider view of the network, so we can identify our blind spots
27+
3. evaluate your peering choices, and try to drop bad peers and pick good ones, so that we can continue to have a functional network in the meantime (we're still quite likely to have lots of paths that are out of reach, so we'll still be able to debug this issue, don't worry)
28+
4. talk to your friends about cjdns, and get them to join the network, so we have more opportunity to find long _shortest-paths_ to any particular node (see, you don't even need to know how to code!)
29+
30+
## Conclusion
31+
32+
This is great news! That we are hitting this bug at all means we've progressed quite a bit.
33+
Let's sort this one out so we can move on to the next and make cjdns the de facto choice for mesh networking!

doc/cjdns/nodeinfo-json.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Sample Files:
4444
"webInterface" :"http://example.tld/",
4545
"otherthing": "cactus://example.tld/"
4646
},
47-
"name": "MutliURI service"
47+
"name": "MutliURI service",
4848
"description": "Some service with multiple URIs"
4949
}
5050
]
5151
}
52-
```
52+
```

doc/faq/doppleganger.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ As noted above, this has not been thoroughly tested. Changes to the source code
4646

4747
So please, give it a try, and let us know what you experience. Write about how you used this to your advantage, and go down in cjdns history!
4848

49-
49+
```
5050
09:55 < cow_2001> gloe-ih: yes
5151
09:55 < gloe-ih> check if it bounds to the tun interface
5252
09:56 < cow_2001> it has a build plan for x86_XVA or w/e it's called
@@ -57,5 +57,4 @@ So please, give it a try, and let us know what you experience. Write about how y
5757
09:56 < cow_2001> i'm reading on configuration of the cjdroute.conf
5858
09:57 < cow_2001> i've set up a tun thing for the cjdns user
5959
09:57 < gloe-ih> you'll have to add addresses / routes manually
60-
61-
60+
```

doc/index.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ You can contribute to its documentaion: https://github.com/hyperboria/docs
3737
- [Security Specification](security_specification.md)
3838
- Installation
3939
- [Most Linuxes](install/linux.md) *TODO*
40-
- [OpenWrt](openwrt.md)
40+
- [OpenWrt](install/openwrt.md)
4141
- [Android](install/android.md) *TODO*
4242
- [Firefox OS](install/firefoxos.md) *TODO*
43-
- [OS X](install/osx.md) *TODO*
44-
- [Debian Wheezy](debian-wheezy.md)
43+
- [OS X](install/osx.md)
44+
- [Debian Wheezy](install/debian-wheezy.md)
45+
- [Debian Jessie](install/debian-jessie.md)
4546
- [FreeBSD](install/freebsd.md) *TODO*
4647
- [OpenBSD](install/openbsd.md) *TODO*
47-
- [Windows](windows.md)
48+
- [Windows](install/windows.md)
4849
- [Building *on* Windows](notes/build-on-windows.md)
4950
- [Securing your Windows system](notes/windows-firewall.md)
5051
- Usage

doc/install/debian-jessie.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Installing cjdns on debian jessie
2+
3+
This is a short guide how to setup a debian jessie cjdns box.
4+
5+
## Install packages
6+
7+
apt install nodejs build-essential git
8+
9+
## Clone, compile, install
10+
11+
cd /opt
12+
git clone https://github.com/cjdelisle/cjdns.git
13+
cd cjdns
14+
./do
15+
ln -s /opt/cjdns/cjdroute /usr/bin
16+
(umask 077 && ./cjdroute --genconf > /etc/cjdroute.conf)
17+
cp contrib/systemd/cjdns.service /etc/systemd/system/
18+
systemctl enable cjdns
19+
systemctl start cjdns
20+

doc/debian-wheezy.md doc/install/debian-wheezy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This is a short guide how to setup a debian wheezy cjdns box.
2121
cd cjdns
2222
./do
2323
ln -s /opt/cjdns/cjdroute /usr/bin
24-
./cjdroute --genconf > /etc/cjdroute.conf
24+
(umask 077 && ./cjdroute --genconf > /etc/cjdroute.conf)
2525
cp contrib/systemd/cjdns.service /etc/systemd/system/
2626
systemctl enable cjdns
2727

File renamed without changes.

doc/install/osx.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Installing on Mac OS X
2+
3+
There is now a [brew](http://brew.sh/) formula for cjdns.
4+
5+
To get the latest brew formulae:
6+
7+
`brew update`
8+
9+
Then you should be able to:
10+
11+
`brew install cjdns`
12+
13+
...after which you should have a cjdroute binary available at `/usr/local/Cellar/cjdns/<version>/bin/cjdroute`.
14+
File renamed without changes.

doc/notes/dns.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Now might be a good time to actually figure out how we're going to move forward.
5353
- https://www.youtube.com/watch?v=uhIybhAQ8lY (30c3 lecture)
5454
- https://gnunet.org/sites/default/files/schanzen2012msc.pdf (masters thesis proposing GADS) (read this if you need to kill an afternoon)
5555
- .p2p (from TPB people) - http://p2pfoundation.net/Dot-P2P http://dot-p2p.org
56+
- https://github.com/mwarning/KadNode - P2P DNS and more, written in C, based on the Kad DHT with optional support for signed records using libsodium
5657
- http://couch.syrinxist.org/share/dns-idea.txt #ircerr's idea
5758

5859
### proposed/extant TLDs...
@@ -510,4 +511,4 @@ Codename *lgdns*
510511
<larsg> good night!
511512
<larsg> thanks for the thoughts
512513
<larsg> ... and so lgdns was born
513-
```
514+
```

doc/notes/wanted.md

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ If you see something listed here that has been taken care of, please knock it of
3838
+ cjdns/node_build/make.js
3939
* in the media
4040
* [FAQ](../faq/)
41+
+ how does cjdns choose which path to take? latency? number of hops?
42+
* choosing paths presupposes knowing them, which can get in the way of finding the _optimal_ path. Paths to nodes are stored preferentially based on the [xor metric](../cjdns/functions/Address_xorcmp.md).
43+
* the path choice metric is a combination of various factors (latency and number of hops are among them). This is poorly documented, and we need someone to explore the exact details. Contributions should go in `../cjdns/functions/`
4144
+ My service doesn't like ipv6. how can I get it to run on hype? [6tunnel?](http://toxygen.net/6tunnel/)
4245
* inet6 with tcp6 and netcat
4346
+ How can I help?

doc/tipsAndTricks.md

+13
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,18 @@ Comment the _router.interface_ section <!-- elaboration required --> of the conf
1313

1414
You have the option of configuring your TUN device manually. It will require root, but once established, cjdroute can otherwise run as an unprivileged user.
1515

16+
#### Lint the configuration using JSHint/jsonlint
1617

18+
This is a little trick that will lint the configuration file (`cjdroute.conf`) before starting cjdns.
1719

20+
##### JSHint
21+
Will allow comments, note that JSHint is designed for JS and may not display errors and warnings etc. in all cases.
22+
```Bash
23+
jshint ./cjdroute.conf; if [[ $? == 0 ]]; then ./cjdroute < ./cjdroute.conf; fi
24+
```
25+
26+
##### jsonlint
27+
No comments or other JS exclusive object quirks will be allowed.
28+
```Bash
29+
jsonlint ./cjdroute.conf; if [[ $? == 0 ]]; then ./cjdroute < ./cjdroute.conf; fi
30+
```

0 commit comments

Comments
 (0)