Coder Social home page Coder Social logo

dns's Introduction

Build Status dependency Status devDependency Status NPM version

This repository has been abandoned.

This project was a proof of concept to see if it was viable to build a small DNS server with an API. As a PoC it was nice, but too many issues with the underlying libraries made it not viable to use in production.

DNS

A DNS Server with an Web UI and using Redis a configuration store. Read further for Docker instructions.

Installation

brew install redis
sudo npm install -g dns

Startup

/usr/local/opt/redis/bin/redis-server /usr/local/etc/redis.conf >& /tmp/redis.log &
sudo dns >& /tmp/dns.log &

Web UI

open http://localhost:8053

REDIS CONFIGURATION

REDIS_PORT_6379_TCP_ADDR  (default: 127.0.0.1)
REDIS_PORT_6379_TCP_PORT  (default: 6379)

DNS CONFIGURATION

DNSINTERFACE (default: 0.0.0.0)
DNSPORT      (default: 53 <- require root privilege to run)
DNSZONE      (default: local.dev)
DNSTTL       (default: 3600 <- one hour)
DNSPREFIX    (default: "dns:" <- key prefix in redis)
DNSPRIMARY   (default: 8.8.8.8)
DNSSECONDARY (default: 8.8.4.4)
DNSTIMEOUT   (default: 1000 <- 1 second)

REST ROUTES

* GET /dns/api/v1/name

	List all host to ip address mapping

* GET /dns/api/v1/name/{host}

	Return the ip address of only that host

* PUT /dns/api/v1/name/{host}

	Create or Modify the ip address for "host"

* DELETE /dns/api/v1/name/{host}

	Remove the host from the DNS

* DELETE /dns/api/v1/name?force=true

	Remove all host from the DNS

* GET /dns/api/v1/zone

	Return the DNS ZONE

* GET /dns/api/v1/status

	Return the DNS status

To create or modify a host in the DNS configuration

Single host
curl -X PUT -H 'Content-Type: application/json' -d '{"ipv4":["192.168.1.1"], "ipv6":["2605:f8b0:4006:802:0:0:0:1010"]}' http://localhost:8053/dns/api/v1/name/database.domain.com

Multiple hosts
    curl -X PUT -H 'Content-Type: application/json' -d '{"ipv4":["192.168.1.1","192.168.1.2"], "ipv6":["2605:f8b0:4006:802:0:0:0:1010","2605:f8b0:4006:802:0:0:0:1011"]}' http://localhost:8053/dns/api/v1/name/database.domain.com

To query the address of a host

curl http://localhost:8053/dns/api/v1/name/database.domain.com
or
dig @127.0.0.1 database.domain.com
or
dig @127.0.0.1 database.domain.com AAAA

To remove a host from the registry

curl -X DELETE http://localhost:8053/dns/api/v1/name/database.domain.com

UPGRADING from 0.0.9 or 0.1.0 to a version greater than 0.1.0

You will need to clear your redis configuration before running the new version.

curl -X DELETE http://localhost:8053/dns/api/v1/name\?force\=true
or
for key in `echo 'KEYS dns*' | redis-cli | awk '{print $1}'` ; do echo DEL $key ; done | redis-cli

Running in Docker

This DNS server is able to run as a docker container. To build the container, run a command similar to the following (htdns is a shorthand for HTTP/DNS):

docker build -t efrecon/htdns .

To run, once you have your image, issue something similar to the following command:

docker run -it --rm -p 8053:8053 -p 53:53 --name=dns -e DNSTTL=1800 efrecon/htdns --level=debug

Note how the command above maps port 53, which requires root privileges and also how it passes further the DNSTTL environment variable (one of the optional variables documented above) and passes command-line arguments to the DNS server (in this case, putting it in debug mode). The implementation currently runs redis as a daemon before starting up the node-based DNS server. This is for the sake of simplicity, but breaks the principle that there should only be one container running in a container.

dns's People

Contributors

efrecon avatar hbouvier avatar marcqualie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dns's Issues

