mirror of
https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root.git
synced 2025-12-08 09:07:39 +00:00
added Cloudflare Warp
Recently, APKMirror added a DDoS protection system that sometimes prevents the repository from downloading apk files. Therefore, I use Cloudflare warp to fix this.
This commit is contained in:
13
src/etc/cf_warp.sh
Normal file
13
src/etc/cf_warp.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup Cloudflare warp for bypass cloudflare anti ddos APKMirror:
|
||||
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
|
||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
|
||||
sudo apt-get update && sudo apt-get install cloudflare-warp
|
||||
sudo warp-svc >&/dev/null &
|
||||
sleep 2
|
||||
warp-cli --accept-tos register
|
||||
warp-cli --accept-tos set-mode warp+doh
|
||||
warp-cli --accept-tos connect
|
||||
echo -e "\e[32mSuccessful install Cloudflare Warp\e[0m"
|
||||
sleep 3
|
||||
28
src/etc/ci.sh
Normal file
28
src/etc/ci.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check new patch:
|
||||
get_date() {
|
||||
local assets asset name updated_at
|
||||
assets=$(curl -s https://api.github.com/repos/"$1"/releases/"$3" | jq '.assets')
|
||||
for asset in $(echo "$assets" | jq -r '.[] | @base64'); do
|
||||
asset=$(echo "$asset" | base64 --decode)
|
||||
name=$(echo "$asset" | jq -r '.name')
|
||||
updated_at=$(echo "$asset" | jq -r '.updated_at')
|
||||
[[ $name =~ "$2" ]] && echo "$updated_at"
|
||||
done
|
||||
}
|
||||
checker(){
|
||||
local date1 date2 date1_sec date1_sec repo=$1 ur_repo=$repository check=$2
|
||||
date1=$(get_date "$repo" "patches.json" "latest")
|
||||
date2=$(get_date "$ur_repo" "$check" "tags/all")
|
||||
date1_sec=$(date -d "$date1" +%s)
|
||||
date2_sec=$(date -d "$date2" +%s)
|
||||
if [ -z "$date2" ] || [ "$date1_sec" -gt "$date2_sec" ]; then
|
||||
echo "new_patch=1" >> $GITHUB_OUTPUT
|
||||
echo -e "\e[32mNew patch, building...\e[0m"
|
||||
elif [ "$date1_sec" -lt "$date2_sec" ]; then
|
||||
echo "new_patch=0" >> $GITHUB_OUTPUT
|
||||
echo -e "\e[32mOld patch, not build.\e[0m"
|
||||
fi
|
||||
}
|
||||
checker $1 $2
|
||||
Reference in New Issue
Block a user