Skip to content

Merge Proxy Lists

Merge Proxy Lists #89

Workflow file for this run

name: Merge Proxy Lists
on:
schedule:
- cron: 0 8 * * *
jobs:
merge_lists:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Merge proxy lists
run: |
curl -sSL -o gfw.txt https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/gfw.txt
curl -sSL -o proxy-list.txt https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/proxy-list.txt
curl -sSL -o greatfire.txt https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/greatfire.txt
curl -sSL -o custom_list.txt https://raw.githubusercontent.com/Journalist-HK/Rules/master/custom_list.txt
cat gfw.txt proxy-list.txt greatfire.txt custom_list.txt | sort -u | sed '/^\s*$/d' | sed '/^#/d' > temp.txt
grep '^full:' temp.txt > temp1.txt
grep -vE '^(full:|regexp:)' temp.txt >> temp2.txt
grep '^regexp:' temp.txt > temp3.txt
cat temp1.txt temp2.txt temp3.txt >> temp4.txt
mv temp4.txt proxy_list.txt
rm temp*.txt
rm gfw.txt
rm proxy-list.txt
rm greatfire.txt
rm custom_list.txt
- name: cloudflare lists
run: |
curl -sSL -o cloudflare-ipv4.txt https://www.cloudflare.com/ips-v4
curl -sSL -o cloudflare-ipv6.txt https://www.cloudflare.com/ips-v6
- name: telegram lists
run: |
curl -sSL -o telegram-cidr.txt https://core.telegram.org/resources/cidr.txt
- name: Commit and push changes
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "暂无更新,结束运行"
exit 0
else
echo "status=success" >> $GITHUB_OUTPUT
git add .
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Updated at $(TZ=UTC-8 date +'%Y-%m-%d %H:%M:%S')" -a
git push -f -u origin main
fi