{"id":29748596,"url":"https://github.com/babolivier/go-doh-client","last_synced_at":"2025-07-26T10:39:32.354Z","repository":{"id":34998535,"uuid":"170238149","full_name":"babolivier/go-doh-client","owner":"babolivier","description":"A DNS over HTTPS client implementation written in Go","archived":false,"fork":false,"pushed_at":"2023-05-13T16:50:02.000Z","size":43,"stargazers_count":53,"open_issues_count":5,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-15T01:34:22.882Z","etag":null,"topics":["dns","dns-over-https","doh","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/babolivier.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}},"created_at":"2019-02-12T02:29:30.000Z","updated_at":"2025-07-13T19:41:00.000Z","dependencies_parsed_at":"2024-06-18T15:25:51.063Z","dependency_job_id":"b0e66361-b1ea-4648-a072-ab8b524496d5","html_url":"https://github.com/babolivier/go-doh-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/babolivier/go-doh-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babolivier%2Fgo-doh-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babolivier%2Fgo-doh-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babolivier%2Fgo-doh-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babolivier%2Fgo-doh-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babolivier","download_url":"https://codeload.github.com/babolivier/go-doh-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babolivier%2Fgo-doh-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267150503,"owners_count":24043478,"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-07-26T02:00:08.937Z","response_time":62,"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":["dns","dns-over-https","doh","golang"],"created_at":"2025-07-26T10:39:31.669Z","updated_at":"2025-07-26T10:39:32.336Z","avatar_url":"https://github.com/babolivier.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-doh-client\n\n[![Build Status](https://travis-ci.org/babolivier/go-doh-client.svg?branch=master)](https://travis-ci.org/babolivier/go-doh-client) [![GoDoc](https://godoc.org/github.com/babolivier/go-doh-client?status.svg)](https://godoc.org/github.com/babolivier/go-doh-client) [![Go Report Card](https://goreportcard.com/badge/github.com/babolivier/go-doh-client)](https://goreportcard.com/report/github.com/babolivier/go-doh-client) [![codecov](https://codecov.io/gh/babolivier/go-doh-client/branch/master/graph/badge.svg)](https://codecov.io/gh/babolivier/go-doh-client)\n\nThis is a Go client library implementation of DNS over HTTPS\n([RFC8484](https://tools.ietf.org/html/rfc8484)).\n\n## Compliance with DNS specifications\n\nThis client library doesn't currently implement all of the DNS specifications.\n\nIt implements looking up the following records:\n\n* A\n* AAAA\n* CNAME\n* MX\n* NS\n* TXT\n* SRV\n* SOA\n* PTR\n\nIt also currently doesn't implement other query types than standard query, nor\nsupport for truncated messages. Full compliance, at least with [RFC\n1035](https://tools.ietf.org/html/rfc1035), is something I'd like, though, so\nall of that should come in the future.\n\n## Usage\n\nThis client library should be as easy to use as any other DNS client library.\nThe only difference is the transport layer it uses to perform lookups.\n\nHere's a quick example:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/babolivier/go-doh-client\"\n)\n\nfunc main() {\n\tresolver := doh.Resolver{\n\t\tHost:  \"9.9.9.9\", // Change this with your favourite DoH-compliant resolver.\n\t\tClass: doh.IN,\n\t}\n\n\t// Perform a A lookup on example.com\n\ta, _, err := resolver.LookupA(\"example.com\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tprintln(a[0].IP4) // 93.184.216.34\n\n\t// Perform a SRV lookup for e.g. a Matrix homeserver\n\tsrv, _, err := resolver.LookupService(\"matrix\", \"tcp\", \"example.com\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tprintln(srv[0].Target) // matrix.example.com\n}\n```\n\n## Why?\n\nI grew quite interested in how the Internet works lately, which implies spending\nsome time reading DNS-related RFCs. On top of that, DNS over HTTPS is something\nI'm interested in quite a lot for privacy reasons and because of how harder it\nis to censor than classic DNS, so I decided to give it a go. And also because my\ndefinition of \"having fun during holidays\" obviously involves implementing part\nof the DNS RFC.\n\n## Contribute\n\nContributions are more than welcome. I tried to make this library as friendly to\nhack on as possible, especially when the said hack aims to implement support for\na new DNS record type.\n[Here](https://github.com/babolivier/go-doh-client/commit/e64451280e70778bf8d95ea1f23e86d047a80222)'s\nan example of how to do so, which is the exhaustive changeset for the\nimplementation of SOA records.\n\nAnd of course, if you have any issue or feedback you want to report on, feel\nfree to [open an issue](https://github.com/babolivier/go-doh-client/issues/new).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabolivier%2Fgo-doh-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabolivier%2Fgo-doh-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabolivier%2Fgo-doh-client/lists"}