Coder Social home page Coder Social logo

indigo-nameserver's Introduction

Indigo Nameserver

The Indigo Nameserver is a DNS server, written in Javascript. It is intended as a more powerful alternative to modifying hosts file entries.

Getting Started

To run Indigo, you need NodeJS and NPM

Before you can run Indigo, you must download the required libraries using NPM

npm install

Start the server using NodeJS

node server.js

Features

  • Create A, AAAA, CNAME, MX, SOA, SRV, and TXT records
  • DNS lookup activity logs
  • Basic web interface
  • Basic REST api
  • Configurable upstream/fallback DNS server
  • Docker container for easier deployment

Wishlist

  • Configurable upstream DNS server selection (with failover)
  • DNS entry caching
  • Wildcard support
  • Better local host integration support
  • Vagrant plugin
  • REST API security
  • Web interface improvements
    • Column sorting
    • Log searching/filtering
    • DNS entry creation from logs
  • InfluxDB support for nice statistics gathering
  • Command line interface
  • Upgrade to Angular 2

REST API

All REST endpoints return JSON.

List DNS entries

[GET] /api/records Returns all DNS entries saved in the system.

Create DNS Entry

[POST] /api/records Takes a JSON document representing a new DNS record and saves it in the database.

An example request to create an A-record is

{
"type": "A",
"domain": "example.com",
"value": "172.16.10.50"
}

Update an Entry

[POST] /api/records/:id Takes a JSON document with the updated record details, and replace the DNS record specified by the ID in the request URL

An example request to update an existing A-record is

POST /api/records/
{
"type": "A",
"domain": "example.com",
"value": "172.16.10.10"
}

Delete an Entry

[DELETE] /api/records/:id

Get all activity logs

[GET] /api/logs

Get server configuration

[GET] /api/config

Returns a JSON object containing the current configuration of the server

By default, the configuration object returned will look like

{
    "bind": "0.0.0.0",
    "dns_port": 9999,
    "management_port": 9998,
    "database": "indigo.db",
    "logs": "logs.db",
    "upstream_dns": "8.8.8.8"
}

Set server configuration

[POST] /api/config

Updates the configuration object. It is not necessary to send the whole configuration object in the POST body, only updated fields need to be sent. For example, to update the bind addres you would send the following JSON object as the body of the request

{
	"bind": "127.0.0.1"
}

indigo-nameserver's People

Contributors

ucosty avatar

Stargazers

 avatar

Watchers

 avatar  avatar

indigo-nameserver's Issues

EINVAL on server startup

A bug in the node-named library prevents the server from binding the DNS ports, resulting in an EINVAL error being thrown. This is because the library is attempting to open UDP6 ports instead of UDP4. This seems to fail, at least on Mac OS X.

events.js:141
throw er; // Unhandled 'error' event
^

Error: bind EINVAL 127.0.0.1:9999
at Object.exports._errnoException (util.js:837:11)
at exports._exceptionWithHostPort (util.js:860:20)
at dgram.js:213:18
at doNTCallback3 (node.js:440:9)
at process._tickCallback (node.js:346:17)
at Function.Module.runMain (module.js:477:11)
at startup (node.js:117:18)
at node.js:951:3

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.