Refine Telegram CIDR

This commit is contained in:
loyalsoldier 2021-01-01 09:47:29 +08:00
parent f51fd812ac
commit 51b2656d46
No known key found for this signature in database
GPG Key ID: 23829BBC1ACF2C90
2 changed files with 28 additions and 2 deletions

View File

@ -30,6 +30,9 @@ jobs:
echo "telegram_cidr=https://core.telegram.org/resources/cidr.txt" >> $GITHUB_ENV
shell: bash
- name: Checkout the default branch
uses: actions/checkout@v2.3.4
- name: Generate icloud.txt file
run: |
curl -sSL ${custom_icloud} | grep -E "^full:" | awk -F ':' '{printf "%s\n", $2}' > icloud.txt
@ -85,8 +88,10 @@ jobs:
- name: Generate telegramcidr.txt file
run: |
curl -sSL ${telegram_cidr} | perl -ne '/^(\d{1,3}(\.\d{1,3}){3}\/\d{1,2})/ && print "IP-CIDR,$1\n"' > telegramcidr.txt
curl -sSL ${telegram_cidr} | perl -ne '/^(\d{1,3}(\.\d{1,3}){3}\/\d{1,2})/ && print "IP-CIDR,$1\n"' > ruleset/telegramcidr.txt
cp parts/telegram_ips.txt telegramcidr.txt
cp parts/telegram_ips.txt ruleset/telegramcidr.txt
curl -sSL ${telegram_cidr} | perl -ne '/^(\d{1,3}(\.\d{1,3}){3}\/\d{1,2})/ && print "IP-CIDR,$1\n"' >> telegramcidr.txt
curl -sSL ${telegram_cidr} | perl -ne '/^(\d{1,3}(\.\d{1,3}){3}\/\d{1,2})/ && print "IP-CIDR,$1\n"' >> ruleset/telegramcidr.txt
curl -sSL ${telegram_cidr} | grep ":" | perl -ne '/(.+\/\d+)/ && print "IP-CIDR6,$1\n"' >> telegramcidr.txt
curl -sSL ${telegram_cidr} | grep ":" | perl -ne '/(.+\/\d+)/ && print "IP-CIDR6,$1\n"' >> ruleset/telegramcidr.txt

21
parts/telegram_ips.txt Normal file
View File

@ -0,0 +1,21 @@
IP-CIDR,109.239.140.0/24
IP-CIDR,149.154.160.0/22
IP-CIDR,149.154.164.0/22
IP-CIDR,149.154.168.0/22
IP-CIDR,149.154.172.0/22
IP-CIDR,67.198.55.0/24
IP-CIDR,91.108.12.0/22
IP-CIDR,91.108.16.0/22
IP-CIDR,91.108.20.0/22
IP-CIDR,91.108.20.0/23
IP-CIDR,91.108.4.0/22
IP-CIDR,91.108.56.0/22
IP-CIDR,91.108.56.0/23
IP-CIDR,91.108.8.0/22
IP-CIDR,95.161.64.0/20
IP-CIDR,95.161.84.0/23
IP-CIDR6,2001:67c:4e8::/48
IP-CIDR6,2001:b28:f23c::/48
IP-CIDR6,2001:b28:f23d::/48
IP-CIDR6,2001:b28:f23f::/48
IP-CIDR6,2001:b28:f242::/48