neodevpro/neodevhost
Sobre
Hosts para bloqueio de anúncios: poderosos, amigáveis e atualizados.
Segurança e privacidadeO que você pode fazer
- 七种格式 · Seven formats:host / Adblock / dnsmasq / SmartDNS / 纯域名 / Clash / sing-box(含 .srs),同一份数据一次生成。One build, seven formats including sing-box.
- 只保留真实域名 · Valid domains only:逐个校验 RFC 标签规则、punycode 解码、IANA TLD 与 Public Suffix List(含 exception)。Every entry is checked against RFC label rules, punycode, IANA TLDs and the PSL (including exceptions).
- 白名单不会吞掉整片网络 · No namespace wipe-out:允许条目只覆盖自身及子域,com.br、cloudfront.net 这类条目绝不会放行整段命名空间。Allow entries cover only themselves and their subdomains, never a whole namespace.
- 自有名单优先 · Your list wins:ownblocklist 的条目即使被上游白名单覆盖也会保留,冲突写进构建日志。Entries in ownblocklist survive upstream allowlists; conflicts are reported.
Crescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- 0
- em 15 dias
- +1
- em 1 mês
- 0
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Original
NEO DEV HOST
强大、友善、持续更新的去广告 Hosts 列表
Powerful, friendly and always up-to-date ad blocking hosts
Total ad / tracking block list 屏蔽追踪广告总数: 248705
Total allowlist list 允许名单总数: 15279
Total upstream-non-accessable list 上游无法访问域名总数: 27132
Update 更新时间: 2026-12-03
每天 UTC 08:00 自动构建,经校验后才发布。
Rebuilt and validated every day at 08:00 UTC by GitHub Actions.
目录 TOC
特性 Features
- 七种格式 · Seven formats:host / Adblock / dnsmasq / SmartDNS / 纯域名 / Clash / sing-box(含 .srs),同一份数据一次生成。
One build, seven formats including sing-box. - 只保留真实域名 · Valid domains only:逐个校验 RFC 标签规则、punycode 解码、IANA TLD 与 Public Suffix List(含 exception)。
Every entry is checked against RFC label rules, punycode, IANA TLDs and the PSL (including exceptions). - 白名单不会吞掉整片网络 · No namespace wipe-out:允许条目只覆盖自身及子域,
com.br、cloudfront.net这类条目绝不会放行整段命名空间。
Allow entries cover only themselves and their subdomains, never a whole namespace. - 自有名单优先 · Your list wins:
ownblocklist的条目即使被上游白名单覆盖也会保留,冲突写进构建日志。
Entries inownblocklistsurvive upstream allowlists; conflicts are reported. - 可复现 · Reproducible:全部产物在临时目录生成、校验齐全后才发布,构建失败不会留下半成品。
Outputs are built in a temp dir and published only once every file is complete.
下载 Download
Number of Domain 域名数目: 248705
| Format 格式 | 适用于 Works with | 下载 Raw | 国内加速 China mirror |
|---|---|---|---|
| Host | Pi-hole, AdAway, hBlock, AdGuard Home | link | link |
| Adblocker | uBlock Origin, AdGuard / AdGuard Home | link | link |
| Dnsmasq | dnsmasq, OpenWrt | link | link |
| SmartDNS | SmartDNS | link | link |
| Domain | 纯域名 / plain domains | link | link |
| Clash | Clash / Mihomo rule-provider | link | link |
| sing-box JSON | sing-box 1.8+ 源码 rule-set | link | link |
| sing-box SRS | sing-box 1.8+ 二进制 rule-set | link | link |
| Allowlist | Pi-hole / AdGuard 白名单 allowlist | link | link |
各格式长这样 / What each format looks like:
host 0.0.0.0 example.com
adblocker ||example.com^
dnsmasq.conf address=/example.com/0.0.0.0
smartdns.conf address /example.com/#
domain example.com
clash - 'example.com' # 位于 payload: 之下
singbox.json {"version": 1, "rules": [{"domain_suffix": ["example.com"]}]}
Clash:
clash是 rule-provider 格式(behavior: domain),请从rule-providers引用,不要粘贴进rules:。
Clash: the file is abehavior: domainrule-provider. Reference it fromrule-providers; it does nothing insiderules:.
sing-box 用法 / Usage(domain_suffix 自动包含子域 / matches subdomains too):
{
"route": {
"rule_set": [
{
"type": "remote",
"tag": "neodevhost",
"format": "binary",
"url": "https://raw.githubusercontent.com/neodevpro/neodevhost/master/singbox.srs",
"download_detour": "direct"
}
],
"rules": [{ "rule_set": "neodevhost", "action": "reject" }]
}
}
国内加速可把 url 换成 https://neodev.team/singbox.srs。
Use the China mirror URL above if GitHub is slow.
源码格式 / source format(singbox.json)适合自行编译:
sing-box rule-set compile --output singbox.srs singbox.json
使用 Usage
- 下载文件,或复制上表中的链接。
Download a file or copy a link from the table above. - 把
host加入你的拦截器;建议同时导入allow白名单以减少误杀。
Addhostto your blocker; importingallowas well keeps false positives low. - 在应用里刷新数据源。
Refresh the list inside the app.
| 平台 Platform | 做法 How |
|---|---|
| Pi-hole | Settings → Adlists 填入 host 链接,然后执行 pihole -gSettings → Adlists, add the host URL, then run pihole -g |
| AdGuard Home | Filters → DNS blocklists → 添加 host 链接Filters → DNS blocklists → add the host URL |
| AdAway (Android) | 添加 host 源 https://neodev.team/hostAdd the host source |
| dnsmasq / OpenWrt | 下载 dnsmasq.conf 放进 /etc/dnsmasq.d/ 并重启Drop dnsmasq.conf into /etc/dnsmasq.d/ and restart |
| SmartDNS | 下载 smartdns.conf,用 conf-file 引入Reference it with conf-file |
| uBlock Origin | 自定义规则列表填 adblocker 链接Add the adblocker URL as a custom filter list |
| Clash / Mihomo | rule-providers 指向 clash,behavior: domainPoint a rule-providers entry at clash |
Pi-hole 安装与卸载
安装 Install
- 登录 Pi-hole 后台。
Log in to the Pi-hole admin page. - 打开 Adlists / Lists 页面(v5: Group Management → Adlists;v6: Lists),把
host链接填入 Address。
Open the Adlists / Lists page and paste thehostURL. - 在终端执行下面的命令。
Run the following in a terminal:
sudo -i
curl -fsSL https://raw.githubusercontent.com/neodevpro/neodevhost/master/install.sh | bash
pihole -g
install.sh 会分块导入 allow 白名单(v5 用 pihole -w,v6 用 pihole allow),约几分钟。
install.sh imports the allow list in chunks (v5: pihole -w, v6: pihole allow); it takes a few minutes.
自建镜像可用
NEODEV_ALLOWLIST_URL=https://你的镜像/allow覆盖下载地址。
Point it at your own mirror withNEODEV_ALLOWLIST_URL.
卸载 Uninstall
- 在 Adlists 里点红色垃圾桶删除对应条目。
Remove the adlist with the red trash icon. - 在终端执行 / In a terminal:
sudo -i
curl -fsSL https://raw.githubusercontent.com/neodevpro/neodevhost/master/uninstall.sh | bash
只移除本列表包含的域名,不会动你自己添加的白名单。
It removes only the domains from this list and leaves your own allow entries untouched.
数据规则 Data rules
流程 / Pipeline:上游下载 fetch → 格式归一 extract → 合法性校验 validate → 去冗余 reduce → 扣除白名单/过期 exclude → 成品检查 checks → 发布 publish
| 规则 Rule | 说明 Description |
|---|---|
| 格式归一 Format | 支持 plain / hosts / dnsmasq / Adblock ||x^ / @@ 例外 / URL 列表;屏蔽源中的 @@ 视为例外并跳过Accepts plain, hosts, dnsmasq, Adblock and URL lists; @@ rules in blocklists are skipped as exceptions |
| 元素隐藏 Cosmetic | example.com##.banner 被丢弃:它不携带 DNS 信息,误用会屏蔽整站Cosmetic rules are dropped; they carry no DNS information |
| 域名合法性 Validity | RFC 标签规则、punycode 解码、IANA TLD、Public Suffix List(含 exception)四重校验 RFC labels, punycode decoding, IANA TLDs and the PSL (including exceptions) |
| 公共后缀 Suffixes | 允许名单中本身就是公共后缀的条目被丢弃;屏蔽名单中出现 ICANN 公共后缀(com.br)视为数据错误;PSL exception(如 !city.kawasaki.jp)按注册域处理Bare suffixes are dropped from allowlists; ICANN suffixes in blocklists are data errors; PSL exceptions are treated as registrable domains |
| 白名单语义 Allowlist | 允许条目只覆盖自身及子域,且不得高于目标域名的注册域 An allow entry covers itself and subdomains, never above the registrable domain |
| 自有名单 Own lists | ownallowlist 计入白名单;ownblocklist 优先级最高,被覆盖时会加回并告警ownblocklist always wins and conflicts are reported |
| 品牌豁免 Brand ignore | allowignore 中的品牌,其上游白名单条目被忽略(默认 29 个广告品牌)Upstream entries for brands in allowignore are ignored (29 ad brands by default) |
| 过期域名 Dead domains | 每次构建用 tools/check-dead-domains.py 实测解析;只有 NXDOMAIN 且 Answer 无 CNAME,并由两个不同区域的独立解析器以 SOA 确认后才判定为死域并剔除。NODATA、CNAME owner、只有 TXT/NS/SOA 的域名都保留Every build resolves the list (DoH → HTTP → UDP); only NXDOMAIN without a CNAME, confirmed by two independent resolvers in different regions, is dropped. NODATA, CNAME owners and TXT/NS/SOA-only names stay |
| 成品检查 Checks | 不比较历史大小(上游增删来源属正常波动);仅在参考数据残缺(PSL/TLD 下载不完整)、产物为空,或单轮死域超过存活数一半(解析器被劫持)时中止 Sizes are never compared across runs; the build aborts on truncated reference data, empty output, or a run where dead domains outnumber live ones (hijacked resolvers) |
构建与开发 Build
bash host.sh # 构建并发布 / build and publish
bash host.sh --dry-run # 只构建不发布 / build only, keep the work dir
bash host.sh --no-dead-check # 跳过存活检测 / skip the liveness check
bash tests/run.sh # 阶段单测,不联网 / stage unit tests, offline
python3 -m unittest discover -s tests -p 'test_*.py' -v # checker 单测 / checker tests
bash tests/audit.sh # 逐源审计 + 成品校验 / per-source audit (needs network)
只依赖 bash + curl(或 wget);singbox.srs 由 sing-box 编译,未安装时跳过该文件。
Requires bash plus curl (or wget); singbox.srs is compiled with sing-box and skipped when it is missing.
host.sh 入口 / entry: fetch → validate → merge → dead check → render → publish
lib/psl.awk Public Suffix List 通用函数(含 exception)/ shared PSL helpers (with exceptions)
lib/punycode.awk punycode 解码与合法性检查 / punycode decoder and validation
lib/extract.awk 任意格式 → 候选主机名 / any format → candidate hosts
lib/validate.awk 候选 → 合法域名 / candidates → valid domains
lib/ignore.awk 按 allowignore 忽略上游条目 / drop ignored allow entries
lib/reduce.awk 去掉被父域覆盖的冗余条目 / drop redundant subdomains
lib/exclude.awk 扣除白名单(PSL 感知)/ PSL-aware allowlist exclusions
lib/deadblock.awk 精确剔除已判定死亡的域名 / exact dead-domain subtraction
lib/render.awk 一次遍历生成七种格式 / render all seven formats
tests/run.sh 24 项阶段单测 / 24 stage tests
tests/test_check_dead_domains.py 死域检查器单测 / dead-domain checker tests
tests/audit.sh 逐源统计与成品不变量 / per-source stats + invariants
tools/check-dead-domains.py 域名存活检测(DoH/HTTP/UDP)/ domain liveness checker
allowlist blocklist 上游源 URL / upstream source URLs
ownallowlist ownblocklist 自有名单,改完即生效 / local lists, effective immediately
allowignore 上游白名单"不得放行"的品牌 / brands upstream may not whitelist
| 环境变量 Variable | 默认 Default | 作用 Purpose |
|---|---|---|
NEODEV_MIN_PSL_RULES |
5000 | PSL 规则数下限 Minimum PSL rules expected |
NEODEV_MIN_TLDS |
1000 | IANA TLD 数量下限 Minimum IANA TLDs expected |
KEEP_WORK_DIR |
0 | 设为 1 保留临时目录 Keep the temporary build directory |
SING_BOX_BIN |
auto | sing-box 可执行文件路径,用于编译 .srsPath to the sing-box binary used to compile .srs |
CHECK_CONCURRENCY |
400 | 存活检测并发数,CI 用 1000 Liveness-check concurrency (CI uses 1000) |
CHECK_STRICT_RESOLVERS |
0 | 解析器数量不足或无法跨区确认时直接失败(CI 开启) Fail when a pool is below the required mix or cannot confirm across regions (CI) |
CHECK_MIN_OVERSEAS / CHECK_MIN_CHINA |
2 / 2 | 每个池至少要有的海外 / 国内解析器数 Minimum overseas / China resolvers per pool |
NEODEV_CHECK_LIMIT |
空 | 只检测前 N 个域名(调试用) Check only the first N domains (debugging) |
CI(.github/workflows/Auto Update.yml):安装 idn2、sing-box v1.14.4 与 Python 依赖(dnspython、aiohttp)→ shellcheck → 阶段单测 + checker 单测 → 构建(含存活检测)→ 提交。
CI runs: install idn2, sing-box and the Python deps → shellcheck → stage + checker tests → build (including the liveness sweep) → commit. 可在 Actions 页面勾选 dry_run 只构建不提交 / tick dry_run to build without publishing.
上游源 Sources
屏蔽源 Blocklists
| Source | Link |
|---|---|
| Anti-ad | link |
| 217heidai | link |
| StevenBlack | link |
允许源 Allowlists
以下即仓库内 allowlist 的全部 URL。
These are exactly the URLs listed in allowlist.
| Source | Link |
|---|---|
| AnudeepND | link |
| Ultimate-Hosts-Blacklist | link |
| Energized Protection | link |
| 217heidai | link |
| blahdns | link |
| HaGeZi DNS Blocklists | link |
| AdAway White List | link |
| GoodnessJSON Pi-hole Whitelist | link |
| freekers whitelist | link |
| China CDN Domain Whitelist | link |
| Discord official domains | link |
| notracking whitelist | link |
| URL shorteners | link |
上游白名单常包含厂商根域(
google.com、doubleclick.net),这些条目由allowignore过滤,否则整片广告子域将永远无法屏蔽。
Upstream whitelists contain vendor root domains;allowignoredrops them so their ad hosts can still be blocked.
过期域名 Dead domains
deadblock 不再从外部仓库下载,而是每次构建由本仓库的 tools/check-dead-domains.py 现场检测:
- 输入:本轮候选列表 + 上一版
deadblock(这样上游删掉的死域仍会复检,复活的会被移出) - 解析器池:3 海外 + 3 国内(Cloudflare、Google、DoH.sb | AliDNS、DNSPod、360)。启动时逐个探活;
CHECK_STRICT_RESOLVERS=1时至少要有 2 海外 + 2 国内,且死域确认必须能在不同区域各取一个端点 - 兜底链路:DNS over HTTPS → 明文 HTTP → UDP。明文只有阿里一个端点(其余厂商一律 301 到 HTTPS),单端点无法独立确认,
auto会跳过、strict会失败;UDP 池为 4 海外 + 3 国内(Quad9 取未过滤版,否则恶意域会被答成 NXDOMAIN) - 判定标准:先查 A。NOERROR / NODATA 视为存活;NXDOMAIN 但 Answer 带 CNAME 也视为存活(owner 存在,只是 target 不在)。只有 NXDOMAIN 且没有 CNAME 才是死域候选,随后用 SOA 向一个海外 + 一个国内解析器确认;两者都 NXDOMAIN 且无 CNAME 才写入。超时/SERVFAIL 记为 unknown,绝不新增
- 结果先写
<file>.tmp;unknown 比例超过一半时在替换前中止,并保留上一版deadblock。本轮 unknown 的旧死域继续沿用上一版判定
python3 tools/check-dead-domains.py --input block --output deadblock
python3 tools/check-dead-domains.py --limit 500 --dry-run # 抽样调试
python3 tools/check-dead-domains.py --transport udp --resolvers 127.0.0.1:53 --no-confirm
单解析器/本地 AdGuard Home 只用于调试,必须显式加 --no-confirm;正式构建需要两个独立端点。
依赖 python3 + dnspython + aiohttp;CI 会自动安装。本地缺依赖或加 --no-dead-check 时,
直接复用仓库里已有的 deadblock(不会因为环境缺失把列表改坏)。
The list is now measured in-house on every build instead of being downloaded; without
python or its dependencies the previous deadblock is reused unchanged.
Resolver pools are 3 overseas (Cloudflare, Google, DoH.sb) + 3 China (AliDNS, DNSPod,
360) for DoH, 4 overseas + 3 China for UDP, probed at startup. The fallback order is
DoH → plaintext HTTP → UDP; plaintext JSON DoH only exists at Aliyun, so that pool is a
single China endpoint and is skipped unless --no-confirm is used. A name is dropped only
when NXDOMAIN without a CNAME is confirmed by an overseas and a China resolver; NOERROR,
NODATA and CNAME owners are alive. A single resolver requires --no-confirm and is for
debugging only.
许可 License
数据归各上游项目所有,本项目只做合并、校验与格式转换,请同时遵守上游许可。
Data belongs to the upstream projects above; this repository only merges, validates and reformats.
Explore projetos relacionados
Carregando…