GithubHelp home page GithubHelp logo

js-deje's Introduction

djdns

DJDNS is a DNS server written in Go. It uses the DEJE protocol to host and validate a decentralized registry, which helps us move toward a more secure and distributed internet.

There is an earlier version of DJDNS out on the interwebs, written in Python, which is now deprecated. Don't use it. All the features will be ported here soon, and the most important feature (using DEJE) is not supported by python-djdns, but is supported by this program.

Why DJDNS?

I'm going to assume you're already basically sold on the world needing something more transparent and secure than ICANN, which is the current "official" DNS registry. So why DJDNS, versus any of the other alternatives?

  • It can unify the altdns world, because it's designed to be really good for reverse-proxying the DNS protocol. You don't have to choose between this or Namecoin or OpenNIC or ICANN. With DJDNS, you get everything. By supporting everything, we give even the littlest underdog altdns a large audience who can use it instantly and painlessly.
  • No dogma imposed on anybody. DJDNS is designed to be a political and technical archipelago, where anyone can claim a corner of the infinite internet, and declare their own rules (or copyleft-like "unrules") for how that corner should operate.
  • Massive democracy for the pieces that everybody uses. In order to change the <ROOT> page, which is the starting point for every DNS resolution, many many trusted individuals in many countries must come to majority agreement. The intention is for it to become impractical for any government or private entity to leverage the namespacing of the internet without majority consent.
  • Trivial to include additional metadata, such as Bitcoin addresses, cryptographic pubkeys and certificates, email address, custom message, Twitter handle, sitemap, donation URL, a base64-encoded picture of a giraffe, a recipe for potato salad, per-distro installation instructions, torrent data, and more. If you can think of a way to encode it as JSON, you can include it.
  • Transparent history, like the Bitcoin blockchain.
  • Democratic consent system is not susceptible to Sybil attacks.
  • Event chain is not susceptible to differing opinions. For every page, there is a canonical content which can be deduced without trusting any of the DEJE peers (even if they all collaborate to lie to you).
  • Underlying technology is used by non-DNS stuff, which means that platform maturity and bugfixing are advanced by a much wider developer audience. It's like how mobile Linux benefits from desktop Linux, and vice versa, and they both share improvements with server Linux. Because everyone is using the same kernel, and everyone gets the benefits from everyone else, they all see a lot of improvements and robustness for their own use.

Can I run this, right now?

Yes, but it's not really mature enough for production use. Feel free to play around with it, though.

How to?

You need to set up a Go environment, before anything, and it's not really my job to hold your hand through that. This is not terribly user-friendly yet anyways - the current audience is developers.

go get github.com/DJDNS/djdns
go install github.com/DJDNS/djdns
djdns # Leave this running and get ready to start some more terminals

This will install djdns to your PATH (assuming you have your Go env and PATH set up properly), and start the server. You also need to provide the server with data via the DEJE protocol.

go install github.com/DJDNS/go-deje/djconvert
djconvert --pretty up $GOPATH/src/github.com/DJDNS/djdns/model/demo.json dns.json
go install github.com/DJDNS/go-deje/demo/router
router

# In another terminal
go install github.com/DJDNS/go-deje/demo/client
client --file dns.json --topic deje://localhost:8080/root

Now we've got a DEJE router running, and a client with DJDNS data available on the router, subscribed to the same topic that DJDNS uses.

Finally, in one more terminal, we test it out.

dig @localhost -p 9953 ri.hype

You should see some activity in the djdns terminal, and the dig command (which does DNS queries) should be able to retrieve some DNS records from the djdns process. Success!

These instructions are currently rough and untested. I'd like to try it in a VM to confirm they work in a clean environment, from scratch.

You can play with this more using the browser client, which ships with go-deje, and is available as long as the router is running. Just point your browser at http://localhost:8080/ and reconnect with the correct topic (deje://localhost:8080/root). You can look at the go-deje documentation for more information, or the series of demo screencasts on DJDNS, for more info on how this works.

What's the relationship with CJDNS?

They tackle completely different decentralization needs. The name similarity is coincidence.

cjdns = cjd ns = Caleb James Delisle's Networking Suite.
djdns = dj dns = DEJE DNS.

They don't even split the same way as acronyms.

That said, it is expected that the two technologies will work really well together, and that Hyperborians will want to use DJDNS as their DNS service once DJDNS is mature enough.

js-deje's People

Contributors

campadrenalin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

js-deje's Issues

DELETE leaves null entry when used on arrays

If you have an array with 2 elements, and you DELETE the second, you end up with [, null]. That's not correct. And since DELETE can have some more complex implications on arrays, we need to make sure this works right.

Implement Event.compatibleWith(other)

Right now this just returns true, because for demo purposes, that's usually the case. For the real world, with scary people, we need something a little more robust, that actually takes the event graph topography into account.

Travis CI integration

We really want to run the serialization test suite every time we push. Someday, there will also be a test suite for the rest of the code, and we want that to be able to just hook into an existing Travis setup.

Track timestamps

I didn't want to outrageously inflate the scope of #5, and support things that are totally unprecedented/not strictly necessary for the browser client. But for simple, drop-in use, especially for other projects? We want us some timestamp support.

Peer timestamp sharing is not a permanent situation, but it's here to stay for awhile, so it's not chasing shadows to support it in js-deje.

Clean up object serialization API

There's a bit of awkwardly duplicated code in document.serialize and event.serialize. Both of them should, ideally, accept a format object and pass it on to utils.serialize.

Will also need changes to the test suite.

Update to support protocol v02

Version 02 of the protocol is out and working in go-deje, although the ticket to update the version number itself is still pending at this time (DJDNS/go-deje#38).

Update js-deje to support the new protocol mechanisms, and deprecate the old ones.

Automatic timestamp navigation

Figure out, and go to, the current tip event, as per current client.timestamps value.

This is that permanent logic that's gonna stick around even when we stop passing timestamps around between peers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.