From ccc66630b44b39f27ae50d7df9697c263c029c07 Mon Sep 17 00:00:00 2001 From: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Thu, 19 Nov 2020 02:30:59 +0800 Subject: [PATCH] Avoid license issue due to https://github.com/Loyalsoldier/geoip/commit/4beadd53d768dbe035611cb0cc62f18f3391cf52 To achieve this goal, use geoip.dat from repo Loyalsoldier/geoip directly without modification (remix, transform and build). --- .github/workflows/run.yml | 25 +++++-------------------- README.md | 6 +----- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 7a6047a..f83fee5 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -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 diff --git a/README.md b/README.md index d89d22f..3a4bf2c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ### 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 @@ -448,9 +448,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 +459,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)