From 55388bba2fb609b6435cbb92ec436609323ade97 Mon Sep 17 00:00:00 2001 From: KANIKIG Date: Thu, 17 Dec 2020 12:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gost.sh | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/gost.sh b/gost.sh index a8a1b46..9e663d5 100755 --- a/gost.sh +++ b/gost.sh @@ -92,14 +92,29 @@ function Install_ct() { check_file check_sys check_new_ver - rm -rf gost-linux-"$bit"-"$ct_new_ver".gz - wget --no-check-certificate https://github.com/ginuerzh/gost/releases/download/v"$ct_new_ver"/gost-linux-"$bit"-"$ct_new_ver".gz - gunzip gost-linux-"$bit"-"$ct_new_ver".gz - mv gost-linux-"$bit"-"$ct_new_ver" gost - mv gost /usr/bin/gost - chmod -R 777 /usr/bin/gost - wget --no-check-certificate https://raw.githubusercontent.com/KANIKIG/Multi-EasyGost/master/gost.service && chmod -R 777 gost.service && mv gost.service /usr/lib/systemd/system - mkdir /etc/gost && wget --no-check-certificate https://raw.githubusercontent.com/KANIKIG/Multi-EasyGost/master/config.json && mv config.json /etc/gost && chmod -R 777 /etc/gost + echo -e "若为国内机器建议使用大陆镜像加速下载" + read -e -p "是否使用?[y/n]:" addyn + [[ -z ${addyn} ]] && addyn="n" + if [[ ${addyn} == [Yy] ]]; then + rm -rf gost-linux-"$bit"-"$ct_new_ver".gz + wget --no-check-certificate https://gotunnel.oss-cn-shenzhen.aliyuncs.com/gost-linux-amd64-2.11.1.gz + gunzip gost-linux-"$bit"-"$ct_new_ver".gz + mv gost-linux-"$bit"-"$ct_new_ver" gost + mv gost /usr/bin/gost + chmod -R 777 /usr/bin/gost + wget --no-check-certificate https://gotunnel.oss-cn-shenzhen.aliyuncs.com/gost.service && chmod -R 777 gost.service && mv gost.service /usr/lib/systemd/system + mkdir /etc/gost && wget --no-check-certificate https://gotunnel.oss-cn-shenzhen.aliyuncs.com/config.json && mv config.json /etc/gost && chmod -R 777 /etc/gost + else + rm -rf gost-linux-"$bit"-"$ct_new_ver".gz + wget --no-check-certificate https://github.com/ginuerzh/gost/releases/download/v"$ct_new_ver"/gost-linux-"$bit"-"$ct_new_ver".gz + gunzip gost-linux-"$bit"-"$ct_new_ver".gz + mv gost-linux-"$bit"-"$ct_new_ver" gost + mv gost /usr/bin/gost + chmod -R 777 /usr/bin/gost + wget --no-check-certificate https://raw.githubusercontent.com/KANIKIG/Multi-EasyGost/master/gost.service && chmod -R 777 gost.service && mv gost.service /usr/lib/systemd/system + mkdir /etc/gost && wget --no-check-certificate https://raw.githubusercontent.com/KANIKIG/Multi-EasyGost/master/config.json && mv config.json /etc/gost && chmod -R 777 /etc/gost + fi + systemctl enable gost && systemctl restart gost echo "------------------------------" if test -a /usr/bin/gost -a /usr/lib/systemctl/gost.service -a /etc/gost/config.json; then