error C2039: 'Handle': is not a member of 'v8' (compiling source file ..\src\bufferutil.cc)

When I try to run npm install dns I am getting thi error.

OS is Win 10
npm -v 6.14.6
node -v 12.18.3

  c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(107): error C2039: 'Handle': is
not a member of 'v8' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node _modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8-platform.h(16): note: see declaration of 'v8' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(107): error C2061: syntax error:  identifier 'Handle' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node _modules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(109): error C2065: 'def': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(111): error C2065: 'opt': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(112): error C2065: 'opt': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(115): error C2065: 'opt': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(116): error C2065: 'opt': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(122): error C2039: 'Handle': is
not a member of 'v8' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node _modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8-platform.h(16): note: see declaration of 'v8' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(122): error C2061: syntax error:  identifier 'Handle' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node _modules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(122): error C2084: function 'boo l NanBooleanOptionValue(v8::Local<v8::Object>)' already has a body (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node _modules\socket.io\node_modules\engine.io\node_modules\ws\build\bufferutil.vcxproj]
  c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(105): note: see previous defin
  ition of 'NanBooleanOptionValue' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(123): error C2065: 'opt': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(123): error C2065: 'NanBooleanOp tionValue': undeclared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\e ngine.io\node_modules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(128): error C2039: 'Handle': is
