mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-01 13:17:21 +02:00
feature: network connectivity test
This commit is contained in:
parent
7d91e02dc9
commit
f304ff8862
@ -1,5 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "|| Testing connectivity... ||"
|
||||
if ! curl -sSf https://www.github.com > /dev/null; then
|
||||
echo "|| GitHub could not be reached. Please check your internet connection and try again. ||"
|
||||
exit
|
||||
fi
|
||||
if [ "$(curl -s "https://api.github.com/repos/tobychui/zoraxy/git/refs/tags" | jq 'any(.[] | tostring; test("API rate limit exceeded"))')" = "true" ]; then
|
||||
echo "|| Currently rate limited by GitHub. Please wait until it clears. ||"
|
||||
exit
|
||||
@ -34,7 +39,7 @@ fi
|
||||
if [ ! -f "/zoraxy/server/zoraxy_bin_${VERSION}" ]; then
|
||||
echo "|| Cloning repository... ||"
|
||||
cd /zoraxy/source/
|
||||
git clone --depth=1 --branch main https://github.com/tobychui/zoraxy
|
||||
git clone --depth 1 --single-branch --branch main https://github.com/tobychui/zoraxy
|
||||
cd /zoraxy/source/zoraxy/src/
|
||||
echo "|| Building... ||"
|
||||
go mod tidy
|
||||
|
Loading…
x
Reference in New Issue
Block a user