alecthw / mmdb_china_ip_list Goto Github PK
View Code? Open in Web Editor NEWGeoip MaxMind Database for china ip list! This is also an example of generating MaxMind Database!
License: MIT License
Geoip MaxMind Database for china ip list! This is also an example of generating MaxMind Database!
License: MIT License
只有Country的话只能限定到国家,基于国内省份或城市的需求就无法实现了, GeoLite2-City库也有类似不精确的问题
能做个这样的版本吗?
geoip,telegram,proxy
geoip,lan,direct
geoip,cn,direct
不用 IP-CIDR 规则是希望可以在日志中很方便的看到是什么流量。
不用 rule-set 是因为域名全部用 geosite 实现了,不想因为一个 telegram 再下载规则(因为不知道什么时候就下载不了了)
如果软件不支持自定义的写法,并且开发商不想支持,甚至可以用国家代码代替(比如 us hk 代替 telegram lan )。
希望使用的数据来源:
https://github.com/misakaio/chnroutes2
https://core.telegram.org/resources/cidr.txt
比如
**联通2408.xxxx
**电信240e.xxxx
**移动2409.xxxx
以上这些经过测试在lite版里并没分类到cn IP
测试用完整版就有分类到cn ip里
不用key就能获取,每月更新,且使用CC4.0协议分发
例:
https://download.db-ip.com/free/dbip-country-lite-2020-05.csv.gz
https://download.db-ip.com/free/dbip-country-lite-2020-05.mmdb.gz
再加上CI的话基本就数据源有更新就可以自动release
而且哪怕是**以外的IP记录比MaxMind的要详细的样子?(虽然个人觉得还是差不多
Lite版本真香,有一个想法,希望大佬能考虑一下:
各类接管流量分流的app和软件,配置文件上对于mmdb的应用,几乎都是清一色的geoip,cn和非cn,这种使用场景下cn以外的数据显然没有存在的必要
能否提供一个只有cn数据的Lite版本,只包含china_ip_list、纯真CN和Clang.CN,并且仅写入了 iso_code 和 geoname_id
这样可以将检索效率提高到极致,对移动设备的续航也可以起到不错的作用
例如:geoip:CN 是国内ip,那非国内ip的名称是什么?
因为有些自定义设置的IP地址段是不准的,比如我临时用30.30.1.1实际上这是互联地址,或者我重新到互联网申请一段地址段,也是没有归属的,比如标识是亚太,我能否自定义修改这个库,或者新增一个provate.mmdb库,优先识别
8.129.0.0/17
8.129.0.0/16
8.129.128.0/17
8.130.0.0/16
8.130.0.0/15
8.131.0.0/16
8.132.0.0/16
8.132.0.0/15
8.133.0.0/16
8.134.0.0/17
8.134.0.0/16
8.134.128.0/17
8.134.192.0/24
8.135.0.0/17
8.135.0.0/16
8.135.128.0/17
8.136.0.0/17
8.136.0.0/16
8.136.128.0/17
8.140.0.0/15
8.140.0.0/14
8.142.0.0/15
8.144.0.0/15
8.144.0.0/14
8.146.0.0/15
39.96.0.0/14
39.96.0.0/13
39.100.0.0/14
39.104.0.0/15
39.104.0.0/14
39.106.0.0/15
39.108.0.0/17
39.108.0.0/16
39.108.128.0/17
42.96.128.0/17
42.120.0.0/17
42.120.0.0/16
42.120.128.0/17
42.120.248.0/24
42.121.0.0/17
42.121.0.0/16
42.121.128.0/17
42.156.128.0/18
42.156.128.0/17
42.156.192.0/18
43.16.0.0/12
45.113.40.0/23
45.113.40.0/22
45.113.42.0/23
47.92.0.0/15
47.92.0.0/14
47.94.0.0/15
47.96.0.0/15
47.96.0.0/14
47.98.0.0/15
47.100.0.0/15
47.100.0.0/14
47.102.0.0/15
47.104.0.0/16
47.104.0.0/15
47.105.0.0/16
47.106.0.0/16
47.106.0.0/15
47.107.0.0/16
47.108.0.0/16
47.108.0.0/15
47.108.108.0/24
47.109.0.0/16
47.110.0.0/16
47.110.0.0/15
47.111.0.0/16
47.112.0.0/16
47.112.0.0/15
47.113.0.0/16
47.114.0.0/17
47.114.0.0/16
47.114.16.0/24
47.114.128.0/17
47.115.0.0/17
47.115.0.0/16
47.115.128.0/17
47.116.0.0/17
47.116.0.0/16
47.116.128.0/17
47.117.0.0/17
47.117.0.0/16
47.117.128.0/17
47.118.0.0/17
47.118.0.0/16
47.118.128.0/17
47.119.0.0/17
47.119.0.0/16
47.119.128.0/17
47.120.0.0/16
47.120.0.0/15
47.121.0.0/16
47.122.0.0/20
47.122.0.0/19
47.122.16.0/20
59.82.0.0/22
59.82.0.0/21
59.82.4.0/22
59.82.8.0/22
59.82.8.0/21
59.82.12.0/22
59.82.16.0/21
59.82.16.0/20
59.82.24.0/21
59.82.32.0/21
59.82.32.0/20
59.82.40.0/21
59.82.48.0/22
59.82.48.0/21
59.82.52.0/22
59.82.56.0/22
59.82.56.0/21
59.82.60.0/22
59.82.64.0/20
59.82.64.0/19
59.82.80.0/20
59.82.96.0/23
59.82.96.0/22
59.82.98.0/23
59.110.0.0/17
59.110.0.0/16
59.110.128.0/17
60.205.0.0/17
60.205.0.0/16
60.205.128.0/17
60.205.133.0/24
101.37.0.0/17
101.37.0.0/16
101.37.128.0/17
101.132.0.0/16
101.132.0.0/15
101.133.0.0/16
101.133.201.0/24
101.200.0.0/16
101.200.0.0/15
101.201.0.0/16
103.52.196.0/23
103.52.196.0/22
103.52.198.0/23
106.11.0.0/19
106.11.0.0/16
106.11.1.0/24
106.11.32.0/22
106.11.36.0/22
106.11.40.0/21
106.11.48.0/21
106.11.56.0/21
106.11.64.0/19
106.11.128.0/20
106.11.144.0/20
106.11.160.0/20
106.11.176.0/21
106.11.184.0/21
106.11.192.0/23
106.11.194.0/23
106.11.196.0/23
106.11.198.0/24
106.11.199.0/24
106.11.200.0/24
106.11.201.0/24
106.11.202.0/23
106.11.204.0/22
106.11.208.0/21
106.11.216.0/21
106.11.224.0/19
106.14.0.0/16
106.14.0.0/15
106.15.0.0/16
110.75.0.0/17
110.75.0.0/16
110.75.128.0/17
110.75.138.0/23
110.75.227.0/24
110.75.228.0/24
110.75.230.0/24
110.75.233.0/24
110.75.235.0/24
110.75.236.0/22
110.75.240.0/20
110.76.0.0/20
110.76.0.0/19
110.76.2.0/24
110.76.2.0/23
110.76.3.0/24
110.76.8.0/23
110.76.8.0/22
110.76.10.0/23
110.76.12.0/24
110.76.12.0/23
110.76.13.0/24
110.76.15.0/24
110.76.16.0/20
110.76.21.0/24
110.76.23.0/24
110.76.30.0/23
110.76.32.0/20
110.76.48.0/20
110.76.56.0/22
110.76.60.0/22
110.173.192.0/20
110.173.192.0/19
110.173.196.0/24
110.173.208.0/20
112.74.0.0/17
112.74.0.0/16
112.74.128.0/17
112.124.0.0/17
112.124.0.0/16
112.124.128.0/17
112.125.0.0/17
112.125.0.0/16
112.125.128.0/17
112.126.0.0/17
112.126.0.0/16
112.126.128.0/17
112.127.0.0/17
112.127.0.0/16
112.127.128.0/17
114.55.0.0/17
114.55.0.0/16
114.55.128.0/17
114.215.0.0/18
114.215.0.0/16
114.215.64.0/18
114.215.96.0/19
114.215.128.0/19
114.215.160.0/21
114.215.164.0/22
114.215.220.0/22
115.28.0.0/18
115.28.0.0/16
115.28.64.0/18
115.28.128.0/18
115.28.192.0/18
115.29.0.0/17
115.29.0.0/16
115.29.32.0/19
115.29.64.0/18
115.29.128.0/19
115.29.128.0/17
115.124.16.0/22
115.124.16.0/20
115.124.20.0/22
115.124.24.0/21
116.62.0.0/17
116.62.0.0/16
116.62.128.0/17
118.31.0.0/17
118.31.0.0/16
118.31.128.0/17
118.178.0.0/17
118.178.0.0/16
118.178.128.0/17
118.190.0.0/17
118.190.0.0/16
118.190.128.0/17
119.23.0.0/17
119.23.0.0/16
119.23.128.0/17
119.38.208.0/21
119.38.208.0/20
119.38.216.0/21
119.38.219.0/24
119.42.224.0/22
119.42.224.0/19
119.42.228.0/24
119.42.228.0/23
119.42.229.0/24
119.42.230.0/24
119.42.230.0/23
119.42.231.0/24
119.42.232.0/24
119.42.240.0/24
119.42.240.0/23
119.42.241.0/24
119.42.242.0/24
119.42.242.0/23
119.42.243.0/24
120.24.0.0/16
120.24.0.0/15
120.24.0.0/14
120.25.0.0/16
120.26.0.0/16
120.27.0.0/18
120.27.0.0/17
120.27.64.0/18
120.27.79.0/24
120.27.128.0/18
120.27.128.0/17
120.27.192.0/18
120.55.0.0/17
120.55.0.0/16
120.55.128.0/17
120.76.0.0/17
120.76.0.0/16
120.76.0.0/15
120.76.128.0/17
120.77.0.0/17
120.77.0.0/16
120.77.128.0/17
120.77.193.0/24
120.78.0.0/16
120.78.0.0/15
120.79.0.0/16
121.0.16.0/21
121.0.16.0/20
121.0.24.0/22
121.0.28.0/22
121.40.0.0/15
121.40.0.0/14
121.42.0.0/18
121.42.0.0/15
121.42.17.0/24
121.42.64.0/18
121.42.128.0/18
121.42.192.0/19
121.42.224.0/19
121.89.0.0/17
121.89.0.0/16
121.89.128.0/17
121.196.0.0/16
121.196.0.0/14
121.197.0.0/16
121.198.0.0/16
121.199.0.0/16
123.56.0.0/16
123.56.0.0/15
123.57.0.0/24
123.57.0.0/16
123.57.45.0/24
139.129.0.0/24
139.129.0.0/17
139.129.0.0/16
139.129.128.0/17
139.196.0.0/24
139.196.0.0/17
139.196.0.0/16
139.196.128.0/17
139.224.0.0/24
139.224.0.0/17
139.224.0.0/16
139.224.128.0/17
140.205.0.0/24
140.205.0.0/19
140.205.0.0/16
140.205.1.0/24
140.205.32.0/19
140.205.64.0/18
140.205.76.0/24
140.205.122.0/24
140.205.128.0/18
140.205.192.0/18
182.92.0.0/24
182.92.0.0/17
182.92.0.0/16
182.92.128.0/17
203.107.0.0/24
203.107.1.0/24
203.107.6.0/24
203.107.20.0/24
203.107.21.0/24
203.107.22.0/24
203.107.23.0/24
203.107.32.0/24
203.107.32.0/22
203.107.32.0/21
203.107.33.0/24
203.107.34.0/24
203.107.35.0/24
203.107.36.0/24
203.107.36.0/22
203.107.37.0/24
203.107.38.0/24
203.107.39.0/24
203.107.40.0/24
203.107.40.0/23
203.107.40.0/22
203.107.41.0/24
203.107.42.0/24
203.107.42.0/23
203.107.43.0/24
203.107.44.0/24
203.107.44.0/23
203.107.44.0/22
203.107.45.0/24
203.107.46.0/24
203.107.46.0/23
203.107.47.0/24
203.107.48.0/24
203.107.48.0/23
203.107.48.0/22
203.107.49.0/24
203.107.50.0/24
203.107.50.0/23
203.107.51.0/24
203.107.52.0/24
203.107.52.0/23
203.107.52.0/22
203.107.53.0/24
203.107.54.0/24
203.107.54.0/23
203.107.55.0/24
203.107.56.0/24
203.107.56.0/23
203.107.56.0/22
203.107.57.0/24
203.107.58.0/24
203.107.58.0/23
203.107.59.0/24
203.107.60.0/24
203.107.60.0/23
203.107.60.0/22
203.107.61.0/24
203.107.62.0/24
203.107.62.0/23
203.107.63.0/24
203.119.128.0/21
203.119.128.0/20
203.119.144.0/21
203.119.152.0/22
203.119.152.0/21
203.119.156.0/22
203.119.160.0/24
203.119.168.0/22
203.119.168.0/21
203.119.172.0/22
203.119.176.0/21
203.119.176.0/20
203.119.184.0/21
203.119.192.0/19
203.119.192.0/18
203.119.224.0/19
203.209.224.0/20
203.209.224.0/19
203.209.225.0/24
203.209.226.0/23
203.209.228.0/22
203.209.232.0/21
203.209.236.0/23
203.209.240.0/20
203.209.242.0/24
203.209.242.0/23
203.209.243.0/24
203.209.244.0/23
203.209.244.0/22
203.209.246.0/23
203.209.248.0/24
203.209.248.0/23
203.209.249.0/24
203.209.250.0/24
203.209.250.0/23
203.209.251.0/24
203.209.252.0/23
203.209.252.0/22
203.209.254.0/23
218.244.128.0/20
218.244.128.0/19
218.244.144.0/20
223.4.0.0/16
223.4.0.0/14
223.5.0.0/16
223.5.5.0/24
223.6.0.0/16
223.6.6.0/24
223.7.0.0/16
20210726版本大小为4 MB
20210802版的体积大小突然暴增为15.3 MB
这是里面ip数据重复了吗?
如果maxmind的ip不准,可能会出现把有些ip误判为国内的ip,并且绝大多数用户大概只需要使用到cn的ip,所以我觉得只需要chinaip+纯真ip的版本可能效果会更好。由于对linux不熟,所以不会自己弄。就厚着脸皮来麻烦大佬了。感谢大佬做出这个项目。
Clang.CN 把很多香港ip归类到了大陆
"is_in_european_union"字段是否可以判断ip属于欧洲的ip,如果要写到openclash的规则中要怎么使用?
@alecthw 请教一下
根据你的描述
由于构建mmdb,后者覆盖前者的特性,ip列表的插入顺序如下:
- Clang.CN
- 纯真CN数据库
国内大陆 IP 段
- china_ip_list
后者覆盖前者的特性
是否指的是 往mmdb插入数据的时候,利用数据库不可插入重复数据的特性,完成上述CIDR数据的融合
呢?
即,没有使用例如GO语言现成的库(或者你手写了),首先处理完TXT文本CIDR的处理,才往MMDB导入?
我想用在手机端,代替GEOIPLITE
RT.
兄弟,有没有精确到市县的库
如果一个IP在原版中被误判为CN,而且又恰好无法被后来添加的数据所覆盖,那么依旧会被误判。
平时遇到的误判大多都是国外IP被误判为CN,如果不事先删除原版的CN数据,直接进行叠加,这些被误判断国外IP显然无法被覆盖,也就没有解决此类误判
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.