📄 | .gitignore |
📄 | LICENSE |
📄 | README.md |
📄 | index.js |
📁 | lib |
📄 | package.json |
ssb-dns
It's fairly easy to serve dns from a nodejs process.
scuttlebot makes it easy to work with a peer-to-peer log store.
So let's mash them together.
What could go wrong?
Installation
Via npm:
npm i -g ssb-dns;
Or via git:
git clone https://github.com/ansuz/ssb-dns;
cd ssb-dns;
npm i -g;
Usage
ssb-dns
assumes that you have a scuttlebot instance running.
You can find out more about scuttlebot here.
Publish a record
NOTE:So far the publishing script is hardcoded to reject records which don't end in .ssb
.
This was cSmith's idea.
In the future this might be genralized to squat even more TLDs, or to simply be unopinionated about them.
ssb-dns publish [{prev record key}...] {domain name} {record type} {value} [optionally add a dns class]
To replace some existing ssb-dns records, pass their ssb message id(s) as the first arguments to the publish command. To append a record to the set of existing records, omit the message ids.
To replace all existing records for a name+type+class, use update
:
ssb-dns update {domain name} {record type} {value} [optionally add a dns class]
Fetch a record
First launch the server in one terminal:
ssb-dns server {port: 53053} {host: 127.0.0.1}
Then query it for a record:
dig @localhost -p 53053 {name} {type}
FAQ
Can I use this without running scuttlebot?
You could get a friend to host ssb-dns for you if you really trust them. Once running, you should be able to use the dns server as you would any other dns provider.
Is it Enterprise-Ready?
Hell no. It barely works
Does it protect against name-squatting?
Not even a little bit.
Does it resolve conflicts if they occur?
Not yet.
What is it good for?
- If there is a DNS outage you can still resolve any you or your friends have published to ssb
- If you don't have access to the internet at all, this will continue to work (for some definition of work)
- You can use this as a kind of distributed hosts file
How optimized is this?
Not much, but it should get better over time if people are interested in using it.
Built with git-ssb-web