Compare commits

...

5 Commits

Author SHA1 Message Date
Loyalsoldier
d54f2a5424 Update README.md 2021-01-16 00:25:28 +08:00
Loyalsoldier
ba6139b8fe Refine README 2020-12-28 18:58:01 +08:00
Loyalsoldier
9486e7b460 Refine geosite:gfw description 2020-12-27 17:14:27 +08:00
loyalsoldier
0fae67f885 Add Telegram CIDR to blacklist mode 2020-11-24 15:21:46 +08:00
loyalsoldier
ccc66630b4 Avoid license issue
due to 4beadd53d7

To achieve this goal, use geoip.dat from repo Loyalsoldier/geoip directly without modification (remix, transform and build).
2020-11-19 02:30:59 +08:00
2 changed files with 60 additions and 33 deletions

View File

@@ -42,12 +42,6 @@ jobs:
with:
ref: hidden
- name: Checkout Loyalsoldier/geoip
uses: actions/checkout@v2.3.4
with:
repository: Loyalsoldier/geoip
path: geoip
- name: Checkout Loyalsoldier/domain-list-custom
uses: actions/checkout@v2.3.4
with:
@@ -60,19 +54,10 @@ jobs:
repository: v2fly/domain-list-community
path: community
- name: Get GeoLite2 zip file
env:
LICENSE_KEY: ${{ secrets.MAXMIND_GEOLITE2_LICENSE }}
- name: Get geoip.dat relative files
run: |
curl -L -o GeoLite2-Country-CSV.zip "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=${LICENSE_KEY}&suffix=zip"
unzip GeoLite2-Country-CSV.zip
rm -f GeoLite2-Country-CSV.zip
mv GeoLite2* geolite2
- name: Generate geoip.dat file
run: |
cd geoip || exit 1
go run ./ --country=../geolite2/GeoLite2-Country-Locations-en.csv --ipv4=../geolite2/GeoLite2-Country-Blocks-IPv4.csv --ipv6=../geolite2/GeoLite2-Country-Blocks-IPv6.csv --ipv4CN=https://raw.githubusercontent.com/pexcn/daily/gh-pages/chnroute/chnroute.txt
wget https://github.com/Loyalsoldier/geoip/raw/release/geoip.dat
wget https://github.com/Loyalsoldier/geoip/raw/release/geoip.dat.sha256sum
- name: Get and add direct domains into temp-direct.txt file
run: |
@@ -173,14 +158,14 @@ jobs:
- name: Move and zip files and generate sha256 hash
run: |
install -Dp ./geoip/geoip.dat ./publish/geoip.dat
install -Dp ./geoip.dat ./publish/geoip.dat
install -Dp ./geoip.dat.sha256sum ./publish/geoip.dat.sha256sum
install -Dp ./custom/publish/dlc.dat ./publish/geosite.dat
install -p {proxy,direct,reject}-tld-list.txt ./publish/
install -p {proxy,direct,reject}-list.txt ./publish/
install -p {apple-cn,google-cn,gfw,greatfire}.txt ./publish/
cd ./publish || exit 1
zip rules.zip {proxy,direct,reject}-list.txt geoip.dat geosite.dat
sha256sum geoip.dat > geoip.dat.sha256sum
sha256sum geosite.dat > geosite.dat.sha256sum
sha256sum rules.zip > rules.zip.sha256sum

View File

