Update install-release.sh
"Github API is responding with a 403" HTTP Headers, such as User-Agent, can be set in the options object. In the example below, we call the github API to find out the number of stars and forks for the request repository. This requires a custom User-Agent header as well as https. https://github.com/request/request#custom-http-headerspull/304/head
parent
b3cbf91a19
commit
4d1d1758a0
|
@ -243,7 +243,7 @@ get_version() {
|
|||
fi
|
||||
# Get V2Ray release version number
|
||||
TMP_FILE="$(mktemp)"
|
||||
if ! curl -x "${PROXY}" -sS -i -H "Accept: application/vnd.github.v3+json" -o "$TMP_FILE" 'https://api.github.com/repos/v2fly/v2ray-core/releases/latest'; then
|
||||
if ! curl -x "${PROXY}" -sS -i -H "Accept: application/vnd.github.v3+json" -H "User-Agent: request" -o "$TMP_FILE" 'https://api.github.com/repos/v2fly/v2ray-core/releases/latest'; then
|
||||
"rm" "$TMP_FILE"
|
||||
echo 'error: Failed to get release list, please check your network.'
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue