cdryzun/trackers

GitHub: cdryzun/trackers

每日自动聚合并去重的 BitTorrent tracker 域名与IP屏蔽列表,可无缝导入主流防火墙和 DNS 解析器以阻断 P2P 流量。

Stars: 3 | Forks: 0

# Trackers 屏蔽列表 [![GitHub Stars](https://img.shields.io/github/stars/cdryzun/trackers?style=flat-square)](https://github.com/cdryzun/trackers/stargazers) [![GitHub Forks](https://img.shields.io/github/forks/cdryzun/trackers?style=flat-square)](https://github.com/cdryzun/trackers/network/members) [![条目数](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/cdryzun/trackers/main/.shields/count.json&style=flat-square)](https://raw.githubusercontent.com/cdryzun/trackers/main/trackers.txt) [![最近提交](https://img.shields.io/github/last-commit/cdryzun/trackers?style=flat-square)](https://github.com/cdryzun/trackers/commits/main) [![CI](https://img.shields.io/github/actions/workflow/status/cdryzun/trackers/ci.yaml?label=daily%20update&style=flat-square)](https://github.com/cdryzun/trackers/actions) [![许可证](https://img.shields.io/github/license/cdryzun/trackers?style=flat-square)](LICENSE) ## 概述 一个每日更新、经过去重处理的屏蔽列表,由多个上游来源聚合而成。 包含已知 BitTorrent trackers 的**域名、IPv4 和 IPv6 地址**,可直接导入您的防火墙或 DNS 解析器。 **适用人群:** - 在企业/校园网络中阻止 P2P 流量的网络管理员 - 实施带宽或使用策略的 ISP - 使用 Pi-hole / dnsmasq 搭建的家庭实验室环境 - 安全设备(pfSense、OPNsense、Unbound 等) ## 输出文件 | 文件 | 内容 | 用例 | |------|---------|---------| | [`trackers.txt`](trackers.txt) | 域名和 IPv4 地址,每行一个 | 基于 DNS 的屏蔽、iptables、hosts 文件 | | [`trackers_v6.txt`](trackers_v6.txt) | IPv6 地址,每行一个 | ip6tables、支持 IPv6 的防火墙规则 | ## 原始 URL ``` https://raw.githubusercontent.com/cdryzun/trackers/main/trackers.txt https://raw.githubusercontent.com/cdryzun/trackers/main/trackers_v6.txt ``` ## 使用方法 ### dnsmasq ``` curl -fsSL "https://raw.githubusercontent.com/cdryzun/trackers/main/trackers.txt" \ | awk '{print "address=/"$0"/#"}' > /etc/dnsmasq.d/trackers-block.conf systemctl reload dnsmasq ``` ### Pi-hole 将 Raw URL 添加到 **Group Management → Adlists**,然后更新 gravity: ``` https://raw.githubusercontent.com/cdryzun/trackers/main/trackers.txt ``` ``` pihole -g ``` ### Unbound ``` curl -fsSL "https://raw.githubusercontent.com/cdryzun/trackers/main/trackers.txt" \ | awk '{print "local-zone: \""$0"\" refuse"}' \ > /etc/unbound/conf.d/trackers-block.conf ``` 然后将其添加到 `unbound.conf`: ``` include: "/etc/unbound/conf.d/trackers-block.conf" ``` ### iptables — IPv4 ``` curl -fsSL "https://raw.githubusercontent.com/cdryzun/trackers/main/trackers.txt" \ | grep -E '^([0-9]{1,3}\.){3}[0-9]{1,3}$' \ | while read -r ip; do iptables -A INPUT -s "$ip" -j DROP iptables -A OUTPUT -d "$ip" -j DROP iptables -A FORWARD -d "$ip" -j DROP done ``` ### ip6tables — IPv6 ``` curl -fsSL "https://raw.githubusercontent.com/cdryzun/trackers/main/trackers_v6.txt" \ | while read -r ip; do ip6tables -A INPUT -s "$ip" -j DROP ip6tables -A OUTPUT -d "$ip" -j DROP ip6tables -A FORWARD -d "$ip" -j DROP done ``` ### /etc/hosts ``` curl -fsSL "https://raw.githubusercontent.com/cdryzun/trackers/main/trackers.txt" \ | grep -vE '^([0-9]{1,3}\.){3}[0-9]{1,3}$' \ | awk '{print "0.0.0.0 "$0}' \ >> /etc/hosts ``` ## 数据来源 CI 流水线在每次运行时都会克隆 [ngosang/trackerslist](https://github.com/ngosang/trackerslist),并**动态处理所有 `trackers_*.txt` 文件**——上游新增或重命名的文件会被自动提取。 提取时,条目会被分为两个输出文件: - 域名和 IPv4 → `trackers.txt` - IPv6 括号表示法的地址 → `trackers_v6.txt` ## 更新计划 通过 GitHub Actions 每天在 **04:15 UTC** 自动更新。 上方的[条目数徽章](#)反映了上次成功运行时的实时域名/IPv4 数量。 从 Actions 标签页[触发手动更新](https://github.com/cdryzun/trackers/actions/workflows/ci.yaml)。 ## 贡献 请参阅 [CONTRIBUTING.md](CONTRIBUTING.md)。 ## 许可证 [MIT](LICENSE)
标签:BitTorrent, certspotter, dnsmasq, DNS过滤, iptables, IPv4, IPv6, IP黑名单, OPNsense, P2P流量控制, pfSense, Pi-hole, PowerShell, Tracker, Unbound, 企业网络, 域名黑名单, 家庭实验室, 屏蔽列表, 带宽管理, 开源, 校园网, 每日更新, 流量监控, 网关, 网络安全, 自动化更新, 防火墙, 隐私保护, 黑名单