From 2cf0c90b0161cc7a53fa1c827f28247620b1878c Mon Sep 17 00:00:00 2001 From: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com> Date: Thu, 24 Sep 2020 20:54:41 +0800 Subject: [PATCH 1/2] create function `curl`, instead of alias `curl` Try to fix #132. > `-q`: Disable .curlrc > `-L`: Follow redirects > `--false-start`: Enable TLS False Start > `--http2`: Use HTTP 2 > `--tlsv1.2`: Use TLSv1.2 or greater --- install-release.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install-release.sh b/install-release.sh index d8e3419..4236056 100644 --- a/install-release.sh +++ b/install-release.sh @@ -27,7 +27,9 @@ red=$(tput setaf 1) green=$(tput setaf 2) reset=$(tput sgr0) -alias curl='"curl" --retry 5 --retry-delay 10 --retry-max-time 60 --false-start --http2 --tlsv1.2 -L' +curl() { + $(type -P curl) -L -q --retry 5 --retry-delay 10 --retry-max-time 60 --false-start --http2 --tlsv1.2 "$@" +} check_if_running_as_root() { # If you want to run as another user, please modify $UID to be owned by this user From ae9e64ff83049414f3853d1b56b24a5d313d949c Mon Sep 17 00:00:00 2001 From: IceCodeNew <32576256+IceCodeNew@users.noreply.github.com> Date: Thu, 24 Sep 2020 21:46:12 +0800 Subject: [PATCH 2/2] remove all the fancy but unnecessary args, as compatibility values most. https://github.com/v2fly/fhs-install-v2ray/issues/132#issuecomment-698350955 --- install-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-release.sh b/install-release.sh index 4236056..4c6f680 100644 --- a/install-release.sh +++ b/install-release.sh @@ -28,7 +28,7 @@ green=$(tput setaf 2) reset=$(tput sgr0) curl() { - $(type -P curl) -L -q --retry 5 --retry-delay 10 --retry-max-time 60 --false-start --http2 --tlsv1.2 "$@" + $(type -P curl) -L -q --retry 5 --retry-delay 10 --retry-max-time 60 "$@" } check_if_running_as_root() {