npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ssb-dns

v1.2.3

Published

resolve dns via ssb

Downloads

2

Readme

dnssb

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/dnssb;
cd dnssb;
npm i -g;

Usage

dnssb assumes that you have a scuttlebot instance running. You can find out more about scuttlebot here.

Alternatively, you can run dnssb server as a scuttlebot plugin:

cd dnssb
mkdir -p ~/.ssb/node_modules
ln -rs . ~/.ssb/node_modules/dns
sbot plugins.enable dns
# restart sbot

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.

dnssb publish [{prev record key}...] {domain name} [{ttl}] [{dns class}] {record type} {value}

For example:

# publish an ipv4 record for localhost.ssb
dnssb publish localhost.ssb 3600 IN A 127.0.0.1

# publish an ipv6 record for localhost.ssb
dnssb publish localhost.ssb 3600 IN AAAA ::1

To replace some existing dnssb 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:

dnssb update {domain name} [{ttl}] [{dns class}] {record type} {value}

Display all records

I want to use this

You'll only be able to resolve records that your node knows about.

You can print a list of valid records with:

dnssb dump

Fetch a record

First launch the server in one terminal:

dnssb server {port: 53053} {host: 127.0.0.1}

Then query it for a record:

dig @localhost -p 53053 {name} {type}

The records which are available to you are determined by your peering, but assuming you have tried the localhost.ssb example commands listed above, you should be able to run the following:

# query for ipv4 localhost.ssb
dig @localhost -p 53053 localhost.ssb A

# query for ipv6 localhost.ssb
dig @localhost -p 53053 localhost.ssb AAAA

Questions

See the FAQ

Contributing

dnssb is being developed on the platform for which it is designed (secure-scuttlebutt), using git-ssb. To get involved, join #scuttlebutt on Freenode (irc), and ask to be invited into the network.

Otherwise, you can contact ansuz or cel directly.