Skip to content

NeProxy

NeProxy #4049

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: NeProxy
on:
push:
branches: [ NeProxy ]
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
jobs:
cron:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./
steps:
- uses: actions/checkout@v2
- run: |
rm -rf old-data
mkdir old-data
cat RAW.txt > old-data/RAW.txt
cat RAW-Validated.txt > old-data/RAW-Validated.txt
rm -rf RAW*
- name: NeProxy - RAW_PROXY
run: |
curl -sSf "${{ secrets.RAW_1 }}" > RAW_1.txt
curl -sSf "${{ secrets.RAW_2 }}" > RAW_2.txt
curl -sSf "${{ secrets.RAW_3 }}" > RAW_3.txt
curl -sSf "${{ secrets.RAW_4 }}" > RAW_4.txt
curl -sSf "${{ secrets.RAW_5 }}" > RAW_5.txt
cat RAW_1.txt RAW_2.txt RAW_3.txt RAW_4.txt RAW_5.txt > RAW.txt
rm -rf RAW_*
awk -F: '{NF=NF-1}1' OFS=":" "RAW.txt" > "clean_RAW.txt"
mv clean_RAW.txt RAW.txt
- name: NeProxy - Checker
run: |
wget "${{ secrets.PROXY_CHECKER_NEPROXY }}"
unzip ProxyCheker.zip
cat RAW.txt > ProxyCheker/proxies.txt
cd ProxyCheker
python3 -m pip install --upgrade pip wheel
pip3 install "setuptools<59"
pip3 install -r requirements.txt
python3 proxy_check.py
- name: NeProxy - Cleaning
run: |
cat ProxyCheker/GoodProxy.txt > RAW-Validated.txt
grep -v '^$' RAW-Validated.txt > fix_RAW.txt && mv fix_RAW* RAW-Validated.txt
. clean.sh && mv NewRawValidated* RAW-Validated.txt
rm -rf ProxyCheker*
- 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 -A
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:%S %Z')
git commit -m "NeProxy: Updates ${timestamp}" || exit 0
git push