{"id":15659146,"url":"https://github.com/cirocosta/rawdns","last_synced_at":"2025-05-05T17:13:38.624Z","repository":{"id":73883886,"uuid":"115723047","full_name":"cirocosta/rawdns","owner":"cirocosta","description":"A records resolver from scratch - raw UDP packets","archived":false,"fork":false,"pushed_at":"2019-12-13T19:43:55.000Z","size":22,"stargazers_count":21,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T22:32:28.663Z","etag":null,"topics":["dns","go","golang","name-resolution","networking"],"latest_commit_sha":null,"homepage":"https://ops.tips/blog/raw-dns-resolver-in-go/","language":"Go","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/cirocosta.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":"2017-12-29T13:04:39.000Z","updated_at":"2024-04-04T21:06:05.000Z","dependencies_parsed_at":"2023-07-23T21:16:34.913Z","dependency_job_id":null,"html_url":"https://github.com/cirocosta/rawdns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Frawdns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Frawdns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Frawdns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cirocosta%2Frawdns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cirocosta","download_url":"https://codeload.github.com/cirocosta/rawdns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252542068,"owners_count":21764907,"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":["dns","go","golang","name-resolution","networking"],"created_at":"2024-10-03T13:15:21.018Z","updated_at":"2025-05-05T17:13:38.594Z","avatar_url":"https://github.com/cirocosta.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003erawdns 📡  \u003c/h1\u003e\n\n\u003ch5 align=\"center\"\u003eDNS messages (un)marshaller and UDP client\u003c/h5\u003e\n\n\u003cbr/\u003e\n\n### Overview\n\n`rawdns` a small DNS client library that performs A records queries against a given nameserver. \n\nIt relies only on `net` to perform the UDP queries, constructing and parsing all the messages in transit manually.\n\nThis is a project that is **not** intended to be used in production **at all**. It's not as efficient as it should and does not handle all the cases you'd expect from a production-ready library.\n\nFor real use, see [miekg/dns](https://github.com/miekg/dns).\n\n\n### Usage\n\nCLI:\n\n```sh\nrawdns example.com\nmsg sent labels=[example com]\n\u0026{ID:0 QR:1 Opcode:0 AA:0 TC:0 RD:1 RA:1 Z:0 RCODE:0 QDCOUNT:1 ANCOUNT:1 NSCOUNT:0 ARCOUNT:0}\nANSWER: [93 184 216 34]\n```\n\nProgramatically:\n\n```go\nimport \"github.com/cirocosta/rawdns/lib\"\n\nclient, err := lib.NewClient(lib.ClientConfig{\n        Address: \"8.8.8.8:53\",\n})\nmust(err)\ndefer client.Close()\n\nips, err := client.LookupAddr(\"example.com\")\nmust(err)\n\nfor _, ip := range ips {\n        fmt.Println(ip)\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirocosta%2Frawdns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirocosta%2Frawdns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirocosta%2Frawdns/lists"}