{"id":15713139,"url":"https://github.com/timothygu/stanford-cs244b-project","last_synced_at":"2025-03-30T18:28:56.389Z","repository":{"id":66192510,"uuid":"490880483","full_name":"TimothyGu/stanford-cs244B-project","owner":"TimothyGu","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-09T19:45:12.000Z","size":29423,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-05T21:00:33.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimothyGu.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":"2022-05-10T22:34:36.000Z","updated_at":"2022-09-11T01:34:46.000Z","dependencies_parsed_at":"2023-02-25T07:00:13.627Z","dependency_job_id":null,"html_url":"https://github.com/TimothyGu/stanford-cs244B-project","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/TimothyGu%2Fstanford-cs244B-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fstanford-cs244B-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fstanford-cs244B-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyGu%2Fstanford-cs244B-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimothyGu","download_url":"https://codeload.github.com/TimothyGu/stanford-cs244B-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246361819,"owners_count":20764987,"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":[],"created_at":"2024-10-03T21:21:29.912Z","updated_at":"2025-03-30T18:28:56.357Z","avatar_url":"https://github.com/TimothyGu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Simple DNS Server implemented in Go\n===================================\n\nForked from https://github.com/dlorch/dnsserver\n\nThe Domain Name System (DNS) consists of multiple elements: Authoritative\nDNS Servers store and provide DNS record information, Recursive DNS servers\n(also referred to as caching DNS servers) are the \"middlemen\" that recursively\nlook up information on behalf of an end-user. See\n[Authoritative vs. Recursive DNS Servers: What's The Difference] for an overview.\n\nThis project provides a subset of the functionality of an **Authoritative\nDNS Server** as a study project. If you need a production-grade DNS Server in Go,\nhave a look at [CoreDNS]. For DNS library support, see [Go DNS] or\n[package dnsmessage].\n\nFeatured on [r/golang] and [go-nuts].\n\n![Simple DNS Server implemented in Go](https://raw.githubusercontent.com/dlorch/dnsserver/master/dnsserver-go.gif)\n\nRun\n---\n\n```\n$ go run . \u0026\nListening at:  :1053\n\n$ dig example.com @localhost -p 1053\nReceived request from  [::1]:63282\n\n; \u003c\u003c\u003e\u003e DiG 9.10.6 \u003c\u003c\u003e\u003e example.com @localhost -p 1053\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 17060\n;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0\n\n;; QUESTION SECTION:\n;example.com.\t\t\tIN\tA\n\n;; ANSWER SECTION:\nexample.com.\t\t31337\tIN\tA\t3.1.3.7\n\n;; Query time: 0 msec\n;; SERVER: ::1#1053(::1)\n;; WHEN: Mon Jun 17 17:02:43 CEST 2019\n;; MSG SIZE  rcvd: 56\n```\n\nConcepts\n--------\n\n* Go structs and methods ([Structs Instead of Classes - OOP in Go])\n* Goroutines ([Rob Pike - 'Concurrency Is Not Parallelism'])\n* Go slices (Go's dynamic lists)\n* Efficiently writing to and reading from structs using binary.Read() and binary.Write() respectively\n* DNS protocol ([RFC 1035: Domain Names - Implementation and Specification])\n\nTODO\n----\n\n* Implement more record types (CNAME, MX, TXT, AAAA, ...) according to section 3.2.2. of [RFC 1035: Domain Names - Implementation and Specification]\n* Implement [DNS Message Compression] according to section 4.1.4. of [RFC 1035: Domain Names - Implementation and Specification] (thank you [knome] for pointing this out)\n\nLinks\n-----\n\n* [RFC 1035: Domain Names - Implementation and Specification]\n* [DNS Query Message Format]\n* [Wireshark]\n* [Structs Instead of Classes - OOP in Go]\n* [Rob Pike - 'Concurrency Is Not Parallelism']\n\n[Authoritative vs. Recursive DNS Servers: What's The Difference]: http://social.dnsmadeeasy.com/blog/authoritative-vs-recursive-dns-servers-whats-the-difference/\n[CoreDNS]: https://coredns.io/\n[Go DNS]: https://github.com/miekg/dns\n[package dnsmessage]: https://godoc.org/golang.org/x/net/dns/dnsmessage\n[r/golang]: https://www.reddit.com/r/golang/comments/c3n7hl/simple_dns_server_implemented_in_go/\n[go-nuts]: https://groups.google.com/d/msgid/golang-nuts/9d6801ae-5725-4152-83cf-33e63219da70%40googlegroups.com\n[DNS Message Compression]: http://www.tcpipguide.com/free/t_DNSNameNotationandMessageCompressionTechnique-2.htm\n[knome]: https://www.reddit.com/r/golang/comments/c3n7hl/simple_dns_server_implemented_in_go/erseh68?utm_source=share\u0026utm_medium=web2x\n[RFC 1035: Domain Names - Implementation and Specification]: https://www.ietf.org/rfc/rfc1035.txt\n[DNS Query Message Format]: http://www.firewall.cx/networking-topics/protocols/domain-name-system-dns/160-protocols-dns-query.html\n[Wireshark]: https://www.wireshark.org/\n[Structs Instead of Classes - OOP in Go]: https://golangbot.com/structs-instead-of-classes/\n[Rob Pike - 'Concurrency Is Not Parallelism']: https://www.youtube.com/watch?v=cN_DpYBzKso\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothygu%2Fstanford-cs244b-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothygu%2Fstanford-cs244b-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothygu%2Fstanford-cs244b-project/lists"}