Skip to content

Get Providers List #798

Get Providers List

Get Providers List #798

Workflow file for this run

name: Get Providers List
on:
push:
paths:
- 'providers/'
- '.github/workflows/providers.yml'
workflow_dispatch:
schedule:
- cron: '0 */36 * * *'
jobs:
combine:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Combine URL Contents
run: |
urls=(
"https://raw.githubusercontent.com/Leon406/SubCrawler/main/sub/share/vless"
"https://raw.githubusercontent.com/mfuu/v2ray/master/merge/merge_base64.txt"
"https://raw.githubusercontent.com/mfuu/v2ray/master/v2ray"
"https://raw.githubusercontent.com/peasoft/NoMoreWalls/master/list.txt"
"https://raw.githubusercontent.com/Flik6/getNode/main/v2ray.txt"
"https://raw.githubusercontent.com/mlabalabala/v2ray-node/main/nodefree_nodes_mod.txt"
"https://raw.githubusercontent.com/mahdibland/V2RayAggregator/master/sub/splitted/vmess.txt"
"https://raw.githubusercontent.com/ALIILAPRO/v2rayNG-Config/main/sub.txt"
"https://raw.githubusercontent.com/soroushmirzaei/telegram-configs-collector/main/splitted/mixed"
"https://raw.githubusercontent.com/aiboboxx/v2rayfree/main/v2"
"https://raw.githubusercontent.com/Syavar/V2ray-Configs/main/OK_google.com_base64.txt"
"https://raw.githubusercontent.com/ndsphonemy/proxy-sub/main/default.txt"
"https://raw.githubusercontent.com/ndsphonemy/proxy-sub/main/speed.txt"
)
> providers/providers
> providers/providers64
for url in "${urls[@]}"
do
echo "Processing $url"
content=$(curl -s --fail $url)
if [[ $? -ne 0 ]]; then
echo "Failed to fetch content from $url"
exit 1
fi
if [[ $content =~ ^[A-Za-z0-9+/=]+$ ]]; then
echo "$content" | base64 --decode >> providers/providers
if [[ $? -ne 0 ]]; then
echo "Failed to decode base64 content from $url"
exit 1
fi
else
echo "$content" >> providers/providers
fi
done
- name: Check for provider changes
id: git-diff
run: |
git diff --quiet && echo "::set-output name=changed::false" || echo "::set-output name=changed::true"
- name: Commit and push providers if changed
if: steps.git-diff.outputs.changed == 'true'
run: |
git config --local user.name 'GitHub Actions'
git config --local user.email 'github-actions@github.com'
git add .
git add providers/providers
git pull
git commit -m "Update providers"
git push
- name: Convert Providers to Base64
run: |
content=$(cat providers/providers | base64 | tr -d '\n')
echo "$content" > providers/providers64
- name: Check for base64 changes
id: changes64
run: |
git diff --quiet && echo "::set-output name=changed::false" || echo "::set-output name=changed::true"
- name: Commit and push if changed
if: steps.changes64.outputs.changed == 'true'
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'github-actions@github.com'
git add -A
git commit -m "Encode to base64"
git push
- name: Get IR Providers
run: |
links=(
"https://raw.githubusercontent.com/Surfboardv2ray/Proxy-sorter/main/submerge/IR.txt"
"https://raw.githubusercontent.com/soroushmirzaei/telegram-configs-collector/main/countries/ir/mixed"
"https://raw.githubusercontent.com/yebekhe/TelegramV2rayCollector/main/country/IR/base64"
"https://raw.githubusercontent.com/Surfboardv2ray/v2ray-worker-sub/master/providers/configshubIR"
"https://raw.githubusercontent.com/itsyebekhe/HiN-VPN/main/subscription/location/base64/%F0%9F%87%AE%F0%9F%87%B7%20IR"
"https://raw.githubusercontent.com/MhdiTaheri/V2rayCollector_Py/main/sub/Iran/config.txt"
)
> providers/ir
> providers/ir64
for link in "${links[@]}"
do
echo "Processing $link"
content=$(curl -s --fail $link)
if [[ $? -ne 0 ]]; then
echo "Failed to fetch content from $link, skipping."
continue
fi
if [[ $content =~ ^[A-Za-z0-9+/=]+$ ]]; then
echo "$content" | base64 --decode >> providers/ir
if [[ $? -ne 0 ]]; then
echo "Failed to decode base64 content from $link, skipping."
continue
fi
else
echo "$content" >> providers/ir
fi
done
shell: /usr/bin/bash {0}
- name: Check for changes
id: changes
run: |
git diff --quiet && echo "::set-output name=changed::false" || echo "::set-output name=changed::true"
- name: Commit and push if changed
if: steps.changes.outputs.changed == 'true'
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'github-actions@github.com'
git add -A
git commit -m "Update IR"
git push
- name: Encode IR content to Base64
run: |
content=$(cat providers/ir | base64 | tr -d '\n')
echo "$content" > providers/ir64
- name: Check for changes IR64
id: changesir
run: |
git diff --quiet && echo "::set-output name=changed::false" || echo "::set-output name=changed::true"
- name: Commit and push if changed
if: steps.changesir.outputs.changed == 'true'
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'github-actions@github.com'
git add -A
git commit -m "Update IR"
git push