Skip to content

Commit

Permalink
Improve GeoIP db.
Browse files Browse the repository at this point in the history
  • Loading branch information
xkww3n committed Nov 5, 2023
1 parent 429f36a commit f9d5073
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ jobs:
path: 'tool_sing-geosite'
- name: Generate rules
run: python generate.py
- name: Download MaxMind GeoLite2 Country DB
env:
MAXMIND_KEY: ${{ secrets.MAXMIND_KEY }}
run: |
wget -O ./GeoLite2-Country.tar.gz "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${MAXMIND_KEY}&suffix=tar.gz"
tar xzvf ./GeoLite2-Country.tar.gz
cp ./GeoLite2-Country_*/GeoLite2-Country.mmdb ./
- name: Generate Geosite DB
run: |
cd tool_geosite
Expand All @@ -62,11 +69,18 @@ jobs:
"action": "add"
},
{
"type": "text",
"type": "maxmindMMDB",
"action": "add",
"args": {
"name": "telegram",
"uri": "https://core.telegram.org/resources/cidr.txt"
"uri": "./GeoLite2-Country.mmdb"
}
},
{
"type": "cutter",
"action": "remove",
"args": {
"wantedList": ["cn"],
"onlyIPType": "ipv4"
}
},
{
Expand All @@ -87,6 +101,14 @@ jobs:
"onlyIPType": "ipv6"
}
},
{
"type": "text",
"action": "add",
"args": {
"name": "telegram",
"uri": "https://core.telegram.org/resources/cidr.txt"
}
},
{
"type": "clashRuleSetClassical",
"action": "add",
Expand Down

0 comments on commit f9d5073

Please sign in to comment.