{"id":16511218,"url":"https://github.com/danog/dns-over-https","last_synced_at":"2026-03-09T12:04:19.333Z","repository":{"id":56962160,"uuid":"191423891","full_name":"danog/dns-over-https","owner":"danog","description":"Async DNS-over-HTTPS resolution for AMPHP.","archived":false,"fork":false,"pushed_at":"2024-12-02T16:42:59.000Z","size":146,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"v1","last_synced_at":"2025-09-23T01:48:48.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/danog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2019-06-11T17:58:51.000Z","updated_at":"2025-07-13T17:02:23.000Z","dependencies_parsed_at":"2023-12-14T20:43:14.251Z","dependency_job_id":"7e332310-09d5-4260-8a6f-6b2b379a4b7f","html_url":"https://github.com/danog/dns-over-https","commit_stats":{"total_commits":50,"total_committers":2,"mean_commits":25.0,"dds":"0.040000000000000036","last_synced_commit":"5094c943caa383cd2a77920b363ca9a4c530b1ba"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/danog/dns-over-https","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danog%2Fdns-over-https","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danog%2Fdns-over-https/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danog%2Fdns-over-https/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danog%2Fdns-over-https/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danog","download_url":"https://codeload.github.com/danog/dns-over-https/tar.gz/refs/heads/v1","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danog%2Fdns-over-https/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30294712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T11:12:22.024Z","status":"ssl_error","status_checked_at":"2026-03-09T11:10:54.577Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-11T15:59:21.969Z","updated_at":"2026-03-09T12:04:19.316Z","avatar_url":"https://github.com/danog.png","language":"PHP","funding_links":[],"categories":["DNS"],"sub_categories":[],"readme":"# dns\n\n![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)\n\n`danog/dns-over-https` provides asynchronous and secure DNS-over-HTTPS name resolution for [Amp](https://github.com/amphp/amp).  \nSupports [RFC 8484](https://tools.ietf.org/html/rfc8484) POST and GET syntaxes as well as [Google's proprietary JSON DNS format](https://developers.google.com/speed/public-dns/docs/dns-over-https).  \nSupports passing custom headers for [domain fronting](https://en.wikipedia.org/wiki/Domain_fronting) with google DNS.  \n\n## Installation\n\n```bash\ncomposer require danog/dns-over-https\n```\n\n## Example\n\n```php\n\u003c?php\n\nrequire __DIR__ . '/examples/_bootstrap.php';\n\nuse Amp\\DoH;\nuse Amp\\Dns;\nuse Amp\\Dns\\DnsRecord;\n\nuse function Amp\\Future\\awaitFirst;\n\n// Set default resolver to DNS-over-HTTPS resolver\n$DohConfig = new DoH\\DoHConfig([new DoH\\DoHNameserver('https://mozilla.cloudflare-dns.com/dns-query')]); // Defaults to DoH\\DoHNameserverType::RFC8484_POST\nDns\\dnsResolver(new DoH\\Rfc8484StubDoHResolver($DohConfig));\n\n$githubIpv4 = Dns\\resolve(\"github.com\", DnsRecord::A);\npretty_print_records(\"github.com\", $githubIpv4);\n\n$googleIpv4 = \\Amp\\async(fn () =\u003e Amp\\Dns\\resolve(\"google.com\", DnsRecord::A));\n$googleIpv6 = \\Amp\\async(fn () =\u003e Amp\\Dns\\resolve(\"google.com\", DnsRecord::AAAA));\n\n$firstGoogleResult = awaitFirst([$googleIpv4, $googleIpv6]);\npretty_print_records(\"google.com\", $firstGoogleResult);\n\n$combinedGoogleResult = Amp\\Dns\\resolve(\"google.com\");\npretty_print_records(\"google.com\", $combinedGoogleResult);\n\n$googleMx = Amp\\Dns\\query(\"google.com\", DnsRecord::MX);\npretty_print_records(\"google.com\", $googleMx);\n$firstGoogleResult = awaitFirst([$googleIpv4, $googleIpv6]);\npretty_print_records(\"google.com\", $firstGoogleResult);\n\n$combinedGoogleResult = Amp\\Dns\\resolve(\"google.com\");\npretty_print_records(\"google.com\", $combinedGoogleResult);\n\n$googleMx = Amp\\Dns\\query(\"google.com\", DnsRecord::MX);\npretty_print_records(\"google.com\", $googleMx);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanog%2Fdns-over-https","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanog%2Fdns-over-https","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanog%2Fdns-over-https/lists"}