Skip to content

Commit

Permalink
create function curl, instead of alias curl
Browse files Browse the repository at this point in the history
Try to fix v2fly#132.
> `-q`: Disable .curlrc
> `-L`: Follow redirects
> `--false-start`: Enable TLS False Start
> `--http2`: Use HTTP 2
> `--tlsv1.2`: Use TLSv1.2 or greater
IceCodeNew committed Sep 24, 2020
1 parent b990f89 commit 2cf0c90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion install-release.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2cf0c90

Please sign in to comment.