A lightweight DNS daemon (nameserver) in node.js.
Go to file
AJ ONeal 7437de1e37 note tests that need to be tested 2017-10-09 16:03:37 -06:00
bin minor fixes 2017-10-09 14:07:45 -06:00
lib async-ify, handle vanity ns, bugfix some ns logic 2017-10-09 15:54:18 -06:00
samples async-ify, handle vanity ns, bugfix some ns logic 2017-10-09 15:54:18 -06:00
.gitignore separate digd.js from dig.js 2017-10-02 12:45:33 -06:00
.jshintrc separate digd.js from dig.js 2017-10-02 12:45:33 -06:00
HOW_DELEGATION_WORKS.md WIP dns store 2017-10-06 15:34:36 -06:00
README.md output udp type, show client examples with dig and netcat 2017-10-06 15:54:00 -06:00
TESTS.md note tests that need to be tested 2017-10-09 16:03:37 -06:00
package.json separate digd.js from dig.js 2017-10-02 12:45:33 -06:00

README.md

digd.js

| dns-suite | dig.js | digd.js

A lightweight DNS / mDNS daemon (server) for creating and capturing DNS and mDNS query and response packets to disk as binary and/or JSON. Options are similar to the Unix dig command.

Install

with git

# Install the latest of v1.x
npm install -g 'git+https://git@git.daplie.com/Daplie/digd.js.git#v1'
# Install exactly v1.0.0
npm install -g 'git+https://git@git.daplie.com/Daplie/digd.js.git#v1.0.0'

without git

Don't have git? Well, you can also bow down to the gods of the centralized, monopolized, concentrated, dictatornet (as we like to call it here at Daplie Labs), if that's how you roll:

npm install -g digd.js

Usage

digd.js --input <path/to/file.json>

Example:

digd.js --input ./examples/example.com.json

Testing

# unix dig
dig @localhost example.com

# dns-suite's dig.js
dig.js @localhost example.com

# unix netcat
netcat -u 127.0.0.1 53 < ./samples/example.com.a.query.bin

Options

--output <path/to/file>     write query and response(s) to disk with this path prefix (ex: ./samples/dns)
--input <path/to/file>      input file to use for authoritative responses (ex: ./samples/zones.json)

--mdns                      Use mDNS port (5353) and nameserver address (224.0.0.251)

-p <port>                   default 53 (mdns default: 5353) (listener is random for DNS and 5353 for mDNS)
--nameserver <ns>           alias of @<nameserver>
--timeout <ms>              alias of +time=<seconds>, but in milliseconds

@<nameserver>               specify the nameserver to use for recursive DNS resolutions (defaults to system defaults)
+time=<seconds>             Sets the timeout for a query in seconds.
+norecurse                  Set `ra` flag to 0. Do not perform recursion.
+aaonly                     Set `aa` flag to 1. Do not respond with non-authoritative responses.

--debug                     verbose output

Other Resources

You may also be interested in Unbound (https://unboundtest.com), which is an entirely different project by someone else which is much more complete, written in go, and may be very useful for debugging and linting.