@@ -1,18 +1,13 @@
# 简介
[**V2Ray**](https://github.com/v2fly/v2ray-core) 路由规则文件加强版,可代替 V2Ray 官方 `geoip.dat``geosite.dat` 规则文件,兼容 [**Trojan-Go**](https://github.com/p4gefau1t/trojan-go)。利用 GitHub Actions 北京时间每天早上 6 点自动构建,保证规则最新。
## 说明
- 本项目适用于命令行版本 V2Ray 客户端。第三方桌面图形界面版GUIV2Ray 客户端一般都有路由规则图形化配置界面,但一般也都支持使用自定义 V2Ray JSON 配置和 dat 规则文件,请自行研究并修改配置。第三方移动设备版 V2Ray 客户端情况比较复杂,大概率不支持使用自定义 V2Ray JSON 配置和 dat 规则文件,请知悉。
- [Fork](https://github.com/Loyalsoldier/v2ray-rules-dat/fork) 本项目后,需要在自己仓库的 **[Settings]** 选项卡的 **[Secrets]** 页面中添加一个名为 **MAXMIND_GEOLITE2_LICENSE** 的 secret否则 GitHub Actions 会运行失败。这个 secret 的值为 MAXMIND 账号的 LICENSE KEY需要[**注册 MAXMIND 账号**](https://www.maxmind.com/en/geolite2/signup)后,在[**个人账号管理页面**](https://www.maxmind.com/en/account)左侧边栏的 **[Services]** 项下的 **[My License Key]** 里生成。
[**V2Ray**](https://github.com/v2fly/v2ray-core) 路由规则文件加强版,可代替 V2Ray 官方 `geoip.dat``geosite.dat` 规则文件,兼容 [Trojan-Go](https://github.com/p4gefau1t/trojan-go) 和 [Shadowsocks-windows](https://github.com/shadowsocks/shadowsocks-windows)。利用 GitHub Actions 北京时间每天早上 6 点自动构建,保证规则最新。
## 规则文件生成方式
### geoip.dat
- 通过仓库 [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip) 生成
- 其中全球 IP 地址IPv4 和 IPv6来源于 [MaxMind GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/)`CN`(中国大陆)类别下的 IPv4 地址来源于 [@pexcn/chnroute.txt](https://github.com/pexcn/daily/blob/gh-pages/chnroute/chnroute.txt)(融合了 [ipip.net](https://github.com/17mon/china_ip_list) 和 [APNIC](https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest) 的中国大陆 IPv4 地址)
- 其中全球 IP 地址IPv4 和 IPv6来源于 [MaxMind GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/)`CN`(中国大陆)类别下的 IPv4 地址来源于 [ipip.net](https://github.com/17mon/china_ip_list)
### geosite.dat
@@ -22,8 +17,8 @@
- [@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)
- [@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)
- **加入 GFWList 域名**
- 通过仓库 [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq) 和 [@pexcn/gfwlist-extras](https://github.com/pexcn/gfwlist-extras) 生成
- 加入到 `geosite:gfw` 类别中,供希望使用 GFWList 的用户使用
- 基于 [@gfwlist/gfwlist](https://github.com/gfwlist/gfwlist) 数据,通过仓库 [@cokebar/gfwlist2dnsmasq](https://github.com/cokebar/gfwlist2dnsmasq) 和 [@pexcn/gfwlist-extras](https://github.com/pexcn/gfwlist-extras) 生成
- 加入到 `geosite:gfw` 类别中,供习惯于 PAC 模式并希望使用 [GFWList](https://github.com/gfwlist/gfwlist) 的用户使用
- 同时加入到 `geosite:geolocation-!cn` 类别中
- **加入 Greatfire Analyzer 检测到的屏蔽域名**
- 通过仓库 [@Loyalsoldier/cn-blocked-domain](https://github.com/Loyalsoldier/cn-blocked-domain) 获取 [Greatfire Analyzer](https://zh.greatfire.org/analyzer) 检测到的在中国大陆被屏蔽的域名
@@ -195,6 +190,57 @@ scoop install v2ray-rules-dat
"geosite:greatfire"
]
},
{
"type": "field",
"outboundTag": "Proxy",
"ip": [
"149.154.167.99/32",
"149.154.175.10/32",
"149.154.167.40/32",
"149.154.167.42/32",
"149.154.175.117/32",
"149.154.175.50/32",
"149.154.167.50/32",
"149.154.167.51/32",
"149.154.175.100/32",
"149.154.167.91/32",
"149.154.167.90/32",
"149.154.165.120/32",
"149.154.166.120/32",
"149.154.164.250/32",
"149.154.167.117/32",
"149.154.167.118/32",
"149.154.167.192/27",
"149.154.164.8/29",
"91.108.8.0/27",
"91.108.12.0/27",
"91.108.16.0/27",
"91.108.56.0/24",
"91.108.4.0/24",
"149.154.160.0/22",
"149.154.164.0/22",
"149.154.168.0/22",
"149.154.172.0/22",
"91.108.56.0/22",
"91.108.4.0/22",
"91.108.8.0/22",
"91.108.16.0/22",
"91.108.12.0/22",
"149.154.160.0/20",
"2001:b28:f23d:f001::e/128",
"2001:67c:4e8:f002::e/128",
"2001:b28:f23d:f003::e/128",
"2001:b28:f23d:f001::a/128",
"2001:67c:4e8:f002::a/128",
"2001:b28:f23d:f003::a/128",
"2001:67c:4e8:f004::a/128",
"2001:b28:f23f:f005::a/128",
"2001:67c:4e8:fa60::/64",
"2001:b28:f23d::/48",
"2001:b28:f23f::/48",
"2001:67c:4e8::/48"
]
},
{
"type": "field",
"outboundTag": "Proxy",
@@ -448,9 +494,6 @@ scoop install v2ray-rules-dat
## 致谢
> This product includes GeoLite2 data created by MaxMind, available from [Maxmind](https://www.maxmind.com).
- [MaxMind GeoLite2 Free IP Database](https://dev.maxmind.com/geoip/geoip2/geolite2/)
- [@v2fly/geoip](https://github.com/v2fly/geoip)
- [@Loyalsoldier/geoip](https://github.com/Loyalsoldier/geoip)
- [@v2fly/domain-list-community](https://github.com/v2fly/domain-list-community)
@@ -462,7 +505,6 @@ scoop install v2ray-rules-dat
- [@Loyalsoldier/cn-blocked-domain](https://github.com/Loyalsoldier/cn-blocked-domain)
- [@GeQ1an/Rules](https://github.com/GeQ1an/Rules/tree/master/QuantumultX)
- [@lhie1/Rules](https://github.com/lhie1/Rules/tree/master)
- [@pexcn/daily/chnroute.txt](https://github.com/pexcn/daily/blob/gh-pages/chnroute/chnroute.txt)
- [@AdblockPlus/EasylistChina+Easylist.txt](https://easylist-downloads.adblockplus.org/easylistchina+easylist.txt)
- [@AdGuard/DNS-filter](https://kb.adguard.com/en/general/adguard-ad-filters#dns-filter)
- [@PeterLowe/adservers](https://pgl.yoyo.org/adservers)