{"id":13823794,"url":"https://github.com/a-kr/trivialdns","last_synced_at":"2025-07-08T18:31:05.698Z","repository":{"id":52884292,"uuid":"41602805","full_name":"a-kr/trivialdns","owner":"a-kr","description":"Simple DNS proxy server with /etc/hosts-like local database editable via web interface. Written in Go.","archived":false,"fork":false,"pushed_at":"2020-01-31T12:01:55.000Z","size":20,"stargazers_count":12,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-09T20:44:12.735Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a-kr.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}},"created_at":"2015-08-29T18:15:14.000Z","updated_at":"2021-11-18T13:24:01.000Z","dependencies_parsed_at":"2022-08-23T11:41:47.431Z","dependency_job_id":null,"html_url":"https://github.com/a-kr/trivialdns","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/a-kr/trivialdns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kr%2Ftrivialdns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kr%2Ftrivialdns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kr%2Ftrivialdns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kr%2Ftrivialdns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-kr","download_url":"https://codeload.github.com/a-kr/trivialdns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-kr%2Ftrivialdns/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264323879,"owners_count":23590757,"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-08-04T09:00:44.457Z","updated_at":"2025-07-08T18:31:05.426Z","avatar_url":"https://github.com/a-kr.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# trivialdns\nSimple DNS proxy server with /etc/hosts-like local database editable via web interface. Written in Go.\n\n* Handles `A` queries, everything else is proxied to upstream servers\n* Anything not found in local database is also proxied\n* Can respond with static IP address for a given domain (configured like in /etc/hosts)\n* Can respond with IP address of _another_ domain (thus enabling something like DNS redirection:\n  client asks for foo.com and receives the address of bar.com)\n\n## How to run\n\nCreate a configuration file with IP addresses of upstream DNS servers (at least one address is required):\n```\nmkdir -p /etc/trivialdns\necho \"8.8.8.8\" \u003e /etc/trivialdns/nameservers\necho \"8.8.4.4\" \u003e\u003e /etc/trivialdns/nameservers\n```\n\nDNS queries for hostnames not found in local database will be proxied to these servers.\n\nFetch and compile the code:\n```\ngit clone https://github.com/a-kr/trivialdns\ncd trivialdns\nmake\n```\n\nRun:\n```\nsudo ./trivialdns\n```\n\n## /etc/trivialdns/hosts\n\nThis file stores a local DNS database for `trivialdns`. File uses the following format:\n```\n# anything after `#` is a comment\n\n# for A-queries about example.com, trivialdns will respond with address 2.4.3.1\nexample.com   2.4.3.1\n\n# wildcard entries also work\n*.example.com    1.2.3.4\n\n# for A-queries about foo.com, trivialdns will respond with address of bar.com\nfoo.com       bar.com\n# (bar.com is resolved every time foo.com is requested, not just once)\n```\n\n/etc/trivialdns/hosts is read once on server startup.\n\n## Web interface\n\nWeb interface is available on port `8053`, a simple page which provides an editor for\n`/etc/trivialdns/hosts` file. When changes are submitted, they are applied immediately\n(no need to restart the server).\n\n## Debian Packaging\n\n```\nmake pkg\n# package/trivialdns_1.0-1.deb file is produced\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-kr%2Ftrivialdns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-kr%2Ftrivialdns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-kr%2Ftrivialdns/lists"}