Refine Telegram CIDR

This commit is contained in:
loyalsoldier
2021-01-01 09:47:29 +08:00
parent f51fd812ac
commit 51b2656d46
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