{"id":36901866,"url":"https://github.com/jimmystewpot/dns-preload","last_synced_at":"2026-01-12T15:47:59.064Z","repository":{"id":92023595,"uuid":"491830960","full_name":"jimmystewpot/dns-preload","owner":"jimmystewpot","description":"A simple go based dns cache preloader/prefetcher","archived":false,"fork":false,"pushed_at":"2025-12-30T19:51:04.000Z","size":283,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-03T17:56:27.141Z","etag":null,"topics":["dns","dnscache","go","golang","tool"],"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/jimmystewpot.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-13T09:09:08.000Z","updated_at":"2025-12-30T19:51:02.000Z","dependencies_parsed_at":"2023-11-12T04:21:32.551Z","dependency_job_id":"23223bec-852e-4a30-baee-ca49243286e4","html_url":"https://github.com/jimmystewpot/dns-preload","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jimmystewpot/dns-preload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmystewpot%2Fdns-preload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmystewpot%2Fdns-preload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmystewpot%2Fdns-preload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmystewpot%2Fdns-preload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimmystewpot","download_url":"https://codeload.github.com/jimmystewpot/dns-preload/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmystewpot%2Fdns-preload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","dnscache","go","golang","tool"],"created_at":"2026-01-12T15:47:58.400Z","updated_at":"2026-01-12T15:47:59.057Z","avatar_url":"https://github.com/jimmystewpot.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=jimmystewpot_dns-preload\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=jimmystewpot_dns-preload) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=jimmystewpot_dns-preload\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=jimmystewpot_dns-preload) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=jimmystewpot_dns-preload\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=jimmystewpot_dns-preload) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=jimmystewpot_dns-preload\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=jimmystewpot_dns-preload) [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=jimmystewpot_dns-preload\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=jimmystewpot_dns-preload) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=jimmystewpot_dns-preload\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=jimmystewpot_dns-preload)\n# dns-preload\nA simple go based dns cache preloader, also referred to as a pre-fetcher or cache pre-populator.\n\nSoem nameservers have this already available within them, this tool has been written to provide people with a simple tool that allows them to define what is important and get those results cached. More advanced users can use bash, sed, awk etc to do similar.\n\n## Why?\n\nWith an intermittent satellite connection when the connection is lost the local DNS cache is flushed. When the connection is restablished the high latency on the link causes a slow down for all connections being reestablished. This was an easy way to update the cache asynchronously when the connection is restored which improves usability of the whole system.\n\nIt also works well on trains with crappy reception.\n## Usage\n\nAdd an @reboot line to your users crontab so when the host reboots it will run the tool to pre-populate the dns server\nwith the entries that you wish to use.\n\n`dns-preload all --config-file=dns-preload.yaml --full --quiet --server=::1`\n\nCan be added to crontab as a user `crontab -e`\n\n`@reboot $HOME/dns-preload all --config-file=dns-preload.yaml --full --quiet --server=::1`\n\nreplace $HOME with where you have placed the executable.\n### Configuration\n\nAn example configuration file can be found at `example-config.yaml` in the root of the repository.\n\nAlternatively a configuration can be generated and printed to stdout using\n\n`dns-preload config`\n\nExample:\n\n```\n./dns-preload config\n---\nquery_type:\n    cname: []\n    hosts: []\n    ns: []\n    mx: []\n    txt: []\n    ptr: []\n\n```\nTo write this to a file append `\u003e config.yaml` e.g. `./dns-preload config \u003e config.yaml`\n\n### Building\n\n#### Local System\n\n```make dns-preload```\n\n#### Linux ARM64\n\n```make linux-arm64```\n\n#### Linux ARM32\n\n```make linux-arm32```\n\n#### Linux x86-64\n\n```make linux-x64```\n\n\n\n## Help\n\n```\ndns-preload --help\nUsage: dns-preload \u003ccommand\u003e\n\nPreload a DNS cache with a list of hostnames from a YAML configuration file.\n\nFlags:\n  -h, --help        Show context-sensitive help.\n      --delay=0s    How long to wait until the queries are executed\n\nCommands:\n  all       preload all of the following types from the configuration file\n  cname     preload only the cname entries from the configuration file\n  hosts     preload only the hosts entries from the configuration file, this does an A and AAAA lookup\n  mx        preload only the mx entries from the configuration file\n  ns        preload only the ns entries from the configuration file\n  txt       preload only the txt entries from the configuration file\n  ptr       preload only the ptr entries from the configuration file\n  config    generate an empty configuration file to stdout\n\nRun \"dns-preload \u003ccommand\u003e --help\" for more information on a command.\n```\n\nall of the commands above have the same flags.\n\n```\ndns-preload all --help\nUsage: dns-preload all --config-file=STRING\n\npreload all of the following types from the configuration file\n\nFlags:\n  -h, --help                  Show context-sensitive help.\n      --delay=0s              How long to wait until the queries are executed\n\n      --config-file=STRING    The configuration file to read the domain list to query from\n      --server=\"localhost\"    The server to query to seed the domain list into\n      --port=\"53\"             The port the DNS server listens for requests on\n      --workers=1             The number of concurrent goroutines used to query the DNS server (not implemented)\n      --mute                  Suppress the preload task output to the console\n      --quiet                 Suppress the preload response output to the console\n      --full                  For record types that return a Hostname ensure that these are resolved\n      --debug                 Debug mode\n      --timeout=30s           The timeout for DNS queries to succeed\n\ndns-preload: error: unexpected argument help\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmystewpot%2Fdns-preload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimmystewpot%2Fdns-preload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmystewpot%2Fdns-preload/lists"}