chn-iplist: China IP range lists repackaged for proxy clients
Chnroutes rules for routers、Shadowrocket、Quantumult、acl、v2rayNG、v2rayN、pac、v2rayA、dae、RouterOS、v2ray、xray、sing-box config file.
At a glance
- What is it?
- The chn-iplist repository takes public China IP range data and republishes it as subscription rules for a long list of proxy clients, from Shadowrocket and Quantumult X on iOS to acl and v2rayN on Android, plus plain CIDR lists and a PAC file. It suits someone who wants one upstream feed expressed in every client dialect, and the script that does the merging is the part worth reading.
- Who is it for?
- Adopt chn-iplist if you need the same China IP routing decision expressed in a dozen client formats, since maintaining that mapping by hand is the tedious part it removes. Skip it if your client already updates its own geoip data, because the project states that for software supporting online geoip updates the rules no longer embed the list.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 6 days ago.
- What is it written in?
- Mainly RouterOS Script, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 7, 2026, and from our analysis. They are not legal advice.
Star history
- PaPerseller/chn-iplist1,182 ★ · +2
| Repository | 2026-10-23 | 2026-11-07 |
|---|---|---|
| PaPerseller/chn-iplist | 1.2k | 1.2k |
2 Stars in the last 15 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
One IP dataset, many client dialects
The repository's purpose is to take a set of China IP ranges and express them as rules in every proxy client format that has ever asked for them. The primary language is recorded as RouterOS Script, the licence is MIT, the last push was on 2026-10-01, and the repository has no GitHub releases, so the artefacts are the files in the tree. The topics list names the clients covered, with shadowrocket, quantumult, loon, acl, v2rayng, v2rayn, v2raya, dae, routeros, v2ray, xray, sing-box, pac and geoip among them, and also chnroutes, chn-ip, cnip, gfw and rules. The formats in the root directory match that list one to one, with `Shadowrocket.conf`, `Quantumult(X)_noIP.conf`, `Loon.conf`, `chn.acl`, `chnroute.txt`, `chnroute-ipv4.txt`, `chnroute-ipv6.txt`, `chnroute.pac`, `cn.rsc`, `v2rayA.txt`, `v2ray-config_rule.json`, a `Shadowrocket-DIY.module`, and directories for `ruleset/`, `sing-box/`, `v2rayN(G)/` and an `archived/` folder of older versions. The reason to consolidate them is simple, the IP data changes but the format each client wants does not, so the mapping should be generated rather than maintained by hand.
Where the IP data comes from, and what was dropped
The data sources are named in the README. For IPv4 they are metowolf/iplist and gaoyifan/china-operator-ip, and for IPv6 it is the APNIC Delegated List. The interesting decision is the one about a source that was dropped. One of the original data sources, 17mon/china_ip_list, the open-source edition of the IPIP data, has substantially stopped being maintained, and even where it updates the interval is sometimes over a year, which cannot meet the requirements for timeliness and accuracy, so it was abandoned. That is worth noting as a practice rather than a detail, because a routing dataset that is six months stale is not just imprecise, it is wrong in a way that shows up as traffic taking the wrong path. The project states that the whole set is updated automatically every fifteen days, which is a tight enough cadence for IP allocation to be worth tracking.
The merge script, and the ASN exclusion
The lists are produced by a merge and optimisation script inspired by the mosdns project, at `scripts/update_chnip.py`. What it does beyond merging is filter. During generation it excludes IPv4 prefixes belonging to specified ASNs, using the `operators.yaml` from gaoyifan/china-operator-ip, and this includes excluding the `googlecn` source IP that the upstream includes by default. That last detail is a small piece of engineering judgement that tells you the project is not a blind mirror. A list that routes Google traffic through a domestic path is often not what the person applying the rules intended, and rather than argue with the upstream dataset the script removes it. The script is the actual product here, since the generated files are its output and the README links it directly for anyone who wants to run it.
The subscription URLs, and which ones update themselves
Most of the rules are consumable by URL, which is the point of publishing them in a repository. For iOS there is the Shadowrocket configuration, the Quantumult X configuration with no chn-ip, and the Loon configuration, and the README notes that the Loon file is a concise configuration intended for self-hosted nodes. For Android there is the `chn.acl` file, described as no ban ads, and the v2rayN(G) routing ruleset, which can also be subscribed to directly inside v2rayN. For everything else there is the chnroute file with both IPv4 and IPv6, the IPv4-only and IPv6-only variants, and a PAC file that defaults to socks5 on localhost:1080. There are also three supplementary rule sets, for rejecting, for direct connections and for proxying. The third note in the closing remarks explains a subtlety that affects how you subscribe, that for software which already supports online geoip data updates, these rules no longer embed the chn-ip list at all.
The clients that need a manual paste
Some formats cannot be fetched by URL, and the README is explicit about which and how. For v2rayN(G) you copy the ruleset and import it from the clipboard inside the application's routing settings, though it can also be subscribed to within v2rayN. For v2ray and xray configuration-embedded rules you paste the rule text into the routing section of your configuration. For v2rayA and dae you replace the existing rules with the rule text. And for RouterOS there is a script that you either run as commands or save as a script:
/tool fetch url="https://edgeone.gh-proxy.org/https://raw.githubusercontent.com/PaPaperseller/chn-iplist/master/cn.rsc"
/import file-name=cn.rsc
/file remove [find name="cn.rsc"]The last line is the detail that matters. The script fetches the file to the router, imports it, and then deletes the temporary copy, so the router is not left holding a downloaded artefact. The README also recommends a CDN-accelerated address for the download to improve the success rate, which is a practical note for anyone on a network where GitHub raw is slow.
The IPv6 caveat, and the sing-box warning
Three of the closing notes matter in practice. The first is about IPv6. Shadowrocket, Loon and the other clients with an IPv6 switch will fail to connect if the server does not support IPv6, so they should be set to IPv4 only, and the project provides two extra remote rule sets for that, one prefixed IP-CIDR and one IP-CIDR6, both with the no-resolve flag. The second is about Shadowrocket's online update overwriting custom rules, for which a simplified configuration module is provided, with the instruction to create a module and paste the content in rather than adding it by URL, since a URL-added module gets reset. The third is the sing-box configuration, which is described as based on personal use and feedback, provided for reference only, with the explicit warning that because the sing-box configuration syntax and format change often the project reduces its update frequency for it and does not guarantee it works, and a further note that sing-box has limited protocol support and follow-up.
What the project is, and what it is not
It is worth being clear about the category. This is a data transformation project. It takes IP allocation data that other people publish, applies a filter and a merge, and writes the result out in a dozen formats so that a user does not have to. The primary language being RouterOS Script tells you the shape of the output set, since the RouterOS form is the most awkward to produce and so drives the tooling. The acknowledgements name the projects the work leans on, with CIDR2PAC, an ES6 script for converting CIDR lists to a PAC proxy script, ACL4SSR and Clash for the rule fragments, domain-list-community for the community-managed domain list, mosdns as the plugin-based DNS forwarder and splitter, Loyalsoldier/v2ray-rules-dat for the routing rule files, and the Shadowrocket and Quantumult ecosystems. The project is MIT licensed, the repository has no releases, and the update cadence is every fifteen days, which means the useful artefact is the raw URL rather than a version you pin.
Editorial conclusion
Adopt chn-iplist if you need the same China IP routing decision expressed in a dozen client formats, since maintaining that mapping by hand is the tedious part it removes. Skip it if your client already updates its own geoip data, because the project states that for software supporting online geoip updates the rules no longer embed the list. Before you subscribe, read the notes on IPv6, since clients with an IPv6 switch need it set to IPv4 only if the server does not support IPv6, and note that the sing-box configuration is explicitly provided as-is without a guarantee of working.
Frequently asked questions
Where does chn-iplist get its IP data?
For IPv4 from metowolf/iplist and gaoyifan/china-operator-ip, and for IPv6 from the APNIC Delegated List. The 17mon/china_ip_list source was dropped because it had substantially stopped being maintained and its update interval could exceed a year.
How often are the chn-iplist rules updated?
Every fifteen days, automatically. The lists are produced by a merge and optimisation script inspired by the mosdns project, at scripts/update_chnip.py, which also excludes IPv4 prefixes for specified ASNs using the operators.yaml from gaoyifan/china-operator-ip.
Which chn-iplist rules can I subscribe to by URL?
The Shadowrocket, Quantumult X and Loon configurations for iOS, the chn.acl file for Android, the chnroute files for IPv4 and IPv6, the PAC file, and the three supplementary rule sets for reject, direct and proxy. The v2rayN, v2ray, xray and v2rayA rules need to be pasted in manually.
How do I deploy the chn-iplist rules on RouterOS?
Fetch the cn.rsc file with /tool fetch, import it with /import file-name=cn.rsc, then remove the temporary file with /file remove [find name="cn.rsc"]. The README recommends a CDN-accelerated URL for the download to improve the success rate.
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/paperseller-chn-iplist)Star history chart for your README
[](https://hysenlabs.com/projects/paperseller-chn-iplist)Was this useful?