diff --git a/release/install-release.sh b/release/install-release.sh index e5c50e85..f84f5cf7 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -255,7 +255,7 @@ getVersion(){ RETVAL=$? CUR_VER="$(normalizeVersion "$(echo "$VER" | head -n 1 | cut -d " " -f2)")" TAG_URL="https://api.github.com/repos/v2ray/v2ray-core/releases/latest" - NEW_VER="$(normalizeVersion "$(curl ${PROXY} -s "${TAG_URL}" --connect-timeout 10| grep 'tag_name' | cut -d\" -f4)")" + NEW_VER="$(normalizeVersion "$(curl ${PROXY} -H "Accept: application/json" -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" -s "${TAG_URL}" --connect-timeout 10| grep 'tag_name' | cut -d\" -f4)")" if [[ $? -ne 0 ]] || [[ $NEW_VER == "" ]]; then colorEcho ${RED} "Failed to fetch release information. Please check your network or try again."