{"id":16408651,"url":"https://github.com/creativeprojects/hosts-filter","last_synced_at":"2025-06-24T09:39:24.408Z","repository":{"id":65196301,"uuid":"335713812","full_name":"creativeprojects/hosts-filter","owner":"creativeprojects","description":"Compile various domain blocklists and save into your hosts file. Unix, macOS and Windows.","archived":false,"fork":false,"pushed_at":"2024-12-13T17:25:40.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-05T21:44:42.976Z","etag":null,"topics":["block","blocklist","filter","hosts"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creativeprojects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-03T18:12:10.000Z","updated_at":"2024-12-13T17:25:45.000Z","dependencies_parsed_at":"2024-06-21T08:53:01.271Z","dependency_job_id":null,"html_url":"https://github.com/creativeprojects/hosts-filter","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"a5442bfd7447cf00c657926c9e1883cac3bfb5c2"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeprojects%2Fhosts-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeprojects%2Fhosts-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeprojects%2Fhosts-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeprojects%2Fhosts-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creativeprojects","download_url":"https://codeload.github.com/creativeprojects/hosts-filter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240400291,"owners_count":19795331,"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":["block","blocklist","filter","hosts"],"created_at":"2024-10-11T06:17:25.955Z","updated_at":"2025-02-24T00:44:33.742Z","avatar_url":"https://github.com/creativeprojects.png","language":"Go","readme":"[![Build](https://github.com/creativeprojects/hosts-filter/workflows/Build/badge.svg)](https://github.com/creativeprojects/hosts-filter/actions)\n\n# Introduction\n\nCompile and update your hosts file from various block lists. Works on various unixes, Linux, macOS X and Windows.\n\nThis tool simply download lists of bad domains (adware, spyware, phishing, scam, etc.) and adds an entry into your hosts file like:\n```\n0.0.0.0 bad.domain\n```\nwhich means your computer cannot find the malicious domain to load as it points to an invalid IP (`0.0.0.0`).\n\n# Configuration\n\nPut all the block list URL into a config file `config.yaml`:\n```yaml\n---\n# hosts file to update (leave blank for the system default)\n# hosts_file: /etc/hosts\n\n# IP used for filtered domains: default is 0.0.0.0\n# ip: 0.0.0.0\n\nblock_lists:\n  -\n    url: http://winhelp2002.mvps.org/hosts.txt\n  -\n    url: http://someonewhocares.org/hosts/hosts\n  -\n    url: http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts\u0026mimetype=plaintext\n\n# list of domains to remove from the lists\n# allow:\n#   - github.com\n\n# file containing a list of domains allowed (one per line)\n# allow_from: allow.txt\n\n```\n\n# Usage\n\n```\nhosts-filter [flags]\n\nhosts-filter flags:\n  -c, --config string   configuration file (default \"config.yaml\")\n  -h, --help            display this help\n  -l, --log string      logs into a file instead of the console\n      --no-ansi         disable ansi control characters (disable console colouring)\n  -q, --quiet           display only warnings and errors\n  -r, --remove          clear up the hosts file of all entries generated by hosts-filter\n  -o, --stdout          don't save the hosts file in place, but send it to the standard output instead\n  -v, --verbose         display some debugging information\n\n```\n\n## Compile block lists and update your hosts file\n\n```\n$ sudo hosts-filter\n\nloaded \"http://winhelp2002.mvps.org/hosts.txt\": 8815 entries in total\nloaded \"http://someonewhocares.org/hosts/hosts\": 22069 entries in total\nloaded \"http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts\u0026mimetype=plaintext\": 24890 entries in total\n```\n\n## Remove the block lists from your hosts file\n\n```\n$ sudo hosts-filter -r\n```\n\n\n# Installation (macOS, Linux \u0026 other unixes)\n\nHere's a simple script to download the binary automatically. It works on mac OS X, FreeBSD and Linux:\n\n```\n$ curl -sfL https://raw.githubusercontent.com/creativeprojects/hosts-filter/main/install.sh | sh\n```\n\nIt should copy hosts-filter in a `bin` directory under your current directory.\n\nIf you need more control, you can save the shell script and run it manually:\n\n```\n$ curl -LO https://raw.githubusercontent.com/creativeprojects/hosts-filter/main/install.sh\n$ chmod +x install.sh\n$ sudo ./install.sh -b /usr/local/bin\n```\n\nIt will install hosts-filter in `/usr/local/bin/`\n\n\n## Installation for Windows using bash\n\nYou can use the same script if you're using bash in Windows (via WSL, git bash, etc.)\n\n```\n$ curl -LO https://raw.githubusercontent.com/creativeprojects/hosts-filter/main/install.sh\n$ ./install.sh\n```\nIt will create a `bin` directory under your current directory and place `hosts-filter.exe` in it.\n\n## Manual installation (Windows)\n\n- Download the package corresponding to your system and CPU from the [release page](https://github.com/creativeprojects/hosts-filter/releases)\n- Once downloaded you need to open the archive and copy the binary file `hosts-filter` (or `hosts-filter.exe`) in your PATH.\n\n# Using docker image ##\n\nYou can run hosts-filter inside a docker container. It is probably the easiest way to install hosts-filter and keep it updated.\n\nBy default, the hosts-filter container starts at `/hosts-filter`. So you can feed a configuration this way:\n\n```\n$ docker run -it --rm -v $PWD/examples:/hosts-filter creativeprojects/hosts-filter\n```\n\n\n# License\n\nThis work is licensed under the Creative Commons\nAttribution-NonCommercial-ShareAlike License.\nhttps://creativecommons.org/licenses/by-nc-sa/4.0/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativeprojects%2Fhosts-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreativeprojects%2Fhosts-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativeprojects%2Fhosts-filter/lists"}