mirror of
https://github.com/Loyalsoldier/surge-rules.git
synced 2026-07-08 17:25:36 +08:00
Refine Telegram CIDR
This commit is contained in:
9
.github/workflows/run.yml
vendored
9
.github/workflows/run.yml
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user