Skip to content

GeoIP Database ​

chnroutes.mmdb is a self-maintained mainland China IP database: built daily from Loyalsoldier/geoip's cn.txt, covering about 9,600 CIDRs in the standard MaxMind GeoLite2-Country format. Works with Surge, Quantumult X and Loon.

Download:

text
https://github.com/dmulle12/rules/raw/rel/chnroutes.mmdb

Setup ​

ini
[General]
geoip-maxmind-url = https://github.com/dmulle12/rules/raw/rel/chnroutes.mmdb
ini
[general]
geoip-url = https://github.com/dmulle12/rules/raw/rel/chnroutes.mmdb
ini
[General]
geoip-url = https://github.com/dmulle12/rules/raw/rel/chnroutes.mmdb

In Quantumult X you can also fill in the URL under "Other Settings → GeoLite2 → Source"; in Loon under "Settings → GeoLite2 Database".

Use With Rules ​

ini
[Rule]
GEOIP,CN,China
ini
[filter_local]
geoip,cn,China
ini
[Rule]
GEOIP,CN,China
yaml
rules:
  - GEOIP,CN,China

Why

Domain rules (like streaming-cn) work at the domain level. If an app connects straight to an IP with no domain involved, this IP-level GEOIP,CN fallback catches it and sends it to your China policy.

Rule sets are rebuilt daily by GitHub Actions