Skip to content

Commit

Permalink
Update and rename bt4.sh to bt5.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kkkyg authored Oct 20, 2021
1 parent 2c0b25a commit a893655
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions bt4.sh → bt5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,45 +270,7 @@ fi
green "设置完成"

[[ -e /etc/gai.conf ]] && [[ $(grep '^[ ]*precedence[ ]*::ffff:0:0/96[ ]*100' /etc/gai.conf) ]] || echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf

v44=`wget -T1 -t1 -qO- -4 ip.gs`
if [[ -n ${v44} ]]; then
gj4=`curl -s4 https://ip.gs/country-iso`
g4=$(eval echo \$$gj4)
WARPIPv4Status=$(curl -s4 https://www.cloudflare.com/cdn-cgi/trace | grep warp | cut -d= -f2)
case ${WARPIPv4Status} in
plus)
WARPIPv4Status=$(green "WARP+PLUS已开启,当前IPV4地址:$v44 ,IP所在区域:$g4 ")
;;
on)
WARPIPv4Status=$(green "WARP已开启,当前IPV4地址:$v44 ,IP所在区域:$g4 ")
;;
off)
WARPIPv4Status=$(yellow "WARP未开启,当前IPV4地址:$v44 ,IP所在区域:$g4")
esac
else
WARPIPv4Status=$(red "不存在IPV4地址 ")
fi

v66=`wget -T1 -t1 -qO- -6 ip.gs`
if [[ -n ${v66} ]]; then
gj6=`curl -s6 https://ip.gs/country-iso`
g6=$(eval echo \$$gj6)
WARPIPv6Status=$(curl -s6 https://www.cloudflare.com/cdn-cgi/trace | grep warp | cut -d= -f2)
case ${WARPIPv6Status} in
plus)
WARPIPv6Status=$(green "WARP+PLUS已开启,当前IPV6地址:$v66 ,IP所在区域:$g6 ")
;;
on)
WARPIPv6Status=$(green "WARP已开启,当前IPV6地址:$v66 ,IP所在区域:$g6 ")
;;
off)
WARPIPv6Status=$(yellow "WARP未开启,当前IPV6地址:$v66 ,IP所在区域:$g6 ")
esac
else
WARPIPv6Status=$(red "不存在IPV6地址 ")
fi

. ~/.bashrc
green "安装结束,当前WARP及IP状态如下 "
blue "WARP状态+IPv4地址+IP所在区域: ${WARPIPv4Status}"
blue "WARP状态+IPv6地址+IP所在区域: ${WARPIPv6Status}"
Expand Down

0 comments on commit a893655

Please sign in to comment.