Skip to content

KangProxy

KangProxy #4076

Workflow file for this run

# Copyright (C) 2024 officialputuid
name: KangProxy
on:
push:
branches: [ KangProxy ]
workflow_dispatch:
schedule:
- cron: '0 */4 * * *'
jobs:
KangProxy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./
steps:
- uses: actions/checkout@v2
- run: |
rm -rf xResults/old-data
mkdir xResults/old-data
cat http/http.txt https/https.txt socks4/socks4.txt socks5/socks5.txt > xResults/old-data/Proxies.txt
cat xResults/RAW.txt > xResults/old-data/RAW.txt
rm -rf ./http && rm -rf ./https && rm -rf ./socks4 && rm -rf ./socks5
- name: KangProxy http
run: |
mkdir http
curl -sSf "${{ secrets.HTTP_LIST }}" > http/http-1.txt
curl -sSf "${{ secrets.HTTP_LIST2 }}" > http/http-2.txt
curl -sSf "${{ secrets.HTTP_LIST3 }}" > http/http-3.txt
cat http/http-1.txt http/http-2.txt http/http-3.txt > http/http.txt
rm -rf http/http-*
- name: KangProxy https
run: |
mkdir https
curl -sSf "${{ secrets.HTTPS_LIST }}" > https/https-1.txt
curl -sSf "${{ secrets.HTTPS_LIST2 }}" > https/https-2.txt
curl -sSf "${{ secrets.HTTPS_LIST3 }}" > https/https-3.txt
cat https/https-1.txt https/https-2.txt https/https-3.txt > https/https.txt
rm -rf https/https-*
- name: KangProxy socks4
run: |
mkdir socks4
curl -sSf "${{ secrets.SOCKS4_LIST }}" > socks4/socks4-1.txt
curl -sSf "${{ secrets.SOCKS4_LIST2 }}" > socks4/socks4-2.txt
curl -sSf "${{ secrets.SOCKS4_LIST3 }}" > socks4/socks4-3.txt
cat socks4/socks4-1.txt socks4/socks4-2.txt socks4/socks4-3.txt > socks4/socks4.txt
rm -rf socks4/socks4-*
- name: KangProxy socks5
run: |
mkdir socks5
curl -sSf "${{ secrets.SOCKS5_LIST }}" > socks5/socks5-1.txt
curl -sSf "${{ secrets.SOCKS5_LIST2 }}" > socks5/socks5-2.txt
curl -sSf "${{ secrets.SOCKS5_LIST3 }}" > socks5/socks5-3.txt
cat socks5/socks5-1.txt socks5/socks5-2.txt socks5/socks5-3.txt > socks5/socks5.txt
rm -rf socks5/socks5-*
- name: Merge all proxy list
run: cat http/http.txt https/https.txt socks4/socks4.txt socks5/socks5.txt > xResults/Proxies.txt
- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: GPG user IDs
run: |
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}"
echo "keyid: ${{ steps.import-gpg.outputs.keyid }}"
echo "name: ${{ steps.import-gpg.outputs.name }}"
echo "email: ${{ steps.import-gpg.outputs.email }}"
- name: Commit +sign commit and push changes
run: |-
git config --global user.email "${{ steps.import-gpg.outputs.email }}"
git config --global user.name "${{ steps.import-gpg.outputs.name }}"
git add .
curl -Lo .git/hooks/commit-msg "${{ secrets.COMMIT_MSG }}"
chmod u+x .git/hooks/commit-msg
timestamp=$(TZ='Asia/Makassar' date '+%d/%m/%y %H:%M %Z')
git commit -m "KangProxy: Update Proxies ${timestamp} ⬆️" || exit 0
git push
- name: KangProxy trigger NeProxy
env:
GITHUB_TOKEN: ${{ secrets.PRIV_TOKEN }}
run: |
gh workflow run NeProxy.yml --ref NeProxy
gh workflow run KangProxyChecker.yml