All Projects → fcambus → Rrda

fcambus / Rrda

Licence: bsd-2-clause
REST API allowing to perform DNS queries over HTTP

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Rrda

Gandi Live Dns
DynDNS Updater for Gandi LiveDNS REST API
Stars: ✭ 116 (-34.09%)
Mutual labels:  api, rest, dns
Queryql
Easily add filtering, sorting, and pagination to your Node.js REST API through your old friend: the query string!
Stars: ✭ 76 (-56.82%)
Mutual labels:  api, rest, query
Fastapi Crudrouter
A dynamic FastAPI router that automatically creates CRUD routes for your models
Stars: ✭ 159 (-9.66%)
Mutual labels:  api, rest
Examples
Examples of Mock Service Worker usage with various frameworks and libraries.
Stars: ✭ 163 (-7.39%)
Mutual labels:  api, rest
Mobx Rest
REST conventions for Mobx
Stars: ✭ 164 (-6.82%)
Mutual labels:  api, rest
Restrequest4delphi
API to consume REST services written in any programming language with support to Lazarus and Delphi
Stars: ✭ 162 (-7.95%)
Mutual labels:  api, rest
Flama
🔥 Fire up your API with this flamethrower
Stars: ✭ 161 (-8.52%)
Mutual labels:  api, rest
Api Diff
A command line tool for diffing json rest APIs
Stars: ✭ 164 (-6.82%)
Mutual labels:  api, rest
Laravel Api Handler
Package providing helper functions for a Laravel REST-API
Stars: ✭ 150 (-14.77%)
Mutual labels:  api, query
Tenso
Tenso is an HTTP REST API framework
Stars: ✭ 167 (-5.11%)
Mutual labels:  api, rest
Thehive
TheHive: a Scalable, Open Source and Free Security Incident Response Platform
Stars: ✭ 2,300 (+1206.82%)
Mutual labels:  api, rest
The Rest Architectural Style
An article on the REST architecture style.
Stars: ✭ 168 (-4.55%)
Mutual labels:  api, rest
Restinstance
Robot Framework library for RESTful JSON APIs
Stars: ✭ 157 (-10.8%)
Mutual labels:  api, rest
Middleware Acl
middleware-acl Access Control Library RBAC casbin
Stars: ✭ 155 (-11.93%)
Mutual labels:  api, rest
Jda
Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Stars: ✭ 2,598 (+1376.14%)
Mutual labels:  api, rest
Appkernel
API development made easy: a smart Python 3 API framework
Stars: ✭ 152 (-13.64%)
Mutual labels:  api, rest
Mono
Minimalist Framework on top of Express.js
Stars: ✭ 163 (-7.39%)
Mutual labels:  api, rest
Laravel Api Debugger
Easy debug for your JSON API.
Stars: ✭ 175 (-0.57%)
Mutual labels:  api, rest
Sp Rest Proxy
🌐 SharePoint REST API Proxy for local Front-end development tool-chains
Stars: ✭ 147 (-16.48%)
Mutual labels:  api, rest
Core
The server component of API Platform: hypermedia and GraphQL APIs in minutes
Stars: ✭ 2,004 (+1038.64%)
Mutual labels:  api, rest
                                ______  ____________________.
                               /     / /                    |
                              /     . /                     |  R
               ________  ____/___  __/_____   _____         |
         __  __\__    /__\__    /__\__    /__\\__  \__      |  R
          ///   _/   //   _/   //   |/    \\    ._    \     |
          _/    \    \_   \    \_   '     /_    |/    //    |  D
          \_____/_____/___/_____/__________/____/    /_     |
       <---------h7/dS!---- \      . \ -------\\______/     |  A
                             \      \ \                     |
                              \______\ \____________________|

Description

RRDA is a REST API written in Go allowing to perform DNS queries over HTTP, and to get reverse PTR records for both IPv4 and IPv6 addresses. It outputs JSON-encoded DNS responses.

The API allows to specify which name server to query (either recursive or authoritative), and can be used as a foundation to build DNS looking glasses.

