Skip to content

A utility for donutdns to download, cache, and build a master allow list from sources.json

License

Notifications You must be signed in to change notification settings

neflyte/donut-fetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

donut-fetch

A small utility for donutdns to download, cache, and create a master allow file from entries in a given sources.json file.

Requirements

  • Golang v1.18+

Installation

go install github.com/neflyte/donut-fetch/cmd/donut-fetch@latest

Usage

Usage:
  donut-fetch <sources.json> [flags]

Flags:
  -h, --help            help for donut-fetch
      --output string   output file; output to console if not specified
      --timeout uint    connection timeout in seconds (default 5)

Notes

Downloaded host lists are cached in ${XDG_CACHE_HOME}/donut-fetch. donut-fetch state data is stored in ${XDG_CONFIG_HOME}/donut-fetch.

Before downloading each host list from sources.json, an HTTP HEAD request is made to determine if the list has changed since it was last retrieved. The ETag and Last-Modified headers from the result are checked, in that order.

Building

make

Clearing the cache

make clear-cache

Clearing the state data

make clear-state

License: MIT

About

A utility for donutdns to download, cache, and build a master allow list from sources.json

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published