{"id":15032574,"url":"https://github.com/emilhernvall/dnsguide","last_synced_at":"2025-05-14T14:08:42.433Z","repository":{"id":37444676,"uuid":"63241883","full_name":"EmilHernvall/dnsguide","owner":"EmilHernvall","description":"A guide to writing a DNS Server from scratch in Rust","archived":false,"fork":false,"pushed_at":"2025-04-28T10:33:26.000Z","size":106,"stargazers_count":4315,"open_issues_count":5,"forks_count":270,"subscribers_count":60,"default_branch":"master","last_synced_at":"2025-05-14T11:36:19.207Z","etag":null,"topics":["dns","dns-server","internet","network-programming","rust","tcp","udp"],"latest_commit_sha":null,"homepage":"","language":null,"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/EmilHernvall.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}},"created_at":"2016-07-13T11:53:11.000Z","updated_at":"2025-05-14T09:21:10.000Z","dependencies_parsed_at":"2025-05-14T14:07:16.829Z","dependency_job_id":null,"html_url":"https://github.com/EmilHernvall/dnsguide","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/EmilHernvall%2Fdnsguide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilHernvall%2Fdnsguide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilHernvall%2Fdnsguide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmilHernvall%2Fdnsguide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmilHernvall","download_url":"https://codeload.github.com/EmilHernvall/dnsguide/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254160443,"owners_count":22024569,"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","dns-server","internet","network-programming","rust","tcp","udp"],"created_at":"2024-09-24T20:18:45.652Z","updated_at":"2025-05-14T14:08:42.404Z","avatar_url":"https://github.com/EmilHernvall.png","language":null,"readme":"Building a DNS server in Rust\n=============================\n\nThe internet has a rich conceptual foundation, with many exciting ideas that\nenable it to function as we know it. One of the really cool ones is DNS. Before\nit was invented, everyone on the internet - which admittedly wasn't that many at\nthat stage - relied on a shared file called HOSTS.TXT, maintained by the Stanford\nResearch Institute. This file was synchronized manually through FTP, and as the\nnumber of hosts grew, so did the rate of change and the unfeasibility of the\nsystem. In 1983, Paul Mockapetris set out to find a long term solution to the\nproblem and went on to design and implement DNS. It's a testament to his\ngenius that his creation has been able to scale from a few thousand\ncomputers to the Internet as we know it today.\n\nWith the combined goal of gaining a deep understanding of DNS, of doing\nsomething interesting with Rust, and of scratching some of my own itches,\nI originally set out to implement my own DNS server. This document is not\na truthful chronicle of that journey, but rather an idealized version of it,\nwithout all the detours I ended up taking. We'll gradually implement a full\nDNS server, starting from first principles.\n\n * [Chapter 1 - The DNS protocol](chapter1.md)\n * [Chapter 2 - Building a stub resolver](chapter2.md)\n * [Chapter 3 - Adding more Record Types](chapter3.md)\n * [Chapter 4 - Baby's first DNS server](chapter4.md)\n * [Chapter 5 - Recursive Resolve](chapter5.md)\n\nSamples\n-------\n\nEach chapter has a corresponding sample which contains the full code up to\nthat point in the guide, named `sample1.rs` through `sample5.rs`. These can be\nrun using, for first chapter, `cargo run --example sample1`.\n\nRevision History\n----------------\n\n * June 2020 - Fixed a security vulnerability in `read_qname` which allowed for\n   a malicious packet to trigger an infinite loop. Modernized the code to\n   conform to current rust practices, and fixed various ugly inefficiencies.\n * July 2016 - Initial version\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilhernvall%2Fdnsguide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femilhernvall%2Fdnsguide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilhernvall%2Fdnsguide/lists"}