{"id":15038056,"url":"https://github.com/loyalsoldier/v2ray-rules-dat","last_synced_at":"2026-06-10T01:01:01.320Z","repository":{"id":37431210,"uuid":"227019715","full_name":"Loyalsoldier/v2ray-rules-dat","owner":"Loyalsoldier","description":"🦄 🎃 👻 V2Ray 路由规则文件加强版，可代替 V2Ray 官方 geoip.dat 和 geosite.dat，适用于 V2Ray、Xray-core、mihomo(Clash-Meta)、hysteria、Trojan-Go 和 leaf。Enhanced edition of V2Ray rules dat files, applicable to V2Ray, Xray-core, mihomo(Clash-Meta), hysteria, Trojan-Go and leaf.","archived":false,"fork":false,"pushed_at":"2026-06-07T22:59:53.000Z","size":7310,"stargazers_count":19957,"open_issues_count":8,"forks_count":2627,"subscribers_count":150,"default_branch":"master","last_synced_at":"2026-06-08T00:23:17.485Z","etag":null,"topics":["adblock","adguard","anticensorship","chinalist","dnsmasq","easylist","geoip","geosite","gfw","gfwlist","hysteria","ipv4","ipv6","mihomo","proxy","routing","trojan","trojan-go","v2ray","xray"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Loyalsoldier.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-10T03:19:35.000Z","updated_at":"2026-06-07T15:06:55.000Z","dependencies_parsed_at":"2026-01-16T05:13:50.592Z","dependency_job_id":null,"html_url":"https://github.com/Loyalsoldier/v2ray-rules-dat","commit_stats":null,"previous_names":[],"tags_count":2707,"template":false,"template_full_name":null,"purl":"pkg:github/Loyalsoldier/v2ray-rules-dat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loyalsoldier%2Fv2ray-rules-dat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loyalsoldier%2Fv2ray-rules-dat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loyalsoldier%2Fv2ray-rules-dat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loyalsoldier%2Fv2ray-rules-dat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Loyalsoldier","download_url":"https://codeload.github.com/Loyalsoldier/v2ray-rules-dat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loyalsoldier%2Fv2ray-rules-dat/sbom","scorecard":{"id":85930,"data":{"date":"2025-08-11","repo":{"name":"github.com/Loyalsoldier/v2ray-rules-dat","commit":"5d1d9d86c6ffa9aea93d2943399f8dbea6454e0c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/run.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/Loyalsoldier/v2ray-rules-dat/run.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/Loyalsoldier/v2ray-rules-dat/run.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/Loyalsoldier/v2ray-rules-dat/run.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/Loyalsoldier/v2ray-rules-dat/run.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/Loyalsoldier/v2ray-rules-dat/run.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/run.yml:186: update your workflow using https://app.stepsecurity.io/secureworkflow/Loyalsoldier/v2ray-rules-dat/run.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:75","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:76","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:81","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:82","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:87","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:88","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:89","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:90","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:94","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:151","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:152","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:153","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:154","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:155","Warn: downloadThenRun not pinned by hash: .github/workflows/run.yml:156","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of  15 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 202508112214 not signed: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/239199144","Warn: release artifact 202508102213 not signed: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/238873705","Warn: release artifact 202508092214 not signed: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/238804277","Warn: release artifact 202508082214 not signed: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/238718812","Warn: release artifact 202508072216 not signed: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/238449801","Warn: release artifact 202508112214 does not have provenance: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/239199144","Warn: release artifact 202508102213 does not have provenance: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/238873705","Warn: release artifact 202508092214 does not have provenance: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/238804277","Warn: release artifact 202508082214 does not have provenance: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/238718812","Warn: release artifact 202508072216 does not have provenance: https://api.github.com/repos/Loyalsoldier/v2ray-rules-dat/releases/238449801"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T06:56:37.787Z","repository_id":37431210,"created_at":"2025-08-15T06:56:37.787Z","updated_at":"2025-08-15T06:56:37.787Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34132030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","adguard","anticensorship","chinalist","dnsmasq","easylist","geoip","geosite","gfw","gfwlist","hysteria","ipv4","ipv6","mihomo","proxy","routing","trojan","trojan-go","v2ray","xray"],"created_at":"2024-09-24T20:36:55.741Z","updated_at":"2026-06-10T01:01:01.308Z","avatar_url":"https://github.com/Loyalsoldier.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 简介 ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/Loyalsoldier/v2ray-rules-dat/total?logo=github) ![GitHub Downloads (all assets, latest release)](https://img.shields.io/github/downloads/Loyalsoldier/v2ray-rules-dat/latest/total?logo=github) [![jsdelivr stats](https://data.jsdelivr.com/v1/package/gh/Loyalsoldier/v2ray-rules-dat/badge?style=rounded)](https://www.jsdelivr.com/package/gh/Loyalsoldier/v2ray-rules-dat)\n\n[**V2Ray**](https://github.com/v2fly/v2ray-core) 路由规则文件加强版，可代替 V2Ray 官方 `geoip.dat` 和 `geosite.dat`，适用于 [V2Ray](https://github.com/v2fly/v2ray-core)、[Xray-core](https://github.com/XTLS/Xray-core)、[mihomo](https://github.com/MetaCubeX/mihomo/tree/Meta)、[hysteria](https://github.com/apernet/hysteria)、[Trojan-Go](https://github.com/p4gefau1t/trojan-go)、[leaf](https://github.com/eycorsican/leaf) 和所有使用上述内核的图形用户界面（GUI）版代理软件。使用 GitHub Actions 北京时间每天早上 6 点自动构建，保证规则最新。\n\n## 规则文件生成方式\n\n### geoip.dat\n\n- 通过仓库 [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip) 生成\n- 默认使用 [MaxMind GeoLite2 Country CSV 数据](https://github.com/Loyalsoldier/geoip/blob/release/GeoLite2-Country-CSV.zip)生成各个国家和地区的 GeoIP 文件。所有可供使用的国家和地区 geoip 类别（如 `geoip:cn`，两位英文字母表示国家或地区），请查看：[https://www.iban.com/country-codes](https://www.iban.com/country-codes)\n- 中国大陆 (`geoip:cn`) IPv4 地址数据使用 [@gaoyifan/china-operator-ip](https://github.com/gaoyifan/china-operator-ip/blob/ip-lists/china.txt)\n- 中国大陆 (`geoip:cn`) IPv6 地址数据使用 [@gaoyifan/china-operator-ip](https://github.com/gaoyifan/china-operator-ip/blob/ip-lists/china6.txt)\n- 新增类别（方便有特殊需求的用户使用）：\n  - `geoip:cloudflare`\n  - `geoip:cloudfront`\n  - `geoip:facebook`\n  - `geoip:fastly`\n  - `geoip:google`\n  - `geoip:netflix`\n  - `geoip:telegram`\n  - `geoip:twitter`\n  - `geoip:tor`\n\n\u003e 希望定制 `geoip.dat` 文件？需要适用于其他代理软件的 GeoIP 格式文件？查看项目 [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip)。\n\n### geosite.dat\n\n- 基于 [@v2fly/domain-list-community/data](https://github.com/v2fly/domain-list-community/tree/master/data) 数据，通过仓库 [@Loyalsoldier/domain-list-custom](https://github.com/Loyalsoldier/domain-list-custom) 生成\n- **加入大量中国大陆域名、Apple 域名和 Google 域名**：\n  - [@felixonmars/dnsmasq-china-list/accelerated-domains.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/accelerated-domains.china.conf) 加入到 `geosite:china-list` 和 `geosite:cn` 类别中\n  - [@felixonmars/dnsmasq-china-list/apple.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/apple.china.conf) 加入到 `geosite:geolocation-!cn` 类别中（如希望本文件中的 Apple 域名直连，请参考下面 [geosite 的 Routing 配置方式](https://github.com/Loyalsoldier/v2ray-rules-dat#geositedat-1)）\n  - [@felixonmars/dnsmasq-china-list/google.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/google.china.conf) 加入到 `geosite:geolocation-!cn` 类别中（如希望本文件中的 Google 域名直连，请参考下面 [geosite 的 Routing 配置方式](https://github.com/Loyalsoldier/v2ray-rules-dat#geositedat-1)）\n- **加入 GFWList 域名**：\n  - 基于 [@gfwlist/gfwlist](https://github.com/gfwlist/gfwlist) 数据，通过仓库 [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq) 生成\n  - 加入到 `geosite:gfw` 类别中，供习惯于 PAC 模式并希望使用 [GFWList](https://github.com/gfwlist/gfwlist) 的用户使用\n  - 同时加入到 `geosite:geolocation-!cn` 类别中\n- **加入 EasyList 和 EasyListChina 广告域名**：通过 [@AdblockPlus/EasylistChina+Easylist.txt](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt) 获取并加入到 `geosite:category-ads-all` 类别中\n- **加入 AdGuard DNS Filter 广告域名**：通过 [@AdGuard/DNS-filter](https://kb.adguard.com/en/general/adguard-ad-filters#dns-filter) 获取并加入到 `geosite:category-ads-all` 类别中\n- **加入 Peter Lowe 广告和隐私跟踪域名**：通过 [@PeterLowe/adservers](https://pgl.yoyo.org/adservers) 获取并加入到 `geosite:category-ads-all` 类别中\n- **加入 Dan Pollock 广告域名**：通过 [@DanPollock/hosts](https://someonewhocares.org/hosts) 获取并加入到 `geosite:category-ads-all` 类别中\n- **加入 Windows 操作系统相关的系统升级和隐私跟踪域名**：\n  - 基于 [@crazy-max/WindowsSpyBlocker](https://github.com/crazy-max/WindowsSpyBlocker/tree/master/data/hosts) 数据\n  - [**慎用**] Windows 操作系统使用的隐私跟踪域名 [@crazy-max/WindowsSpyBlocker/hosts/spy.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/spy.txt) 加入到 `geosite:win-spy` 类别中\n  - [**慎用**] Windows 操作系统使用的系统升级域名 [@crazy-max/WindowsSpyBlocker/hosts/update.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/update.txt) 加入到 `geosite:win-update` 类别中\n  - [**慎用**] Windows 操作系统附加的隐私跟踪域名 [@crazy-max/WindowsSpyBlocker/hosts/extra.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/extra.txt) 加入到 `geosite:win-extra` 类别中\n  - 关于这三个类别的使用方式，请参考下面 [geosite 的 Routing 配置方式](https://github.com/Loyalsoldier/v2ray-rules-dat#geositedat-1)\n- **可添加自定义直连、代理和广告域名**：由于上游域名列表更新缓慢或缺失某些域名，所以引入**需要添加的域名**列表。[`hidden 分支`](https://github.com/Loyalsoldier/v2ray-rules-dat/tree/hidden)里的三个文件 `direct.txt`、`proxy.txt` 和 `reject.txt`，分别存放自定义的需要添加的直连、代理、广告域名，最终分别加入到 `geosite:cn`、`geosite:geolocation-!cn` 和 `geosite:category-ads-all` 类别中\n- **可移除自定义直连、代理和广告域名**：由于上游域名列表存在需要被移除的域名，所以引入**需要移除的域名**列表。[`hidden 分支`](https://github.com/Loyalsoldier/v2ray-rules-dat/tree/hidden)里的三个文件 `direct-need-to-remove.txt`、`proxy-need-to-remove.txt` 和 `reject-need-to-remove.txt`，分别存放自定义的需要从 `direct-list`（直连域名列表）、`proxy-list`（代理域名列表）和 `reject-list`（广告域名列表） 移除的域名\n\n## 规则文件下载地址\n\n\u003e 如果无法访问域名 `raw.githubusercontent.com`，可以使用第二个地址 `cdn.jsdelivr.net`。\n\u003e 如果无法访问域名 `cdn.jsdelivr.net`，可以将其替换为 `fastly.jsdelivr.net`。\n\u003e\n\u003e *.sha256sum 为校验文件。\n\n- **geoip.dat**：\n  - [https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat](https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat)\n- **geosite.dat**：\n  - [https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat](https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat)\n- **直连域名列表 direct-list.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/direct-list.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/direct-list.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/direct-list.txt)\n- **代理域名列表 proxy-list.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/proxy-list.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/proxy-list.txt)\n- **广告域名列表 reject-list.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/reject-list.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/reject-list.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/reject-list.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/reject-list.txt)\n- **@felixonmars/dnsmasq-china-list 仓库收集的在中国大陆可直连的域名列表 china-list.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/china-list.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/china-list.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/china-list.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/china-list.txt)\n- **Apple 在中国大陆可直连的域名列表 apple-cn.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/apple-cn.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/apple-cn.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/apple-cn.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/apple-cn.txt)\n- **Google 在中国大陆可直连的域名列表 google-cn.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/google-cn.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/google-cn.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/google-cn.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/google-cn.txt)\n- **GFWList 域名列表 gfw.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/gfw.txt)\n- **Windows 操作系统使用的隐私跟踪域名列表 win-spy.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-spy.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-spy.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-spy.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-spy.txt)\n- **Windows 操作系统使用的系统升级域名列表 win-update.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-update.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-update.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-update.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-update.txt)\n- **Windows 操作系统使用的附加隐私跟踪域名列表 win-extra.txt**：\n  - [https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-extra.txt](https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/win-extra.txt)\n  - [https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-extra.txt](https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/win-extra.txt)\n\n## 规则文件使用方式\n\n### geoip.dat\n\n\u003cdetails\u003e\n  \u003csummary\u003e点击查看在 \u003cb\u003eV2Ray\u003c/b\u003e 和 \u003cb\u003eXray-core\u003c/b\u003e 中的使用方法\u003c/summary\u003e\n  \u003cbr/\u003e\n  \u003cp\u003e需要先下载 \u003ccode\u003egeoip.dat\u003c/code\u003e 格式文件，并放置在程序目录内。\u003c/p\u003e\n\n```json\n\"routing\": {\n  \"rules\": [\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Direct\",\n      \"ip\": [\n        \"geoip:cn\",\n        \"geoip:private\",\n        \"ext:cn.dat:cn\",\n        \"ext:private.dat:private\",\n        \"ext:geoip-only-cn-private.dat:cn\",\n        \"ext:geoip-only-cn-private.dat:private\"\n      ]\n    },\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Proxy\",\n      \"ip\": [\n        \"geoip:us\",\n        \"geoip:jp\",\n        \"geoip:facebook\",\n        \"geoip:telegram\",\n        \"ext:geoip-asn.dat:facebook\",\n        \"ext:geoip-asn.dat:telegram\"\n      ]\n    }\n  ]\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e点击查看在 \u003cb\u003emihomo\u003c/b\u003e 中的使用方法\u003c/summary\u003e\n\n```yaml\ngeodata-mode: true\ngeox-url:\n  geoip: \"https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat\"\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e点击查看在 \u003cb\u003ehysteria\u003c/b\u003e 中的使用方法\u003c/summary\u003e\n  \u003cbr/\u003e\n  \u003cp\u003e需要先下载 \u003ccode\u003egeoip.dat\u003c/code\u003e 格式文件，并放置在 hysteria 程序目录内。\u003c/p\u003e\n\n```\ndirect(geoip:cn)\nproxy(geoip:telegram)\nproxy(geoip:us)\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e点击查看在 \u003cb\u003eTrojan-Go\u003c/b\u003e 中的使用方法\u003c/summary\u003e\n  \u003cbr/\u003e\n  \u003cp\u003e需要先下载 \u003ccode\u003egeoip.dat\u003c/code\u003e 格式文件，并放置在 Trojan-Go 程序目录内。\u003c/p\u003e\n\n```json\n\"router\": {\n  \"enabled\": true,\n  \"bypass\": [\"geoip:cn\"],\n  \"proxy\": [\"geoip:telegram\", \"geoip:us\"],\n  \"block\": [\"geoip:jp\"],\n  \"default_policy\": \"proxy\",\n  \"geoip\": \"./geoip.dat\"\n}\n```\n\u003c/details\u003e\n\n### geosite.dat\n\n跟 V2Ray 官方 `geosite.dat` 配置方式相同。相比官方 `geosite.dat` 文件，本项目特有的类别：\n\n- `geosite:china-list`：包含 [@felixonmars/dnsmasq-china-list/accelerated-domains.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/accelerated-domains.china.conf) 文件里的域名，供有特殊 DNS 分流需求的用户使用。\n- `geosite:apple-cn`：包含 [@felixonmars/dnsmasq-china-list/apple.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/apple.china.conf) 文件里的域名，供希望 Apple 域名直连（不走代理）的用户使用。\n- `geosite:google-cn`：包含 [@felixonmars/dnsmasq-china-list/google.china.conf](https://github.com/felixonmars/dnsmasq-china-list/blob/master/google.china.conf) 文件里的域名，供希望 Google 域名直连（不走代理）的用户使用。\n- [**慎用**]`geosite:win-spy`：包含 [@crazy-max/WindowsSpyBlocker/hosts/spy.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/spy.txt) 文件里的域名，供希望屏蔽 Windows 操作系统隐私跟踪域名的用户使用。\n- [**慎用**]`geosite:win-update`：包含 [@crazy-max/WindowsSpyBlocker/hosts/update.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/update.txt) 文件里的域名，供希望屏蔽 Windows 操作系统自动升级的用户使用。\n- [**慎用**]`geosite:win-extra`：包含 [@crazy-max/WindowsSpyBlocker/hosts/extra.txt](https://github.com/crazy-max/WindowsSpyBlocker/blob/master/data/hosts/extra.txt) 文件里的域名，供希望屏蔽 Windows 操作系统附加隐私跟踪域名的用户使用。\n\n\u003e ⚠️ 注意：在 Routing 配置中，类别越靠前（上），优先级越高，所以 `geosite:apple-cn` 和 `geosite:google-cn` 要放置在 `geosite:geolocation-!cn` 前（上）面才能生效。\n\n#### 高级用法\n\nv2fly/domain-list-community 项目 [data](https://github.com/v2fly/domain-list-community/tree/master/data) 目录中某些列表里的规则会被标记诸如 `@cn` 的 attribute（如下所示），意为该域名在中国大陆有接入点，可直连。\n\n```\nsteampowered.com.8686c.com @cn\nsteamstatic.com.8686c.com @cn\n```\n\n对于玩 Steam 国区游戏，想要直连的用户，可以设置类别 `geosite:steam@cn` 为直连，意为将 [steam](https://github.com/v2fly/domain-list-community/blob/master/data/steam) 列表内所有被标记了 `@cn` attribute 的规则（域名）设置为直连。同理，由于 [category-games](https://github.com/v2fly/domain-list-community/blob/master/data/category-games) 列表包含了 `steam`、`ea`、`blizzard`、`epicgames` 和 `nintendo` 等常见的游戏厂商。设置类别 `geosite:category-games@cn` 为直连，即可节省大量服务器流量。\n\n\u003e ⚠️ 注意：在 Routing 配置中，类别越靠前（上），优先级越高，所以 `geosite:category-games@cn` 等所有带有 `@cn` attribute 的规则都要放置在 `geosite:geolocation-!cn` 前（上）面才能生效。\n\u003e \n\u003e `category-games` 列表内的规则（域名）可能会有疏漏，请留意规则命中情况。如发现遗漏，欢迎到项目 v2fly/domain-list-community 提 [issue](https://github.com/v2fly/domain-list-community/issues) 反馈。\n\n#### 配置参考下面 👇👇👇\n\n**白名单模式 Routing 配置方式**：\n\n```json\n\"routing\": {\n  \"rules\": [\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Reject\",\n      \"domain\": [\"geosite:category-ads-all\"]\n    },\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Direct\",\n      \"domain\": [\n        \"geosite:private\",\n        \"geosite:apple-cn\",\n        \"geosite:google-cn\",\n        \"geosite:tld-cn\",\n        \"geosite:category-games@cn\"\n      ]\n    },\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Proxy\",\n      \"domain\": [\"geosite:geolocation-!cn\"]\n    },\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Direct\",\n      \"domain\": [\"geosite:cn\"]\n    },\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Proxy\",\n      \"network\": \"tcp,udp\"\n    }\n  ]\n}\n```\n\n**黑名单模式 Routing 配置方式：**\n\n```json\n\"routing\": {\n  \"rules\": [\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Reject\",\n      \"domain\": [\"geosite:category-ads-all\"]\n    },\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Proxy\",\n      \"domain\": [\"geosite:gfw\"]\n    },\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Proxy\",\n      \"ip\": [\"geoip:telegram\"]\n    },\n    {\n      \"type\": \"field\",\n      \"outboundTag\": \"Direct\",\n      \"network\": \"tcp,udp\"\n    }\n  ]\n}\n```\n\n**DNS 配置方式**：\n\n```json\n\"dns\": {\n  \"hosts\": {\n    \"dns.google\": \"8.8.8.8\",\n    \"dns.pub\": \"119.29.29.29\",\n    \"dns.alidns.com\": \"223.5.5.5\",\n    \"geosite:category-ads-all\": \"127.0.0.1\"\n  },\n  \"servers\": [\n    {\n      \"address\": \"https://1.1.1.1/dns-query\",\n      \"domains\": [\"geosite:geolocation-!cn\"],\n      \"expectIPs\": [\"geoip:!cn\"]\n    },\n    \"8.8.8.8\",\n    {\n      \"address\": \"114.114.114.114\",\n      \"port\": 53,\n      \"domains\": [\"geosite:cn\", \"geosite:category-games@cn\"],\n      \"expectIPs\": [\"geoip:cn\"],\n      \"skipFallback\": true\n    },\n    {\n      \"address\": \"localhost\",\n      \"skipFallback\": true\n    }\n  ]\n}\n```\n\n### 自用 V2Ray v4 版本客户端配置（不适用于 V2Ray v5 及更新的版本）\n\n注意事项：\n\n- 由于下面客户端配置的 DNS 使用了 `skipFallback` 选项，所以必须使用 v4.37.2 或更新版本的 [V2Ray](https://github.com/v2fly/v2ray-core/releases)\n- 下面客户端配置使 V2Ray 在本机开启 SOCKS 代理（监听 1080 端口）和 HTTP 代理（监听 2080 端口），允许局域网内其他设备连接并使用代理\n- BT 流量统统直连（实测依然会有部分 BT 流量走代理，如果服务商禁止 BT 下载，请不要为下载软件设置代理）\n- 最后，不命中任何路由规则的请求和流量，统统走代理\n- `outbounds` 里的第一个大括号内的配置，即为 V2Ray 代理服务的配置。请根据自身需求进行修改，并参照 V2Ray 官网配置文档中的 [配置 \u003e Outbounds \u003e OutboundObject](https://www.v2fly.org/config/outbounds.html#outboundobject) 部分进行补全\n\n```jsonc\n{\n  \"log\": {\n    \"loglevel\": \"warning\"\n  },\n  \"dns\": {\n    \"hosts\": {\n      \"dns.google\": \"8.8.8.8\",\n      \"dns.pub\": \"119.29.29.29\",\n      \"dns.alidns.com\": \"223.5.5.5\",\n      \"geosite:category-ads-all\": \"127.0.0.1\"\n    },\n    \"servers\": [\n      {\n        \"address\": \"https://1.1.1.1/dns-query\",\n        \"domains\": [\"geosite:geolocation-!cn\", \"geosite:google@cn\"],\n        \"expectIPs\": [\"geoip:!cn\"]\n      },\n      \"8.8.8.8\",\n      {\n        \"address\": \"114.114.114.114\",\n        \"port\": 53,\n        \"domains\": [\n          \"geosite:cn\",\n          \"geosite:icloud\",\n          \"geosite:category-games@cn\"\n        ],\n        \"expectIPs\": [\"geoip:cn\"],\n        \"skipFallback\": true\n      },\n      {\n        \"address\": \"localhost\",\n        \"skipFallback\": true\n      }\n    ]\n  },\n  \"inbounds\": [\n    {\n      \"protocol\": \"socks\",\n      \"listen\": \"0.0.0.0\",\n      \"port\": 1080,\n      \"tag\": \"Socks-In\",\n      \"settings\": {\n        \"ip\": \"127.0.0.1\",\n        \"udp\": true,\n        \"auth\": \"noauth\"\n      },\n      \"sniffing\": {\n        \"enabled\": true,\n        \"destOverride\": [\"http\", \"tls\"]\n      }\n    },\n    {\n      \"protocol\": \"http\",\n      \"listen\": \"0.0.0.0\",\n      \"port\": 2080,\n      \"tag\": \"Http-In\",\n      \"sniffing\": {\n        \"enabled\": true,\n        \"destOverride\": [\"http\", \"tls\"]\n      }\n    }\n  ],\n  \"outbounds\": [\n    {\n      //下面这行，协议类别要改为socks、shadowsocks、vmess或vless等（记得删除本行文字说明）\n      \"protocol\": \"协议类别\",\n      \"settings\": {},\n      //下面这行，tag的值对应Routing里的outboundTag，这里为Proxy（记得删除本行文字说明）\n      \"tag\": \"Proxy\",\n      \"streamSettings\": {},\n      \"mux\": {}\n    },\n    {\n      \"protocol\": \"dns\",\n      \"tag\": \"Dns-Out\"\n    },\n    {\n      \"protocol\": \"freedom\",\n      \"tag\": \"Direct\",\n      \"settings\": {\n        \"domainStrategy\": \"UseIPv4\"\n      }\n    },\n    {\n      \"protocol\": \"blackhole\",\n      \"tag\": \"Reject\",\n      \"settings\": {\n        \"response\": {\n          \"type\": \"http\"\n        }\n      }\n    }\n  ],\n  \"routing\": {\n    \"domainStrategy\": \"IPIfNonMatch\",\n    \"domainMatcher\": \"mph\",\n    \"rules\": [\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"Direct\",\n        \"protocol\": [\"bittorrent\"]\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"Dns-Out\",\n        \"inboundTag\": [\"Socks-In\", \"Http-In\"],\n        \"network\": \"udp\",\n        \"port\": 53\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"Reject\",\n        \"domain\": [\"geosite:category-ads-all\"]\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"Proxy\",\n        \"domain\": [\n          \"full:www.icloud.com\",\n          \"domain:icloud-content.com\",\n          \"geosite:google\"\n        ]\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"Direct\",\n        \"domain\": [\n          \"geosite:tld-cn\",\n          \"geosite:icloud\",\n          \"geosite:category-games@cn\"\n        ]\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"Proxy\",\n        \"domain\": [\"geosite:geolocation-!cn\"]\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"Direct\",\n        \"domain\": [\"geosite:cn\", \"geosite:private\"]\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"Direct\",\n        \"ip\": [\"geoip:cn\", \"geoip:private\"]\n      },\n      {\n        \"type\": \"field\",\n        \"outboundTag\": \"Proxy\",\n        \"network\": \"tcp,udp\"\n      }\n    ]\n  }\n}\n```\n\n## 致谢\n\n- [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip)\n- [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community)\n- [@Loyalsoldier/domain-list-custom](https://github.com/Loyalsoldier/domain-list-custom)\n- [@felixonmars/dnsmasq-china-list](https://github.com/felixonmars/dnsmasq-china-list)\n- [@gfwlist/gfwlist](https://github.com/gfwlist/gfwlist)\n- [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq)\n- [@AdblockPlus/EasylistChina+Easylist.txt](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt)\n- [@AdGuard/DNS-filter](https://kb.adguard.com/en/general/adguard-ad-filters#dns-filter)\n- [@PeterLowe/adservers](https://pgl.yoyo.org/adservers)\n- [@DanPollock/hosts](https://someonewhocares.org/hosts)\n- [@crazy-max/WindowsSpyBlocker](https://github.com/crazy-max/WindowsSpyBlocker)\n\n## 项目 Star 数增长趋势\n\n[![Stargazers over time](https://starchart.cc/Loyalsoldier/v2ray-rules-dat.svg)](https://starchart.cc/Loyalsoldier/v2ray-rules-dat)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floyalsoldier%2Fv2ray-rules-dat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floyalsoldier%2Fv2ray-rules-dat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floyalsoldier%2Fv2ray-rules-dat/lists"}