{"id":13393533,"url":"https://github.com/looterz/grimd","last_synced_at":"2025-10-05T16:24:01.687Z","repository":{"id":8228930,"uuid":"56508147","full_name":"looterz/grimd","owner":"looterz","description":":zap: fast dns proxy that can run anywhere, built to black-hole internet advertisements and malware servers","archived":false,"fork":false,"pushed_at":"2024-03-13T22:33:39.000Z","size":221,"stargazers_count":1403,"open_issues_count":14,"forks_count":107,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-08T02:41:15.412Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/looterz.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":"2016-04-18T13:01:41.000Z","updated_at":"2025-03-18T23:46:09.000Z","dependencies_parsed_at":"2024-06-18T19:46:15.564Z","dependency_job_id":"d3bc181d-eb17-4131-94d4-e388d7a98ea6","html_url":"https://github.com/looterz/grimd","commit_stats":{"total_commits":198,"total_committers":20,"mean_commits":9.9,"dds":0.7626262626262627,"last_synced_commit":"f951842cbb51ae9af0d895f0a7a37206f3362c8f"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looterz%2Fgrimd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looterz%2Fgrimd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looterz%2Fgrimd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looterz%2Fgrimd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/looterz","download_url":"https://codeload.github.com/looterz/grimd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414499,"owners_count":22067272,"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":[],"created_at":"2024-07-30T17:00:55.429Z","updated_at":"2025-10-05T16:24:01.586Z","avatar_url":"https://github.com/looterz.png","language":"Go","funding_links":[],"categories":["Go","\u003ca id=\"9eee96404f868f372a6cbc6769ccb7f8\"\u003e\u003c/a\u003e新添加的","\u003ca id=\"170048b7d8668c50681c0ab1e92c679a\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"31185b925d5152c7469b963809ceb22d\"\u003e\u003c/a\u003e新添加的","\u003ca id=\"a695111d8e30d645354c414cb27b7843\"\u003e\u003c/a\u003eDNS"],"readme":"# grimd\n[![Go Report Card](https://goreportcard.com/badge/github.com/looterz/grimd?style=flat-square)](https://goreportcard.com/report/github.com/looterz/grimd)\n[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/looterz/grimd)\n[![Release](https://github.com/looterz/grimd/actions/workflows/release.yaml/badge.svg)](https://github.com/looterz/grimd/releases)\n\n:zap: Fast dns proxy that can run anywhere, built to black-hole internet advertisements and malware servers.\n\nBased on [kenshinx/godns](https://github.com/kenshinx/godns) and [miekg/dns](https://github.com/miekg/dns).\n\n# Installation\n```\ngo install github.com/looterz/grimd@latest\n```\n\nYou can also download one of the [releases](https://github.com/looterz/grimd/releases) or [docker images](https://github.com/looterz/grimd/pkgs/container/grimd). Detailed guides and resources can be found on the [wiki](https://github.com/looterz/grimd/wiki).\n\n# Docker Installation\nTo quickly get grimd up and running with docker, run\n```\ndocker run -d -p 53:53/udp -p 53:53/tcp -p 8080:8080/tcp ghcr.io/looterz/grimd:latest\n```\n\nAlternatively, download the [docker-compose.yml](https://raw.githubusercontent.com/looterz/grimd/master/docker-compose.yml) file and launch it using docker-compose.\n```\ndocker-compose up -d\n```\n\n# Configuration\nIf ```grimd.toml``` is not found, it will be generated for you, below is the default configuration.\n```toml\n# version this config was generated from\nversion = \"1.0.9\"\n\n# list of sources to pull blocklists from, stores them in ./sources\nsources = [\n\"https://mirror1.malwaredomains.com/files/justdomains\",\n\"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts\",\n\"https://sysctl.org/cameleon/hosts\",\n\"https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt\",\n\"https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt\",\n\"https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt\"\n]\n\n# list of locations to recursively read blocklists from (warning, every file found is assumed to be a hosts-file or domain list)\nsourcedirs = [\n\"sources\"\n]\n\n# log configuration\n# format: comma separated list of options, where options is one of \n#   file:\u003cfilename\u003e@\u003cloglevel\u003e\n#   stderr\u003e@\u003cloglevel\u003e\n#   syslog@\u003cloglevel\u003e\n# loglevel: 0 = errors and important operations, 1 = dns queries, 2 = debug\n# e.g. logconfig = \"file:grimd.log@2,syslog@1,stderr@2\"\nlogconfig = \"file:grimd.log@2,stderr@2\"\n\n# apidebug enables the debug mode of the http api library\napidebug = false\n\n# enable the web interface by default\ndashboard = true\n\n# address to bind to for the DNS server\nbind = \"0.0.0.0:53\"\n\n# address to bind to for the API server\napi = \"127.0.0.1:8080\"\n\n# response to blocked queries with a NXDOMAIN\nnxdomain = false\n\n# ipv4 address to forward blocked queries to\nnullroute = \"0.0.0.0\"\n\n# ipv6 address to forward blocked queries to\nnullroutev6 = \"0:0:0:0:0:0:0:0\"\n\n# nameservers to forward queries to\nnameservers = [\"1.1.1.1:53\", \"1.0.0.1:53\"]\n\n# concurrency interval for lookups in miliseconds\ninterval = 200\n\n# query timeout for dns lookups in seconds\ntimeout = 5\n\n# cache entry lifespan in seconds\nexpire = 600\n\n# cache capacity, 0 for infinite\nmaxcount = 0\n\n# question cache capacity, 0 for infinite but not recommended (this is used for storing logs)\nquestioncachecap = 5000\n\n# manual blocklist entries\nblocklist = []\n\n# Drbl related settings\nusedrbl = 0\ndrblpeersfilename = \"drblpeers.yaml\"\ndrblblockweight = 128\ndrbltimeout = 30\ndrbldebug = 0\n\n# manual whitelist entries\nwhitelist = [\n\t\"getsentry.com\",\n\t\"www.getsentry.com\"\n]\n\n# manual custom dns entries\ncustomdnsrecords = []\n\n# When this string is queried, toggle grimd on and off\ntogglename = \"\"\n\n# If not zero, the delay in seconds before grimd automaticall reactivates after\n# having been turned off.\nreactivationdelay = 300\n\n#Dns over HTTPS provider to use.\nDoH = \"https://cloudflare-dns.com/dns-query\"\n```\n\n# Building\nRequires golang 1.7 or higher, you build grimd like any other golang application, for example to build for linux x64\n```shell\nenv GOOS=linux GOARCH=amd64 go build -v github.com/looterz/grimd\n```\n\n# Building Docker\nRun container and test\n```shell\nmkdir sources\ndocker build -t grimd:latest -f docker/Dockerfile . \u0026\u0026 \\\ndocker run -v $PWD/sources:/sources --rm -it -P --name grimd-test grimd:latest --config /sources/grimd.toml --update\n```\n\nBy default, if the program runs in a docker, it will automatically replace `127.0.0.1` in the default configuration with `0.0.0.0` to ensure that the API interface is available.\n\n```shell\ncurl -H \"Accept: application/json\" http://127.0.0.1:55006/application/active\n```\n\n# Web API\nA restful json api is exposed by default on the local interface, allowing you to build web applications that visualize requests, blocks and the cache. [reaper](https://github.com/looterz/reaper) is the default grimd web frontend.\n\n\nIf you want to enable the default dashboard, make sure the configuration file contains the following:\n\n```toml\ndashboard = true\n```\n\n![reaper-example](http://i.imgur.com/oXLtqSz.png)\n\n# Speed\nIncoming requests spawn a goroutine and are served concurrently, and the block cache resides in-memory to allow for rapid lookups, while answered queries are cached allowing grimd to serve thousands of queries at once while maintaining a memory footprint of under 15mb for 100,000 blocked domains!\n\n# Daemonize\nYou can find examples of different daemon scripts for grimd on the [wiki](https://github.com/looterz/grimd/wiki/Daemon-Scripts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooterz%2Fgrimd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flooterz%2Fgrimd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooterz%2Fgrimd/lists"}