{"id":13466270,"url":"https://github.com/fcambus/rrda","last_synced_at":"2025-04-09T09:08:43.185Z","repository":{"id":50467559,"uuid":"11092239","full_name":"fcambus/rrda","owner":"fcambus","description":"REST API allowing to perform DNS queries over HTTP","archived":false,"fork":false,"pushed_at":"2024-04-23T12:45:26.000Z","size":116,"stargazers_count":222,"open_issues_count":0,"forks_count":56,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-29T19:17:55.228Z","etag":null,"topics":["api","dns","http","query","rest"],"latest_commit_sha":null,"homepage":"https://www.statdns.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fcambus.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-07-01T10:56:10.000Z","updated_at":"2024-09-30T12:44:30.000Z","dependencies_parsed_at":"2023-02-11T08:45:29.817Z","dependency_job_id":"a0538321-b806-40d5-9a4f-1116cb5cdbcd","html_url":"https://github.com/fcambus/rrda","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcambus%2Frrda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcambus%2Frrda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcambus%2Frrda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcambus%2Frrda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fcambus","download_url":"https://codeload.github.com/fcambus/rrda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","dns","http","query","rest"],"created_at":"2024-07-31T15:00:41.809Z","updated_at":"2025-04-09T09:08:43.166Z","avatar_url":"https://github.com/fcambus.png","language":"Go","readme":"                                    ______  ____________________.\n                                   /     / /                    |\n                                  /     . /                     |  R\n                   ________  ____/___  __/_____   _____         |\n             __  __\\__    /__\\__    /__\\__    /__\\\\__  \\__      |  R\n              ///   _/   //   _/   //   |/    \\\\    ._    \\     |\n              _/    \\    \\_   \\    \\_   '     /_    |/    //    |  D\n              \\_____/_____/___/_____/__________/____/    /_     |\n           \u003c---------h7/dS!---- \\      . \\ -------\\\\______/     |  A\n                                 \\      \\ \\                     |\n                                  \\______\\ \\____________________|\n\n## Description\n\nRRDA is a REST API written in Go allowing to perform DNS queries over HTTP,\nand to get reverse PTR records for both IPv4 and IPv6 addresses. It outputs\nJSON-encoded DNS responses.\n\nThe API allows to specify which name server to query (either recursive or\nauthoritative), and can be used as a foundation to build DNS looking glasses.\n\nRRDA is a recursive acronym for \"RRDA REST DNS API\".\n\n## Requirements\n\nRRDA requires the following Go libraries:\n\n- chi: lightweight, idiomatic and composable router - https://github.com/go-chi/chi\n- dns: DNS library in Go - https://github.com/miekg/dns\n\n## Installation\n\nBuild and install with the `go` tool, all dependencies will be automatically\nfetched and compiled:\n\n\tgo build\n\tgo install rrda\n\n## Usage\n\nBy default, RRDA will bind on localhost, port 8080.\n\n\tUSAGE:\n\t  -host string\n\t        Set the server host (default \"127.0.0.1\")\n\t  -port string\n\t        Set the server port (default \"8080\")\n\t  -timeout int\n\t        Set the query timeout in ms (default 2000)\n\t  -version\n\t        Display version\n\n## Running RRDA at boot time\n\n### Systemd unit file\n\nRRDA is bundled with a systemd unit file, see: `systemd/rrda.service`\n\nCopy the `systemd/rrda.service` file in `/etc/systemd/system` and the RRDA\nbinary in `/usr/local/sbin`.\n\nTo launch the daemon at startup, run:\n\n\tsystemctl enable rrda\n\n## Making Queries\n\nThe following examples assume there is a resolver on localhost listening on port 53.\n\n### Getting Resources Records\n\nURL Scheme: http://server:port/resolver:port/domain/querytype\n\n- Example (using an IPv4 resolver): http://127.0.0.1:8080/127.0.0.1:53/example.org/ns\n- Example (using an IPv6 resolver): http://127.0.0.1:8080/[::1]:53/example.org/ns\n\n### Getting Reverse PTR Records (for both IPv4 and IPv6 addresses)\n\nURL Scheme: http://server:port/resolver:port/x/ip\n\n- Example (IPv4): http://127.0.0.1:8080/127.0.0.1:53/x/193.0.6.139\n- Example (IPv6): http://127.0.0.1:8080/127.0.0.1:53/x/2001:67c:2e8:22::c100:68b\n\n### Identify a Name Server instance\n\nURL Scheme: http://server:port/resolver:port/id\n\n- Example (using an IPv4 resolver): http://127.0.0.1:8080/127.0.0.1:53/id\n- Example (using an IPv6 resolver): http://127.0.0.1:8080/[::1]:53/id\n\n## JSONP Support\n\nRRDA supports JSONP callbacks.\n\n- Example: http://127.0.0.1:8080/127.0.0.1:53/example.org/ns?callback=rrda\n\n## JSON Output Schema\n\nThe output is a JSON object containing the following arrays, representing the\nappropriate sections of DNS packets:\n\n- question\n- answer\n- authority (omitted if empty)\n- additional (omitted if empty)\n\n### Question section\n\n- name\n- type\n- class\n\n### Answer, Authority, Additional sections\n\n- name\n- type\n- class\n- ttl\n- rdlength\n- rdata\n\n## Client Errors\n\nWhen incorrect user input is entered, the server returns an HTTP 400 Error\n(Bad Request), along with a JSON-encoded error message.\n\n- Code 401: Input string could not be parsed\n- Code 402: Input string is not a well-formed domain name\n- Code 403: Input string is not a valid IP address\n- Code 404: Invalid DNS query type\n\n### Examples\n\n\tcurl http://127.0.0.1:8080/:53/statdns..net/a\n\t{\"code\":402,\"message\":\"Input string is not a well-formed domain name\"}\n \n\tcurl http://127.0.0.1:8080/:53/x/127.0\n\t{\"code\":403,\"message\":\"Input string is not a valid IP address\"}\n\n\tcurl http://127.0.0.1:8080/:53/statdns.net/error\n\t{\"code\":404,\"message\":\"Invalid DNS query type\"}\n\n## Server Errors\n\nWhen the DNS server cannot be reached or returns an error, the server returns\nan HTTP 500 Error (Internal Server Error), along with a JSON-encoded error\nmessage.\n\n- Code 501: DNS server could not be reached\n- Code 502: The name server encountered an internal failure while processing this request (SERVFAIL)\n- Code 503: Some name that ought to exist, does not exist (NXDOMAIN)\n- Code 505: The name server refuses to perform the specified operation for policy or security reasons (REFUSED)\n\n### Examples\n\n\tcurl http://127.0.0.1:8080/127.0.0.2:53/statdns.net/a\n\t{\"code\":501,\"message\":\"DNS server could not be reached\"}\n\n\tcurl http://127.0.0.1:8080/:53/lame2.broken-on-purpose.generic-nic.net/soa\n\t{\"code\":502,\"message\":\"The name server encountered an internal failure while processing this request (SERVFAIL)\"}\n\n\tcurl http://127.0.0.1:8080/:53/statdns.nete/a\n\t{\"code\":503,\"message\":\"Some name that ought to exist, does not exist (NXDOMAIN)\"}\n\n\tcurl http://127.0.0.1:8080/:53/lame.broken-on-purpose.generic-nic.net/soa\n\t{\"code\":505,\"message\":\"The name server refuses to perform the specified operation for policy or security reasons (REFUSED)\"}\n\n## Sites using RRDA\n\n- StatDNS: Rest DNS API - https://www.statdns.com/api/\n- DNS-LG: Multilocation DNS Looking Glass - http://www.dns-lg.com\n\n## License\n\nRRDA is released under the BSD 2-Clause license. See `LICENSE` file for details.\n\n## Author\n\nRRDA is developed by Frederic Cambus\n\n- Site: https://www.cambus.net\n\n## Resources\n\nProject homepage: https://www.statdns.com\n\nLatest tarball release: https://www.statdns.com/rrda/rrda-1.4.1.tar.gz\n\nGitHub: https://github.com/fcambus/rrda\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcambus%2Frrda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffcambus%2Frrda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcambus%2Frrda/lists"}