{"id":15904782,"url":"https://github.com/mamantoha/resolv-crystal","last_synced_at":"2025-10-13T20:04:59.224Z","repository":{"id":246365085,"uuid":"820860418","full_name":"mamantoha/resolv-crystal","owner":"mamantoha","description":"A DNS resolver library written in Crystal","archived":false,"fork":false,"pushed_at":"2025-08-11T20:23:26.000Z","size":116,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T03:29:36.118Z","etag":null,"topics":["crystal","dns","resolv"],"latest_commit_sha":null,"homepage":"https://mamantoha.github.io/resolv-crystal/","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mamantoha.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-27T10:19:06.000Z","updated_at":"2025-08-11T20:23:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"c762b4a8-4d3e-4cd2-bbd4-db386ff14da0","html_url":"https://github.com/mamantoha/resolv-crystal","commit_stats":null,"previous_names":["mamantoha/resolv-crystal"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mamantoha/resolv-crystal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fresolv-crystal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fresolv-crystal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fresolv-crystal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fresolv-crystal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mamantoha","download_url":"https://codeload.github.com/mamantoha/resolv-crystal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fresolv-crystal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016923,"owners_count":26085905,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["crystal","dns","resolv"],"created_at":"2024-10-06T12:41:59.500Z","updated_at":"2025-10-13T20:04:59.177Z","avatar_url":"https://github.com/mamantoha.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resolv\n\n[![Crystal CI](https://github.com/mamantoha/resolv-crystal/actions/workflows/crystal.yml/badge.svg)](https://github.com/mamantoha/resolv-crystal/actions/workflows/crystal.yml)\n[![GitHub release](https://img.shields.io/github/release/mamantoha/resolv-crystal.svg)](https://github.com/mamantoha/resolv-crystal/releases)\n[![License](https://img.shields.io/github/license/mamantoha/resolv-crystal.svg)](https://github.com/mamantoha/resolv-crystal/blob/master/LICENSE)\n\nResolv is a DNS resolver library in Crystal that supports `UDP`, `TCP`, and `DoH` (DNS-over-HTTPS).\n\nSupported Resource Record (RR) TYPEs :\n\n|   | Type    | Value | Meaning                                  | Defining RFC |\n| - | ------- | ----- | ---------------------------------------- | ------------ |\n| ✓ | `A`     | `1`   | a host address                           | RFC 1035     |\n| ✓ | `NS`    | `2`   | an authoritative name server             | RFC 1035     |\n|   | `MD`    | `3`   | a mail destination (Obsolete - use MX)   | RFC 1035     |\n|   | `MF`    | `4`   | a mail forwarder (Obsolete - use MX)     | RFC 1035     |\n| ✓ | `CNAME` | `5`   | the canonical name for an alias          | RFC 1035     |\n| ✓ | `SOA`   | `6`   | marks the start of a zone of authority   | RFC 1035     |\n|   | `MB`    | `7`   | a mailbox domain name (EXPERIMENTAL)     | RFC 1035     |\n|   | `MG`    | `8`   | a mail group member (EXPERIMENTAL)       | RFC 1035     |\n|   | `MR`    | `9`   | a mail rename domain name (EXPERIMENTAL) | RFC 1035     |\n|   | `NULL`  | `10`  | a null RR (EXPERIMENTAL)                 | RFC 1035     |\n|   | `WKS`   | `11`  | a well known service description         | RFC 1035     |\n| ✓ | `PTR`   | `12`  | a domain name pointer                    | RFC 1035     |\n|   | `HINFO` | `13`  | host information                         | RFC 1035     |\n|   | `MINFO` | `14`  | mailbox or mail list information         | RFC 1035     |\n| ✓ | `MX`    | `15`  | mail exchange                            | RFC 1035     |\n| ✓ | `TXT`   | `16`  | text strings                             | RFC 1035     |\n| ✓ | `AAAA`  | `28`  | IPv6 host address                        | RFC 3596     |\n| ✓ | `SRV`   | `33`  | service location                         | RFC 2782     |\n| ✓ | `CAA`   | `257` | certification authority authorization    | RFC 8659     |\n| ✓ | `LOC`   | `29`  | Location record                          | RFC 1876     |\n\n- [[RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035)]\n- [[RFC 3596](https://datatracker.ietf.org/doc/html/rfc3596)]\n- [[RFC 2782](https://datatracker.ietf.org/doc/html/rfc2782)]\n- [[RFC 8659](https://datatracker.ietf.org/doc/html/rfc8659)]\n- [[RFC 1876](https://datatracker.ietf.org/doc/html/rfc1876)]\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     resolv:\n       github: mamantoha/resolv-crystal\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"resolv\"\n\ndns = Resolv::DNS.new(\"8.8.8.8\", read_timeout: 10.seconds, retry: 3, requester: :tcp)\n\ndns.resources(\"crystal-lang.org\", :a)\n# #\u003cResolv::DNS::Resource::A:0x1010d0c40 @address=\"18.66.112.124\"\u003e\n\ndns.mx_resources(\"gmail.com\")\n# #\u003cResolv::DNS::Resource::MX:0x1010d0560 @preference=40, @exchange=\"alt4.gmail-smtp-in.l.google.com\"\u003e\n\ndns.soa_resources(\"gmail.com\")\n# =\u003e #\u003cResolv::DNS::Resource::SOA:0x10245c100 @mname=\"ns1.google.com\", @rname=\"dns-admin.google.com\", @serial=646797294, @refresh=900, @retry=900, @expire=1800, @minimum=60\u003e\n\ndns.srv_resources(\"_xmpp-client._tcp.jabber.org\")\n# #\u003cResolv::DNS::Resource::SRV:0x74689eebdf60 @priority=30, @weight=30, @port=5222, @target=\"zeus.jabber.org\"\u003e\n\ndns = Resolv::DNS.new(\"dns.toys\")\ndns.txt_resources(\"lviv.weather\")\n# #\u003cResolv::DNS::Resource::TXT:0x104cf00a0 @txt_data=[\"Lviv (UA)\", \"28.00C (82.40F)\", \"43.90% hu.\", \"partlycloudy_day\", \"14:00, Thu\"]\u003e\n```\n\n## Alternatives\n\nOther alternatives are:\n\n- \u003chttps://gitlab.com/jgillich/crystal-dns\u003e\n- \u003chttps://github.com/636f7374/durian.cr\u003e\n- \u003chttps://github.com/spider-gazelle/dns\u003e\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/mamantoha/resolv-crystal/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Anton Maminov](https://github.com/mamantoha) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fresolv-crystal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamantoha%2Fresolv-crystal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fresolv-crystal/lists"}