Skip to content

Commit

Permalink
fix gost version
Browse files Browse the repository at this point in the history
  • Loading branch information
kanikig authored and kanikig committed Aug 30, 2022
1 parent ab3a83d commit 8c64485
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
Green_font_prefix="\033[32m" && Red_font_prefix="\033[31m" && Green_background_prefix="\033[42;37m" && Font_color_suffix="\033[0m"
Info="${Green_font_prefix}[信息]${Font_color_suffix}"
Error="${Red_font_prefix}[错误]${Font_color_suffix}"
shell_version="1.1.0"
shell_version="1.1.1"
ct_new_ver="2.11.2" # 2.x 不再跟随官方更新
gost_conf_path="/etc/gost/config.json"
raw_conf_path="/etc/gost/rawconf"
function checknew() {
checknew=$(gost -V 2>&1 | awk '{print $2}')
check_new_ver
# check_new_ver
echo "你的gost版本为:""$checknew"""
echo -n 是否更新\(y/n\)\:
read checknewnum
Expand Down Expand Up @@ -61,6 +62,7 @@ function check_root() {
[[ $EUID != 0 ]] && echo -e "${Error} 当前非ROOT账号(或没有ROOT权限),无法继续操作,请更换ROOT账号或使用 ${Green_background_prefix}sudo su${Font_color_suffix} 命令获取临时ROOT权限(执行后可能会提示输入当前账号的密码)。" && exit 1
}
function check_new_ver() {
# deprecated
ct_new_ver=$(wget --no-check-certificate -qO- -t2 -T3 https://api.github.com/repos/ginuerzh/gost/releases/latest | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g;s/v//g')
if [[ -z ${ct_new_ver} ]]; then
ct_new_ver="2.11.2"
Expand Down Expand Up @@ -89,7 +91,7 @@ function Install_ct() {
Installation_dependency
check_file
check_sys
check_new_ver
# check_new_ver
echo -e "若为国内机器建议使用大陆镜像加速下载"
read -e -p "是否使用?[y/n]:" addyn
[[ -z ${addyn} ]] && addyn="n"
Expand Down

0 comments on commit 8c64485

Please sign in to comment.