{"id":15625716,"url":"https://github.com/daniel15/dnstools","last_synced_at":"2025-07-16T07:40:27.149Z","repository":{"id":40761388,"uuid":"177226067","full_name":"Daniel15/dnstools","owner":"Daniel15","description":"Source code for dnstools.ws - DNS lookups, pings, and traceroutes from 20 locations worldwide","archived":false,"fork":false,"pushed_at":"2024-12-01T03:45:46.000Z","size":1376,"stargazers_count":81,"open_issues_count":29,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T06:06:48.647Z","etag":null,"topics":["aspnetcore","dns","dnstools","hacktoberfest","ping","reactjs","signalr","traceroute"],"latest_commit_sha":null,"homepage":"https://dnstools.ws/","language":"TypeScript","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/Daniel15.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":"2019-03-23T00:34:03.000Z","updated_at":"2025-02-11T22:14:56.000Z","dependencies_parsed_at":"2023-01-29T18:31:02.839Z","dependency_job_id":"dd716bf2-c73d-4f04-a6e9-fd03bd574f51","html_url":"https://github.com/Daniel15/dnstools","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/Daniel15%2Fdnstools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2Fdnstools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2Fdnstools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Daniel15%2Fdnstools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Daniel15","download_url":"https://codeload.github.com/Daniel15/dnstools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608160,"owners_count":20965953,"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":["aspnetcore","dns","dnstools","hacktoberfest","ping","reactjs","signalr","traceroute"],"created_at":"2024-10-03T10:02:07.703Z","updated_at":"2025-04-07T07:18:37.535Z","avatar_url":"https://github.com/Daniel15.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dnstools.ws\n\nThis is the source code for [dnstools.ws](https://dnstools.ws).\n\n# Architecture\n\nDNSTools is split into two pieces:\n\n## Website\n\nThe website is a C# ASP .NET Core 8.0 website, built using React and SignalR.\n\n## Worker\n\nThe \"worker\" (or \"agent\") is a small app that runs on multiple servers around the world. It's a [gRPC](https://grpc.io/) service written in C# using .NET Core 8.0 and compiled to a single executable using [Native AoT](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot). In production, the workers are a mix of KVM and OpenVZ7 VPSes running Debian Bookworm (12).\n\nSome workers (such as pings and traceroutes) use the standard `ping` and `traceroute` command-line utilities. Pings can only be sent by root, and reusing existing well-tested code is more secure than creating our own setuid binaries. Other tools (like DNS lookups) are all performed using C# code.\n\n# Development\n\nThe `DnsTools.sln` Visual Studio 2022 solution contains both the website and the worker.\n\n## Website\n\nThe website consists of two parts: A frontend app built using Create React App, and a backend app built using C#. To run the development version of the website, you need to start both:\n\n- Frontend: Run `yarn start` in the `src/DnsTools.Web/ClientApp` directory\n- Backend: Run `DnsTools.Web` from Visual Studio, or via `dotnet run` at the command-line\n\nYou can then hit the site at `http://localhost:31429/`. The C# backend is running on `https://localhost:5001/` but this is only used for API requests - All webpages are loaded via the Webpack dev server.\n\n## Worker\n\nThe worker requires a few Linux utilities (like `ping` and `traceroute`) to be available. On Windows, you can run the worker using Docker. VS2019's built-in Docker support is sufficient for this - Just start the project in Visual Studio and it'll automatically spin up the Docker container.\n\n# Deploying to Production\n\n## Website\n\nBuild and deploy the site using the `publish` script:\n\n```sh\ncd src/DnsTools.web\n./publish.ps1\n```\n\n## Workers\n\nThe workers are all configured and deployed using [Ansible](https://www.ansible.com/).\n\nSome manual configuration is required before running Ansible:\n\n1. Generate a random password and store it in `./ansible/vault-password`\n2. Store servers' `sudo` password in an encrypted Ansible Vault file:\n\n```sh\ncd ansible\nansible-vault create passwd.yml\nansible-vault edit passwd.yml --vault-password-file=vault-password\n```\n\nIn the file, add:\n\n```yml\nsudo_pass: put_the_password_here\n```\n\n3. Start `ssh-agent` and load the Ansible SSH key:\n\n```sh\neval `ssh-agent`\nssh-add ~/.ssh/id_ed25519_ansible\n```\n\nRunning the `deploy-workers.sh` script will run the playbook to deploy all the workers. Be sure to publish the worker app first:\n\n```sh\ndotnet publish --no-self-contained -r linux-x64 -c Release\n```\n\nFor new workers, some manual configuration is required after the first time it's deployed using Ansible:\n\nCreate a TLS certificate for the worker:\n\n```sh\nsudo certbot certonly --manual --manual-auth-hook /etc/letsencrypt/acme-dns-auth.py --preferred-challenges dns --debug-challenges --server https://acme-v02.api.letsencrypt.org/directory --cert-name dnstools-worker -d xx.worker.dns.tg\n```\n\n(where `xx` is some identifier for the worker, like `fr` for France or `us-ny` for New York)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel15%2Fdnstools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel15%2Fdnstools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel15%2Fdnstools/lists"}