MuxZeroNet / proposals

ZeroNet RFC & enhancement proposals
11 stars 0 forks source link

Request for Comments: CJDNS Integration #1

Open MuxZeroNet opened 6 years ago

MuxZeroNet commented 6 years ago

Hello, all:

ZeroMe user Kaffie recently posted on ZeroMe about running the ZeroNet protocol through Cjdns. Built on top of IPv6, Cjdns is an end-to-end encrypted network. If possible, it is a good idea to run ZeroNet over this network.

Kaffie · kaffie@zeroid.bit ― on Dec 20, 2017 I was looking over the ZeroNet github issues and noticed the most recent few comments on IPV6 support. Are all the hurdles done for using ZeroNet over CJDNS? What else needs to be done? It'll be a wonderful day when we no longer have to rely on torrent trackers and the IANA, and also be able to run over meshnets.

Cjdns is new technology. The developers of ZeroNet don’t know how to build applications on top of it. We need the reference material. Before we write any code, we need support from the community.

We need a few volunteers who have experience developing applications on top of Cjdns to help us design the network protocol.

We need a few volunteers who have experience using Cjdns to test our implementation.

MuxZeroNet commented 6 years ago

Good first questions:

purplesyringa commented 6 years ago

/cc @April93

mkg20001 commented 6 years ago

For linux at least ZeroNet automatically listens on the CJDNS address (if cjdns was started before zn) as it is just a plain network interface (unlike tor which requires the application to connect via the control port and create a hidden service). This means no extra CJDNS specific code required (unless CJDNS get's bundled like tor - which requires the installation of the OpenVPN tap driver on windows or root on linux) This would require ipv6 support in zeronet \ = would listen if ZeroNet would support IPv6

mkg20001 commented 6 years ago

How to install, configure and run Cjdns?

ubuntu, windows, other

What does a Cjdns address look like?

"All addresses must begin with the byte 0xFC otherwise they are invalid, generating a key is done by brute force key generation until the result of the double SHA-512 begins with 0xFC." - https://github.com/cjdelisle/cjdns/blob/master/doc/Whitepaper.md#pulling-it-all-together

Edit: Like an Ipv6 address with an fc prefix

Any inter-process communication methods?

I have found this https://github.com/cjdelisle/cjdns/blob/master/tools/lib/cjdnsadmin/cjdnsadmin.js

April93 commented 6 years ago

From my understanding, CJDNS works with any software that supports IPV6. ZN, however, had a few issues throughout it's development that prevented it from working on CJDNS or a mesh net. There was the bootstrapping issue, exchanging peers (both of which are done), IPV6 support, and possibly other things.

@mkg20001 did a good job covering the cjdns portion.

MuxZeroNet commented 6 years ago

So Cjdns programmatically works like a VPN interface. On top of it you see IPv6 unique local addresses being used, but Cjdns does not depend upon having IPv6 provided by your ISP.

All cjdns IPv6 addresses are within the FC00::/8 Unique local address space (keys which do not hash to addresses starting with 'FC' are discarded).[4] Although nodes are identified with IPv6 addresses, cjdns does not depend upon having IPv6. Currently, each node may be connected to a few other nodes by manually configuring links over an IPv4 or IPv6 network (the Internet). The ultimate goal is to have every node connected directly by physical means; be it wire, optical cable or radio waves. [Wikipedia]

MuxZeroNet commented 6 years ago

This is how IPv6 addresses can be packed into the ZeroNet protocol. A method to exchange IPv6 addresses via PEX has been implemented in the unofficial zerolib (zerolib/protocol/packets.py#L282)

However, the official implementation may crash when handling such PEX responses. https://github.com/HelloZeroNet/Documentation/issues/57#issuecomment-335689379

Mikaela commented 5 years ago

You may also be interested in Yggdrasil network, it's similar to CJDNS, but has a less centralized routing, more stable connections (judging by comparing stability of IRC connection between Cjdns and Yggdrasil) and there are premade packages for various distributions, macOS, iOS and even Windows support.

mkg20001 commented 5 years ago

@Mikaela I think the integration is basically similar to CJDNS itself: Because it's using TUN/TAP network interfaces, zeronet will automatically use it if IPv6 support is enabled and it's told to listen on any (::) or the yggdrasil IPv6 address.

General problem with cjdns/yggdrasil support is: How do we get peers to find each other? People would need to run trackers on machines already connected to those networks. I think that's enough to get it working properly.

Mikaela commented 5 years ago

There is at least one Zeronet tracker on Yggdrasil, I don't know how to verify that I am connected to it or have peers in Yggdrasil though.

mkg20001 commented 5 years ago

@Mikaela You can try launching zeronet with --trackers PROTOCOL://[ygg-address] --fileserver_ip ::, though I'm unsure if IPv6 is currently supported by zeronet.

Mikaela commented 5 years ago

I didn't try launching it with that flag, but I noticed that I can click trackers for it to give me their status and it seems that the tracker isn't working at least at the time of writing this comment.

Screenshot from 2019-05-05 16-51-31

IPv6 seems to be supported, because Zeronet gives me this:

Screenshot from 2019-05-05 16-54-04

mkg20001 commented 5 years ago

Nice, so nothing more needed except waiting for some yggdrasil peers. There's a debug page in zeronet which shows all active connections, etc. There you should see the peers connected. Look for IPs starting with 200/201/202/203, they're likely yggdrasil ones.

Edit: Just noticed the yggdrasil peer is offline. Check if your yggdrasil node is integrated properly (look for your address in http://51.15.204.214/) and check that the tracker is online. Otherwise you can run your own on your instance if you rename plugins/disabled-Bootstrapper to plugins/Bootstrapper and add it as zero://[YGGADDRR]:FILESERVERPORT (you need to set a static fileserver port as well)