{"id":13456283,"url":"https://github.com/Loyalsoldier/v2ray-rules-dat","last_synced_at":"2025-03-24T09:31:56.739Z","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":"2024-10-24T22:12:37.000Z","size":14746,"stargazers_count":14915,"open_issues_count":4,"forks_count":1777,"subscribers_count":140,"default_branch":"master","last_synced_at":"2024-10-24T22:23:43.543Z","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}},"created_at":"2019-12-10T03:19:35.000Z","updated_at":"2024-10-24T21:46:42.000Z","dependencies_parsed_at":"2023-11-16T23:54:21.519Z","dependency_job_id":"12f21236-efb8-4b0c-be9d-e551079c871a","html_url":"https://github.com/Loyalsoldier/v2ray-rules-dat","commit_stats":null,"previous_names":[],"tags_count":2110,"template":false,"template_full_name":null,"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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245243389,"owners_count":20583615,"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":["adblock","adguard","anticensorship","chinalist","dnsmasq","easylist","geoip","geosite","gfw","gfwlist","hysteria","ipv4","ipv6","mihomo","proxy","routing","trojan","trojan-go","v2ray","xray"],"created_at":"2024-07-31T08:01:19.224Z","updated_at":"2025-03-24T09:31:54.607Z","avatar_url":"https://github.com/Loyalsoldier.png","language":null,"funding_links":[],"categories":["Others","说明","miscellaneous","使用本项目的项目"],"sub_categories":[],"readme":"# 简介\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)。使用 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 地址数据融合了 [IPIP.net](https://github.com/17mon/china_ip_list/blob/master/china_ip_list.txt) 和 [@gaoyifan/china-operator-ip](https://github.com/gaoyifan/china-operator-ip/blob/ip-lists/china.txt)\n- 中国大陆 (`geoip:cn`) IPv6 地址数据融合了 MaxMind GeoLite2 和 [@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\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"}