diff --git a/index.html b/index.html index a949b12..58469be 100644 --- a/index.html +++ b/index.html @@ -2,6 +2,10 @@ #https://github.com/acmesh-official/get.acme.sh +if ! curl -I --connect-timeout 1 -m 3 -s https://t.co > /dev/null ;then +GHPROXY=https://ghproxy.com/ +fi + _exists() { cmd="$1" if [ -z "$cmd" ] ; then @@ -29,10 +33,13 @@ _email="--$(echo "$_email" | tr '=' ' ')" fi +PROJECT=${ACME_GIT-"acmesh-official/acme.sh"} +URL=${GHPROXY}https://raw.githubusercontent.com/$PROJECT/$BRANCH/acme.sh + if _exists curl && [ "${ACME_USE_WGET:-0}" = "0" ]; then - curl https://raw.githubusercontent.com/acmesh-official/acme.sh/$BRANCH/acme.sh | sh -s -- --install-online $_email "$@" + curl $URL | sh -s -- --install-online $_email "$@" elif _exists wget ; then - wget -O - https://raw.githubusercontent.com/acmesh-official/acme.sh/$BRANCH/acme.sh | sh -s -- --install-online $_email "$@" + wget -O - $URL | sh -s -- --install-online $_email "$@" else echo "Sorry, you must have curl or wget installed first." echo "Please install either of them and try again."