{"id":22911995,"url":"https://github.com/opencoff/unbound-adblock","last_synced_at":"2025-05-09T01:33:35.085Z","repository":{"id":57615916,"uuid":"118196081","full_name":"opencoff/unbound-adblock","owner":"opencoff","description":"Generate ad-serving and malware list for unbound","archived":false,"fork":false,"pushed_at":"2025-02-20T18:09:09.000Z","size":81,"stargazers_count":23,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T20:39:08.710Z","etag":null,"topics":["adblock","adblock-list","adblocking-dns","malware-domains","unbound","unbound-server"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencoff.png","metadata":{"files":{"readme":"README.rst","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":"2018-01-20T01:09:14.000Z","updated_at":"2025-02-20T18:09:12.000Z","dependencies_parsed_at":"2024-04-09T22:46:31.037Z","dependency_job_id":"7f1d6b26-5825-4b55-a760-d46da6a1e5b0","html_url":"https://github.com/opencoff/unbound-adblock","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Funbound-adblock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Funbound-adblock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Funbound-adblock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Funbound-adblock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencoff","download_url":"https://codeload.github.com/opencoff/unbound-adblock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253174237,"owners_count":21865836,"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":["adblock","adblock-list","adblocking-dns","malware-domains","unbound","unbound-server"],"created_at":"2024-12-14T04:19:31.085Z","updated_at":"2025-05-09T01:33:35.012Z","avatar_url":"https://github.com/opencoff.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"===============================================\nScript to generate Ad-block domains for unbound\n===============================================\n\nTake a list of known malware and ad-serving domains and generate an\namalgamated configuration file **fragment** for unbound_. This fragment when\nincluded in the main body of *unbound.conf*, will block these hosts and\ndomains serving malware and/or intrusive ads.\n\nUsage\n-----\nYou will need GNU Make (any recent version). And a recent golang toolchain\n(\u003e1.11). Assuming GNU Make is available as ``gmake``, type::\n\n    gmake\n\nThis will generate two config file fragments for unbound_:\n\n- *bad-hosts.conf*: Config file fragment with a few trackers; the list of\n  blocklist items are in *myfeed.txt*\n- *big.conf*: Very large list of blocklist domains and hosts (~30MB, ~700k\n  entries). The blocklist feed comes from *bigfeed.txt* (auto-generated).\n\nInclude one of the config files (*bad-hosts.conf* or *big.conf*) in your *unbound.conf*\nas follows::\n\n    # include auto-generated ad-block/malware list\n    include: /path/to/bad-hosts.conf\n\nAnd reload unbound config to use the new blocklist.\n\nDetails\n-------\nThe blocklist is generated by a golang program in the `blgen` directory. It is\nbuilt using the shell script `build`. The output binary is put in a platform\nspecific directory (`bin/$os-$arch/blgen`). Usage::\n\n    blgen [options] [blocklist ...]\n\n    Read one or more blocklist files and generate a composite file containing\n    blocked hosts and domains. The final output is written to STDOUT or to\n    an output file.\n\n    blgen can optionally read a feed (txt file) of well known 3rd party malware and\n    tracker URLs. The feed.txt is a simple file:\n    - Each line starts with either a 'txt' or 'json' followed by a URL.\n    - The keyword 'txt' or 'json' identifies the type of output returned by the URL\n\n    Example:\n\n        txt http://pgl.yoyo.org/files/adhosts/plaintext\n        txt http://mirror2.malwaredomains.com/files/justdomains\n\n    Options:\n      -c, --cache-dir D      Use 'D' as the cache directory [\".\"]\n      -F, --feed F           Read blocklists from feed file 'F' [\"\"]\n      --no-cache             Ignore the cache and re-fetch every blocklist [False]\n      -o, --output-file F    Write output to file 'F' [\"\"]\n      -f, --output-format T  Set output format to 'T' (text or unbound) [\"\"]\n      -v, --verbose          Show verbose output [false]\n      -W, --allowlist F      Add whistlist entries from file 'F' [[]]\n\nThe `-W` flag can be used multiple times to add multiple allow list sources.\n\nCaching\n~~~~~~~\n`blgen` caches the downloaded blocklists and only refreshes it once a day.\nIn the default invocation of `blgen` in *GNUmakefile*, the\ncache-dir is the current directory. Each cache file uses the URL as the prefix\nand a truncated SHA256 sum of the URL as the suffix. The cache can be ignored\nvia the `--no-cache` option.\n\n.. _unbound: https://unbound.net/\n\n\nGuide to source code\n====================\nThe go program is organized as follows:\n\n- *internal/blgen*: contains the implementation of the blocklist DB,\n  fetching host-lists etc.\n- *blgen/*: contains the driver program (\"main()\") along with a few helper\n  routines to generate the output.\n\n.. vim: ft=rst:sw=4:ts=4:expandtab:tw=78:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencoff%2Funbound-adblock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencoff%2Funbound-adblock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencoff%2Funbound-adblock/lists"}