not a member of 'v8' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node _modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8-platform.h(16): note: see declaration of 'v8' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(128): error C2061: syntax error:  identifier 'Handle' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node _modules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(132): error C2065: 'opt': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(133): error C2065: 'opt': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(134): error C2065: 'opt': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(135): error C2065: 'def': undecl ared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modu les\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(213): error C2039: 'ThrowExcepti on': is not a member of 'v8' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine .io\node_modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8-platform.h(16): note: see declaration of 'v8' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(213): error C2039: 'New': is not  a member of 'v8::String' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io \node_modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8.h(2798): note: see declaration of 'v8::String' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(213): error C3861: 'New': identi fier not found (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modul es\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(213): error C3861: 'ThrowExcepti on': identifier not found (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io \node_modules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(216): error C2039: 'Handle': is
not a member of 'v8' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node _modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8-platform.h(16): note: see declaration of 'v8' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(216): error C2065: 'Handle': und eclared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_m odules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(216): error C2275: 'v8::Value':
illegal use of this type as an expression (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_m odules\engine.io\node_modules\ws\build\bufferutil.vcxproj]
  c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(216): note: see declaration of
   'v8::Value' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(216): error C2065: 'error': unde clared identifier (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_mo dules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(216): error C2182: 'NanThrowErro r': illegal use of type 'void' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engi ne.io\node_modules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(216): error C7525: inline variab les require at least '/std:c++17' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\e ngine.io\node_modules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(216): error C2365: 'NanThrowErro r': redefinition; previous definition was 'function' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socke t.io\node_modules\engine.io\node_modules\ws\build\bufferutil.vcxproj]
  c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(212): note: see declaration of
   'NanThrowError' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(216): error C2448: 'NanThrowErro r': function-style initializer appears to be a function definition (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node _modules\socket.io\node_modules\engine.io\node_modules\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(222): error C2039: 'New': is not  a member of 'v8::String' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io \node_modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8.h(2798): note: see declaration of 'v8::String' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(222): error C3861: 'New': identi fier not found (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modul es\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(224): error C2039: 'New': is not  a member of 'v8::String' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io \node_modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8.h(2798): note: see declaration of 'v8::String' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(224): error C3861: 'New': identi fier not found (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modul es\ws\build\bufferutil.vcxproj]
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(224): error C2660: 'v8::Integer: :New': function does not take 1 arguments (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_m odules\engine.io\node_modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8.h(3294): note: see declaration of 'v8::Integer::New' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(225): error C2665: 'NanThrowErro r': none of the 2 overloads could convert all the argument types (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_m odules\socket.io\node_modules\engine.io\node_modules\ws\build\bufferutil.vcxproj]
  c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(212): note: could be 'void Nan
  ThrowError(const char *)' (compiling source file ..\src\bufferutil.cc)
  c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(225): note: while trying to ma
  tch the argument list '(v8::Local<v8::Value>)' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(229): error C2039: 'ThrowExcepti on': is not a member of 'v8' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine .io\node_modules\ws\build\bufferutil.vcxproj]
  c:\users\vladi\appdata\local\node-gyp\cache\12.18.3\include\node\v8-platform.h(16): note: see declaration of 'v8' (compiling source file ..\src\bufferutil.cc)
c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\nan\nan.h(229): error C2039: 'New': is not  a member of 'v8::String' (compiling source file ..\src\bufferutil.cc) [c:\wamp64-3-2-0\www\eliadmin-npm-test\node_modules\tomahawk\node_modules\socket.io\node_modules\engine.io \node_modules\ws\build\bufferutil.vcxproj]

optional redis dependencie

Hello,
What do you think about removing redis dependency for small DNS zones?
You might implement a simple json store.
Data will be keep in RAM and modifications will be saved to a json file.

Unable to PUT new DNS record

/usr/local/opt/redis/bin/redis-server /usr/local/etc/redis.conf >& /tmp/redis.log & sudo dns >& /tmp/dns.log &
 curl -X PUT -H 'Content-Type: application/json' -d '{"ipv4":["192.168.1.1"], "ipv6":["2605:f8b0:4006:802:0:0:0:1010"]}' http://localhost:8053/dns/api/v1/name/database.domain.com
> Cannot PUT /dns/api/v1/name/database.domain.com

# tmp/dns.log
info: 127.0.0.1 - - [Tue, 03 Oct 2017 16:57:45 GMT] "PUT /dns/api/v1/name/database.domain.com HTTP/1.1" 404 48 "-" "curl/7.52.1" module=DNS, pid=2367

Binding to 0.0.0.0 and specified address for TCP services on 53 and 8053

UDP seems right on 53

Maybe I don't totally understand the config but specified:

"dns": {
  "host": "173.208.XX.XX",
  "port": 53,
  "zone": "proxy.xxxxx.net",
  "ttl": 3600,
  "prefix": "dns:",
  "primary": "8.8.8.8",
  "secondary": "8.8.4.4",
  "timeout": 1000
}

info: listen|root=/usr/local/lib/node_modules/dns/public|context=/|IP=0.0.0.0|PORT=8053 module=DNS, pid=15492
debug: dns-config={"host":"173.208.203.52","port":53,"zone":"proxy.mycal.net","ttl":3600,"prefix":"dns:","primary":"8.8.8.8","secondary":"8.8.4.4","timeout":1000} module=DNS, pid=15492

[root@proxy8 ~]# netstat -apn | grep node
tcp 0 0 173.208.XX.XX:53 0.0.0.0:* LISTEN 15492/node <!!!>
tcp 0 0 0.0.0.0:8053 0.0.0.0:* LISTEN 15492/node <!!!>
tcp 0 0 173.208.XX.XX:8053 73.189.70.227:61123 ESTABLISHED 15492/node
tcp 0 0 173.208.XX.XX:8053 73.189.70.227:61124 ESTABLISHED 15492/node
udp 0 0 173.208.XX.XX:53 0.0.0.0:* 15492/node

Release & changelog request

It would be very helpful if we can tag the commit of every release with it's corresponding version number and maybe even add a small changelog of the changes.

License

Hi, thanks for sharing your code! I could not find a license - any chance you would include one (e.g. MIT)?

Reply with No Such Name instead of Google Lookup

Searching through the code I see no easy way to set the response flags to "No Such Name" on the replyCode, IE lower 2 bits set on the 3rd byte in the response.

Be kinda cool to use this code for a zone DNS server and reply as the authority for both hits and misses.

Update or state that it's abandoned

Can you please update the plugin or update the page to state that this plugin is now abandoned. It's 5+ years old and it depends on plugins that have 2 critical and 20 high level vulnerabilities and shouldn't be used in its current state.

Thanks!

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.