Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5928784ba9 | |||
|
|
0a5229f4f6 | ||
|
|
5ecb6ef997 |
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
REPO="https://api.github.com/repos/itdoginfo/podkop/releases/latest"
|
REPO="https://git.encrypt-t.ru/yanistye/podkop/releases/latest"
|
||||||
DOWNLOAD_DIR="/tmp/podkop"
|
DOWNLOAD_DIR="/tmp/podkop"
|
||||||
COUNT=3
|
COUNT=3
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v curl &> /dev/null; then
|
if command -v curl &> /dev/null; then
|
||||||
check_response=$(curl -s "https://api.github.com/repos/itdoginfo/podkop/releases/latest")
|
check_response=$(curl -s "https://git.encrypt-t.ru/yanistye/podkop/releases/latest")
|
||||||
|
|
||||||
if echo "$check_response" | grep -q 'API rate limit '; then
|
if echo "$check_response" | grep -q 'API rate limit '; then
|
||||||
msg "You've reached rate limit from GitHub. Repeat in five minutes."
|
msg "You've reached rate limit from GitHub. Repeat in five minutes."
|
||||||
|
|||||||
@@ -184,6 +184,13 @@ url_get_file_extension() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Remove url fragment (everything after the first '#')
|
||||||
|
url_strip_fragment() {
|
||||||
|
local url="$1"
|
||||||
|
|
||||||
|
echo "${url%%#*}"
|
||||||
|
}
|
||||||
|
|
||||||
# Decodes and returns a base64-encoded string
|
# Decodes and returns a base64-encoded string
|
||||||
base64_decode() {
|
base64_decode() {
|
||||||
local str="$1"
|
local str="$1"
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ sing_box_cf_add_proxy_outbound() {
|
|||||||
local udp_over_tcp="$4"
|
local udp_over_tcp="$4"
|
||||||
|
|
||||||
url=$(url_decode "$url")
|
url=$(url_decode "$url")
|
||||||
|
url=$(url_strip_fragment "$url")
|
||||||
|
|
||||||
local scheme="${url%%://*}"
|
local scheme="${url%%://*}"
|
||||||
case "$scheme" in
|
case "$scheme" in
|
||||||
|
|||||||
Reference in New Issue
Block a user