Loyalsoldier/v2ray-rules-dat: a daily-rebuilt replacement for geoip.dat and geosite.dat
🦄 🎃 👻 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.
At a glance
- What is it?
- The project ships enhanced V2Ray rule data files plus plain domain lists, rebuilt every day by GitHub Actions. It is a data dependency, not a client, and the README's own routing notes are the part most users skip.
- Who is it for?
- Adopt it if you run V2Ray, Xray-core, mihomo, hysteria, Trojan-Go or leaf and want China, advertising and GFWList coverage folded into one geosite.dat, and you are willing to re-download that file when you want newer data. Do not adopt it if you need per-user rule curation inside the dat file, or if you cannot tolerate a third-party list deciding what is direct and what is proxied.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 7 days ago.
- What is it written in?
- GitHub does not report a main language for this repository.
Answers come from the project's GitHub data, last synced on September 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What the two dat files actually decide
A V2Ray-family client routes traffic by matching a request against rule sets and then applying an outbound. Two of those rule sets are binary data files: geoip.dat maps IP ranges to country codes such as geoip:cn, and geosite.dat maps domain patterns to named categories such as geosite:cn. The official files are minimal. This project publishes enhanced versions that can be dropped in as replacements.
The audience is narrow and specific. You are running V2Ray, Xray-core, mihomo (Clash-Meta), hysteria, Trojan-Go or leaf, or a GUI built on one of those cores, and you want routing decisions that already know about mainland China domains, advertising domains and GFWList entries without you maintaining thousands of lines of domain rules by hand. If you use a client that has its own built-in rule format and never reads geoip.dat, this repository has nothing to offer you.
How the enhanced files are assembled
The README is unusually explicit about provenance, which matters because you are trusting a binary blob to decide which traffic leaves your machine unproxied.
geoip.dat is generated through the author's separate Loyalsoldier/geoip repository. Country and region categories come from MaxMind GeoLite2 Country CSV data, so any two-letter country code is available as a category. The mainland China category is the exception: geoip:cn IPv4 comes from gaoyifan/china-operator-ip's china.txt and IPv6 from the same project's china6.txt. On top of the country set, the project adds service categories: geoip:cloudflare, geoip:cloudfront, geoip:facebook, geoip:fastly, geoip:google, geoip:netflix, geoip:telegram, geoip:twitter and geoip:tor.
geosite.dat starts from v2fly/domain-list-community data and is built through Loyalsoldier/domain-list-custom. Several upstream lists are folded in. dnsmasq-china-list's accelerated-domains.china.conf goes into geosite:china-list and geosite:cn. The same project's apple.china.conf and google.china.conf go into geosite:geolocation-!cn, which is a deliberate choice worth pausing on: those Apple and Google domains land in the non-China category, so routing geolocation-!cn to a proxy sends them through it. The README says so directly and points to a separate routing configuration for users who would rather keep them direct. GFWList data, processed through cokebar/gfwlist2dnsmasq, goes into geosite:gfw and also into geosite:geolocation-!cn. Advertising domains from EasyList plus EasyListChina, the AdGuard DNS filter, Peter Lowe's adservers and Dan Pollock's hosts all land in geosite:category-ads-all. Windows telemetry and update domains from crazy-max/WindowsSpyBlocker become geosite:win-spy, geosite:win-update and geosite:win-extra.
The build runs on GitHub Actions at 06:00 Beijing time each day, according to the README. The release tags reflect that cadence: 202609172350, 202609182348 and 202609192350 are three consecutive daily builds.
Downloading the dat files and a first routing rule
There is nothing to compile. The README lists download URLs for geoip.dat, geosite.dat and three plain text lists (direct-list.txt, proxy-list.txt, reject-list.txt), each with a .sha256sum checksum file. Releases are served from the GitHub releases path, with cdn.jsdelivr.net as an alternative and fastly.jsdelivr.net as a substitute for jsdelivr. Place the two dat files where your client expects them, replacing the official geoip.dat and geosite.dat.
The README gives these addresses for the two dat files and their checksum files:
https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat
https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.datFetch one of each pair, verify it against the matching .sha256sum file, then move it into your client's asset directory in place of the official file. A routing block that uses the enhanced categories reads the same as any other V2Ray routing config, because the category names are what changed, not the schema. The categories named in the README are geosite:category-ads-all, geosite:cn, geosite:geolocation-!cn, geosite:gfw, geosite:china-list, geosite:win-spy, geosite:win-update, geosite:win-extra, geoip:cn and the service categories listed above.
What you should see after reloading the client is that advertising domains resolve to a block outbound, mainland domains and mainland IPs go direct, and everything in the non-China category takes the proxy. If geosite:category-ads-all matches nothing, the dat file was not picked up. The README does not document a rollback path, so keep the previous dat files before overwriting them.
Where the maintained lists will surprise you
The Apple and Google decision is the sharpest edge in this project. Because apple.china.conf and google.china.conf are added to geosite:geolocation-!cn, a config that proxies that whole category will proxy Apple and Google China domains too. Users who expect Apple traffic to stay direct will see the opposite. The README acknowledges this and offers a routing workaround rather than a separate category, which means the burden is on you to write the exception.
geosite:win-spy, geosite:win-update and geosite:win-extra are each marked 慎用 (use with caution) in the README. Routing win-update to a proxy or to a block outbound can break Windows Update in ways that are annoying to diagnose, and win-spy covers telemetry endpoints that some corporate networks depend on.
The customisation path is also not local. If an upstream list is missing a domain, or contains one you want gone, the README points to six files on a hidden branch: direct.txt, proxy.txt and reject.txt for additions, and direct-need-to-remove.txt, proxy-need-to-remove.txt and reject-need-to-remove.txt for removals. Editing those means forking the project and running its build, not tweaking a config on your machine. That is a real barrier for anyone who wants a handful of personal exceptions.
How it differs from MetaCubeX/meta-rules-dat
The obvious alternative people search for is MetaCubeX/meta-rules-dat. The difference is the target core. This project's output is built to replace geoip.dat and geosite.dat for V2Ray, Xray-core, mihomo, hysteria, Trojan-Go and leaf, and its category names follow that ecosystem: geosite:cn, geosite:geolocation-!cn, geosite:category-ads-all, geoip:cn. meta-rules-dat serves the mihomo (Clash.Meta) rule-provider model, where rules are consumed as separate YAML rule sets rather than as two monolithic dat files. If your client loads rule providers, the dat-file approach does not fit it, and the reverse is also true. Choosing between them is really choosing which core you run, not which list is better.
The plain text files here are the other half of the story. direct-list.txt, proxy-list.txt and reject-list.txt are published alongside the dat files on the release branch, so a tool that wants domain lists without the binary format can consume them directly.
Maintenance, licence and what you are signing up for
The last push to the default branch was on 2026-09-19, and the release history shows a build roughly every day, so the data side is current. Your own maintenance cost is the part that gets underestimated. Nothing updates geoip.dat or geosite.dat for you unless your client or your deployment script fetches them; a client that was configured once with a downloaded file keeps routing on that file indefinitely. The practical pattern is a scheduled fetch of the release URL plus a checksum check, which is exactly what the .sha256sum files exist for.
The licence is GPL-3.0. That governs the repository and its build tooling. Whether redistributing a generated dat file inside your own product carries obligations is a question the README does not address, and it is worth asking a lawyer rather than a search engine. For individual users pointing a client at a downloaded file, the licence question rarely comes up, but bundling these files into a distributed application is a different situation.
Editorial conclusion
Adopt it if you run V2Ray, Xray-core, mihomo, hysteria, Trojan-Go or leaf and want China, advertising and GFWList coverage folded into one geosite.dat, and you are willing to re-download that file when you want newer data. Do not adopt it if you need per-user rule curation inside the dat file, or if you cannot tolerate a third-party list deciding what is direct and what is proxied. Verify first that your client accepts a replacement geosite.dat on disk and that you know which of the win-spy, win-update and win-extra categories you are about to route, since the README marks all three as use with caution.
Frequently asked questions
Can I use Loyalsoldier/v2ray-rules-dat with a V2Ray configuration for Russia?
The geoip.dat side is generated from MaxMind GeoLite2 Country CSV data, so country categories are available by two-letter code, and the README links to the full country-code list. The geosite.dat side is built around China, Apple, Google, GFWList and advertising lists, so it does not ship a Russia-specific domain category.
How do I configure V2Ray to use these rule files?
Place the downloaded geoip.dat and geosite.dat where your client expects the official files, then reference the categories in a routing block, for example geosite:category-ads-all, geosite:cn, geoip:cn and geosite:geolocation-!cn. The README notes that Apple and Google China domains are placed in geosite:geolocation-!cn, so a separate routing rule is needed if you want them direct.
Is V2Ray a VPN?
This repository contains only rule data files, not a client or a VPN service, so it does not answer that question on its own. What it provides is geoip.dat and geosite.dat replacements for V2Ray, Xray-core, mihomo, hysteria, Trojan-Go and leaf.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/loyalsoldier-v2ray-rules-dat)