{"id":17300867,"url":"https://github.com/chtjonas/whoami-dns","last_synced_at":"2025-03-26T21:45:15.307Z","repository":{"id":65197815,"uuid":"424768032","full_name":"CHTJonas/whoami-dns","owner":"CHTJonas","description":"Tiny dnstap-to-webserver daemon","archived":false,"fork":false,"pushed_at":"2024-07-20T22:56:13.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T03:42:17.393Z","etag":null,"topics":["dns","dnstap","go","golang","http-server","webserver","whoami"],"latest_commit_sha":null,"homepage":"","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/CHTJonas.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":"2021-11-04T23:22:49.000Z","updated_at":"2024-07-19T20:23:51.000Z","dependencies_parsed_at":"2024-06-20T04:20:32.848Z","dependency_job_id":"70816765-433b-4a42-8bc2-87c6b3625800","html_url":"https://github.com/CHTJonas/whoami-dns","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fwhoami-dns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fwhoami-dns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fwhoami-dns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fwhoami-dns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CHTJonas","download_url":"https://codeload.github.com/CHTJonas/whoami-dns/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245743341,"owners_count":20665090,"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","dnstap","go","golang","http-server","webserver","whoami"],"created_at":"2024-10-15T11:30:43.592Z","updated_at":"2025-03-26T21:45:15.268Z","avatar_url":"https://github.com/CHTJonas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Whoami DNS\n\nwhoami-dns is a clever webserver that runs the backend for https://debug.charliejonas.co.uk/dns.html. It's designed to work in tandem with an authoritative DNS server using [dnstap](https://dnstap.info) and wildcard domains so that clients' recursive DNS servers can be identified by the source IP addresses of their queries.\n\n## Principle\n\n1. A zonefile contains a `* 1 A 192.0.2.1` wildcard record where 192.0.2.1 is the public IP address of the host.\n2. The name server that is authoritative for that zone is configured to use dnstap via a UNIX socket.\n3. whoami-dns listens on that socket and detects incoming DNS queries.\n4. The source IP address and domain of the query are parsed and stored by whoami-dns.\n5. whoami-dns listens for incoming HTTP requests and uses the `Host` header to determine the source IP address of the DNS query.\n6. A plaintext HTTP response body is sent by whoami-dns containing the client's recursive resolver's IP address.\n\n## Usage\n\n```\nUsage:\n  whoami-dns [flags]\n\nFlags:\n  -b, --bind string   path to dnstap UNIX socket (default \"/var/lib/knot/dnstap.sock\")\n  -h, --help          help for whoami-dns\n  -p, --port string   port on which to listen for HTTP requests (default \"6780\")\n```\n\n## Installation\n\nPre-built binaries for a variety of operating systems and architectures are available to download from [GitHub Releases](https://github.com/CHTJonas/whoami-dns/releases). If you wish to compile from source then you will need a suitable [Go toolchain installed](https://golang.org/doc/install). After that just clone the project using Git and run Make! Cross-compilation is easy in Go so by default we build for all targets and place the resulting executables in `./bin`:\n\n```bash\ngit clone https://github.com/CHTJonas/whoami-dns.git\ncd whoami-dns\nmake clean \u0026\u0026 make all\n```\n\n## Copyright\n\nwhoami-dns is licensed under the [BSD 2-Clause License](https://opensource.org/licenses/BSD-2-Clause).\n\nCopyright (c) 2021 Charlie Jonas.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchtjonas%2Fwhoami-dns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchtjonas%2Fwhoami-dns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchtjonas%2Fwhoami-dns/lists"}