{"id":13458022,"url":"https://github.com/stephbu/csharp-dns-server","last_synced_at":"2025-03-24T14:33:02.042Z","repository":{"id":32509102,"uuid":"36090110","full_name":"stephbu/csharp-dns-server","owner":"stephbu","description":"Fully functional DNS server written in C#","archived":false,"fork":false,"pushed_at":"2024-03-05T04:22:54.000Z","size":134,"stargazers_count":109,"open_issues_count":16,"forks_count":29,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T03:32:16.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","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/stephbu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2015-05-22T19:00:48.000Z","updated_at":"2024-10-21T08:24:23.000Z","dependencies_parsed_at":"2024-10-29T03:30:30.842Z","dependency_job_id":"26c75cb1-f58c-4465-a808-5c55bdd0c18d","html_url":"https://github.com/stephbu/csharp-dns-server","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/stephbu%2Fcsharp-dns-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephbu%2Fcsharp-dns-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephbu%2Fcsharp-dns-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephbu%2Fcsharp-dns-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephbu","download_url":"https://codeload.github.com/stephbu/csharp-dns-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245289847,"owners_count":20591145,"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-07-31T09:00:42.673Z","updated_at":"2025-03-24T14:33:02.035Z","avatar_url":"https://github.com/stephbu.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# csharp-dns-server\n\nFully functional DNS server written in C#.\n\nThe project was conceived while working to reduce the cost of datacentre \"stamps\" while providing robust services within a datacentre, specifically to remove the need for an expensive load-balancer device by providing round-robin DNS services, and retrying connectivity instead.\n\n## Licence\nThis software is licenced under MIT terms that permits reuse within proprietary software provided all copies of the licensed software include a copy of the MIT License terms and the copyright notice.  See [licence.txt](./licence.txt)\n\n## Getting Started\n\n```\n// clone the repo\n\u003e\u003e cd $repo-root\n\u003e\u003e git clone https://github.com/stephbu/csharp-dns-server\n\n// check you can build the project\n\u003e\u003e cd $repo-root/csharp-dns-server\n\u003e\u003e dotnet build\n\n// check that the tests run\n\u003e\u003e dotnet test\n\n```\n\n## Gotchas\n- if you're running on Windows 10 with Docker Tools installed, Docker uses the ICS SharedAccess service to provide DNS resolution for Docker containers - this listens on UDP:53, and will conflict with the DNS project.  Either turn off the the service (```net stop SharedAccess```), or change the UDP port.\n\n## Features\n\nAs written, the server has the following features:\n\n - Pluggable Zone Resolver.  Host one or more zones locally, and run your code to resolve names in that zone.  Enables many complex scenarios such as:\n - round-robin load-balancing.  Distribute load and provide failover with a datacentre without expensive hardware.\n - health-checks.  While maintaining a list of machines in round-robin for a name, the code performs periodic healthchecks against the machines, if necessary removing machines that fail the health checks from rotation.\n - Delegates all other DNS lookup to host machines default DNS server(s)\n\nThe DNS server has a built-in Web Server providing operational insight into the current server behaviour.\n- healthcheck for server status\n- counters\n- zone information\n\n## Interesting Possible Uses\nTime-based constraints such as parental controls to block a site, e.g. Facebook.\nLogging of site usage e.g. company notifications\n\n## Challenges\n\n### Testing\n\nTwo phases of testing was completed.\n\n1) Verification that the bit-packing classes correctly added and removed bits in correct Endian order, complicated by network bitpacking in reverse order to Windows big-endian packing.\n\n2) Protocol verification - that well known messages were correctly decoded and re-encoded using the bit-packing system.\n\nMuch time was spent using Netmon to capture real DNS challenges and verify that the C# DNS server responded appropriately.\n\n### DNS-Sec\nNo effort made to handle or respond to DNS-Sec challenges.\n\n## Contribution Guide\nPull Requests, Bug Reports, and Feature Requests are most welcome.  \n\n### Contribution Workflow\nSuggested workflow for PRs is\n\n1. Make a fork of csharp-dns-server/master in your own repository.\n2. Create a branch in your own repo to entirely encapsulate all your proposed changes\n3. Make your changes, add documentation if you need it, markdown text preferred.\n4. Squash your commits into a single change [(Find out how to squash here)](http://stackoverflow.com/questions/616556/how-do-you-squash-commits-into-one-patch-with-git-format-patch)\n5. Submit a PR, and put in comments anything that you think I'll need to help merge and evaluate the changes\n\n### Licence Reminder\nAll contributions must be licenced under the same MIT terms, do include a header file to that effect.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephbu%2Fcsharp-dns-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephbu%2Fcsharp-dns-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephbu%2Fcsharp-dns-server/lists"}