{"id":13758833,"url":"https://github.com/arvancloud/redis","last_synced_at":"2025-05-10T08:30:49.455Z","repository":{"id":29785936,"uuid":"112324756","full_name":"arvancloud/redis","owner":"arvancloud","description":"redis plugin for coredns","archived":true,"fork":false,"pushed_at":"2022-07-10T20:39:01.000Z","size":39,"stargazers_count":45,"open_issues_count":9,"forks_count":72,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T10:53:28.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arvancloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-28T11:07:30.000Z","updated_at":"2025-02-12T09:59:53.000Z","dependencies_parsed_at":"2022-08-07T14:30:46.254Z","dependency_job_id":null,"html_url":"https://github.com/arvancloud/redis","commit_stats":null,"previous_names":["hawell/redis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvancloud%2Fredis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvancloud%2Fredis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvancloud%2Fredis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arvancloud%2Fredis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arvancloud","download_url":"https://codeload.github.com/arvancloud/redis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253389570,"owners_count":21900776,"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":[],"created_at":"2024-08-03T13:00:37.992Z","updated_at":"2025-05-10T08:30:49.045Z","avatar_url":"https://github.com/arvancloud.png","language":"Go","funding_links":[],"categories":["External Plguins"],"sub_categories":[],"readme":"*redis* enables reading zone data from redis database.\nthis plugin should be located right next to *etcd* in *plugins.cfg*\n\n## syntax\n\n~~~\nredis\n~~~\n\nredis loads authoritative zones from redis server\n\nAddress will default to local redis server (localhost:6379)\n~~~\nredis {\n    address ADDR\n    password PWD\n    prefix PREFIX\n    suffix SUFFIX\n    connect_timeout TIMEOUT\n    read_timeout TIMEOUT\n    ttl TTL\n}\n~~~\n\n* `address` is redis server address to connect in the form of *host:port* or *ip:port*.\n* `password` is redis server *auth* key\n* `connect_timeout` time in ms to wait for redis server to connect\n* `read_timeout` time in ms to wait for redis server to respond\n* `ttl` default ttl for dns records, 300 if not provided\n* `prefix` add PREFIX to all redis keys\n* `suffix` add SUFFIX to all redis keys\n\n## examples\n\n~~~ corefile\n. {\n    redis example.com {\n        address localhost:6379\n        password foobared\n        connect_timeout 100\n        read_timeout 100\n        ttl 360\n        prefix _dns:\n    }\n}\n~~~\n\n## reverse zones\n\nreverse zones is not supported yet\n\n## proxy\n\nproxy is not supported yet\n\n## zone format in redis db\n\n### zones\n\neach zone is stored in redis as a hash map with *zone* as key\n\n~~~\nredis-cli\u003eKEYS *\n1) \"example.com.\"\n2) \"example.net.\"\nredis-cli\u003e\n~~~\n\n### dns RRs \n\ndns RRs are stored in redis as json strings inside a hash map using address as field key.\n*@* is used for zone's own RR values.\n\n#### A\n\n~~~json\n{\n    \"a\":{\n        \"ip\" : \"1.2.3.4\",\n        \"ttl\" : 360\n    }\n}\n~~~\n\n#### AAAA\n\n~~~json\n{\n    \"aaaa\":{\n        \"ip\" : \"::1\",\n        \"ttl\" : 360\n    }\n}\n~~~\n\n#### CNAME\n\n~~~json\n{\n    \"cname\":{\n        \"host\" : \"x.example.com.\",\n        \"ttl\" : 360\n    }\n}\n~~~\n\n#### TXT\n\n~~~json\n{\n    \"txt\":{\n        \"text\" : \"this is a text\",\n        \"ttl\" : 360\n    }\n}\n~~~\n\n#### NS\n\n~~~json\n{\n    \"ns\":{\n        \"host\" : \"ns1.example.com.\",\n        \"ttl\" : 360\n    }\n}\n~~~\n\n#### MX\n\n~~~json\n{\n    \"mx\":{\n        \"host\" : \"mx1.example.com\",\n        \"priority\" : 10,\n        \"ttl\" : 360\n    }\n}\n~~~\n\n#### SRV\n\n~~~json\n{\n    \"srv\":{\n        \"host\" : \"sip.example.com.\",\n        \"port\" : 555,\n        \"priority\" : 10,\n        \"weight\" : 100,\n        \"ttl\" : 360\n    }\n}\n~~~\n\n#### SOA\n\n~~~json\n{\n    \"soa\":{\n        \"ttl\" : 100,\n        \"mbox\" : \"hostmaster.example.com.\",\n        \"ns\" : \"ns1.example.com.\",\n        \"refresh\" : 44,\n        \"retry\" : 55,\n        \"expire\" : 66\n    }\n}\n~~~\n\n#### CAA\n\n~~~json\n{\n    \"caa\":{\n        \"flag\" : 0,\n        \"tag\" : \"issue\",\n        \"value\" : \"letsencrypt.org\"\n    }\n}\n~~~\n\n#### example\n\n~~~\n$ORIGIN example.net.\n example.net.                 300 IN  SOA   \u003cSOA RDATA\u003e\n example.net.                 300     NS    ns1.example.net.\n example.net.                 300     NS    ns2.example.net.\n *.example.net.               300     TXT   \"this is a wildcard\"\n *.example.net.               300     MX    10 host1.example.net.\n sub.*.example.net.           300     TXT   \"this is not a wildcard\"\n host1.example.net.           300     A     5.5.5.5\n _ssh.tcp.host1.example.net.  300     SRV   \u003cSRV RDATA\u003e\n _ssh.tcp.host2.example.net.  300     SRV   \u003cSRV RDATA\u003e\n subdel.example.net.          300     NS    ns1.subdel.example.net.\n subdel.example.net.          300     NS    ns2.subdel.example.net.\n host2.example.net                    CAA   0 issue \"letsencrypt.org\"\n~~~\n\nabove zone data should be stored at redis as follow:\n\n~~~\nredis-cli\u003e hgetall example.net.\n 1) \"_ssh._tcp.host1\"\n 2) \"{\\\"srv\\\":[{\\\"ttl\\\":300, \\\"target\\\":\\\"tcp.example.com.\\\",\\\"port\\\":123,\\\"priority\\\":10,\\\"weight\\\":100}]}\"\n 3) \"*\"\n 4) \"{\\\"txt\\\":[{\\\"ttl\\\":300, \\\"text\\\":\\\"this is a wildcard\\\"}],\\\"mx\\\":[{\\\"ttl\\\":300, \\\"host\\\":\\\"host1.example.net.\\\",\\\"preference\\\": 10}]}\"\n 5) \"host1\"\n 6) \"{\\\"a\\\":[{\\\"ttl\\\":300, \\\"ip\\\":\\\"5.5.5.5\\\"}]}\"\n 7) \"sub.*\"\n 8) \"{\\\"txt\\\":[{\\\"ttl\\\":300, \\\"text\\\":\\\"this is not a wildcard\\\"}]}\"\n 9) \"_ssh._tcp.host2\"\n10) \"{\\\"srv\\\":[{\\\"ttl\\\":300, \\\"target\\\":\\\"tcp.example.com.\\\",\\\"port\\\":123,\\\"priority\\\":10,\\\"weight\\\":100}]}\"\n11) \"subdel\"\n12) \"{\\\"ns\\\":[{\\\"ttl\\\":300, \\\"host\\\":\\\"ns1.subdel.example.net.\\\"},{\\\"ttl\\\":300, \\\"host\\\":\\\"ns2.subdel.example.net.\\\"}]}\"\n13) \"@\"\n14) \"{\\\"soa\\\":{\\\"ttl\\\":300, \\\"minttl\\\":100, \\\"mbox\\\":\\\"hostmaster.example.net.\\\",\\\"ns\\\":\\\"ns1.example.net.\\\",\\\"refresh\\\":44,\\\"retry\\\":55,\\\"expire\\\":66},\\\"ns\\\":[{\\\"ttl\\\":300, \\\"host\\\":\\\"ns1.example.net.\\\"},{\\\"ttl\\\":300, \\\"host\\\":\\\"ns2.example.net.\\\"}]}\"\n15) \"host2\"\n16)\"{\\\"caa\\\":[{\\\"flag\\\":0, \\\"tag\\\":\\\"issue\\\", \\\"value\\\":\\\"letsencrypt.org\\\"}]}\"\nredis-cli\u003e\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvancloud%2Fredis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farvancloud%2Fredis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farvancloud%2Fredis/lists"}