RRDA is a recursive acronym for "RRDA REST DNS API".

Requirements

RRDA requires the following Go libraries:

Installation

Build and install with the go tool, all dependencies will be automatically fetched and compiled:

go build
go install rrda

Usage

By default, RRDA will bind on localhost, port 8080, in HTTP mode.

USAGE:
  -fastcgi
        Enable FastCGI mode
  -host string
        Set the server host (default "127.0.0.1")
  -port string
        Set the server port (default "8080")
  -version
        Display version

Running RRDA at boot time

Debian init script

RRDA is bundled with a Debian init script, see: debian/rrda

Copy the debian/rrda file in /etc/init.d and modify the line containing DAEMON=rrda to specify the path to your RRDA binary.

To launch the daemon at startup, run:

update-rc.d rrda defaults

FreeBSD rc.d script

RRDA is bundled with a FreeBSD rc.d script, see: freebsd/rrda

Copy the freebsd/rrda file in /usr/local/etc/rc.d and the RRDA binary in /usr/local/sbin.

To launch the daemon at startup, add the following line in /etc/rc.conf:

rrda_enable="YES"

Making Queries

The following examples assume there is a resolver on localhost listening on port 53.

Getting Resources Records

URL Scheme: http://server:port/resolver:port/domain/querytype

Getting Reverse PTR Records (for both IPv4 and IPv6 addresses)

URL Scheme: http://server:port/resolver:port/x/ip

JSONP Support

RRDA supports JSONP callbacks.

JSON Output Schema

The output is a JSON object containing the following arrays, representing the appropriate sections of DNS packets:

  • question
  • answer
  • authority (omitted if empty)
  • additional (omitted if empty)

Question section

  • name
  • type
  • class

Answer, Authority, Additional sections

  • name
  • type
  • class
  • ttl
  • rdlength
  • rdata

Client Errors

When incorrect user input is entered, the server returns an HTTP 400 Error (Bad Request), along with a JSON-encoded error message.

  • Code 401: Input string could not be parsed
  • Code 402: Input string is not a well-formed domain name
  • Code 403: Input string is not a valid IP address
  • Code 404: Invalid DNS query type

Examples

curl http://127.0.0.1:8080/:53/statdns..net/a
{"code":402,"message":"Input string is not a well-formed domain name"}

curl http://127.0.0.1:8080/:53/x/127.0
{"code":403,"message":"Input string is not a valid IP address"}

curl http://127.0.0.1:8080/:53/statdns.net/error
{"code":404,"message":"Invalid DNS query type"}

Server Errors

When the DNS server cannot be reached or returns an error, the server returns an HTTP 500 Error (Internal Server Error), along with a JSON-encoded error message.

  • Code 501: DNS server could not be reached
  • Code 502: The name server encountered an internal failure while processing this request (SERVFAIL)
  • Code 503: Some name that ought to exist, does not exist (NXDOMAIN)
  • Code 505: The name server refuses to perform the specified operation for policy or security reasons (REFUSED)

Examples

curl http://127.0.0.1:8080/127.0.0.2:53/statdns.net/a
{"code":501,"message":"DNS server could not be reached"}

curl http://127.0.0.1:8080/:53/lame2.broken-on-purpose.generic-nic.net/soa
{"code":502,"message":"The name server encountered an internal failure while processing this request (SERVFAIL)"}

curl http://127.0.0.1:8080/:53/statdns.nete/a
{"code":503,"message":"Some name that ought to exist, does not exist (NXDOMAIN)"}

curl http://127.0.0.1:8080/:53/lame.broken-on-purpose.generic-nic.net/soa
{"code":505,"message":"The name server refuses to perform the specified operation for policy or security reasons (REFUSED)"}

Sites using RRDA

License

RRDA is released under the BSD 2-Clause license. See LICENSE file for details.

Author

RRDA is developed by Frederic Cambus

Resources

Project homepage: https://www.statdns.com

Latest tarball release: https://www.statdns.com/rrda/rrda-1.1.0.tar.gz

GitHub: https://github.com/fcambus/rrda

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].