Update CFwarp.sh

main
fscarmen 2 years ago committed by GitHub
parent 6403d48e7c
commit cfe00bddb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 33
      CFwarp.sh

@ -457,11 +457,6 @@ echo
yellow "6秒后继续安装方案一的WARP,退出安装请按Ctrl+c" && sleep 6s
fi
}
uncf(){
if [[ -z $(type -P warp-go) && -z $(type -P wg-quick) && -z $(type -P warp-cli) ]]; then
rm -rf /usr/bin/cf
fi
}
lncf(){
curl -sSL -o /usr/bin/cf -L https://gitlab.com/rwkgyg/CFwarp/-/raw/main/CFwarp.sh
chmod +x /usr/bin/cf
@ -497,7 +492,7 @@ readp "1.仅卸载方案一 WARP\n2.仅卸载方案二 Socks5-WARP\n3.彻底清
case "$cd" in
1 ) cwg && green "warp卸载完成";;
2 ) cso && green "socks5-warp卸载完成";;
3 ) cwg && cso && unreswarp && green "warp与socks5-warp都已卸载完成"
3 ) cwg && cso && unreswarp && green "warp与socks5-warp都已彻底卸载完成" && rm -rf /usr/bin/cf warp_update
esac
}
WARPtools(){
@ -731,7 +726,7 @@ elif [[ $cpu = arm64 ]]; then
curl -sSL -o warpplus.sh --insecure https://gitlab.com/rwkgyg/CFwarp/-/raw/main/point/warpplusa.sh >/dev/null 2>&1
fi
chmod +x warpplus.sh
./warpplus.sh
./warpplus.sh & sleep 20 && kill $! 2>/dev/null
}
ONEWARPGO(){
yellow "\n 请稍等,当前为warp-go核心安装模式,检测出站及解锁情况……"
@ -1304,7 +1299,7 @@ case "$Input" in
1 ) warpinscha;;
2 ) [[ $cpu = amd64* ]] && SOCKS5ins || exit;;
3 ) WGproxy;;
4 ) WARPun && uncf ;;
4 ) WARPun;;
5 ) WARPonoff;;
6 ) WARPtools;;
7 ) WARPup;;
@ -1576,9 +1571,9 @@ yum install epel-release -y;yum install iproute iptables wireguard-tools -y
elif [[ $release = Debian ]]; then
apt install lsb-release -y
echo "deb http://deb.debian.org/debian $(lsb_release -sc)-backports main" | tee /etc/apt/sources.list.d/backports.list
apt update -y;apt install iproute2 openresolv dnsutils iptables iputils-ping -y;apt install wireguard-tools --no-install-recommends -y
apt update -y;apt install iproute2 openresolv dnsutils iptables iputils-ping -y;apt install wireguard-tools --no-install-recommends -y
elif [[ $release = Ubuntu ]]; then
apt update -y;apt install iproute2 openresolv dnsutils iptables iputils-ping -y;apt install wireguard-tools --no-install-recommends -y
apt update -y;apt install iproute2 openresolv dnsutils iptables iputils-ping -y;apt install wireguard-tools --no-install-recommends -y
fi
wget -N https://gitlab.com/rwkgyg/cfwarp/raw/main/wgcf_2.2.18_$cpu -O /usr/local/bin/wgcf && chmod +x /usr/local/bin/wgcf
if [[ $main -lt 5 || $minor -lt 6 ]] || [[ $vi =~ lxc|openvz ]]; then
@ -1592,6 +1587,7 @@ echo | wgcf register --accept-tos
done
wgcf generate
mtuwarp
blue "检测能否自动生成并使用warp+账户,请稍等10秒"
wppluskey >/dev/null 2>&1
sed -i "s/MTU.*/MTU = $MTU/g" wgcf-profile.conf
cp -f wgcf-profile.conf /etc/wireguard/wgcf.conf >/dev/null 2>&1
@ -1612,6 +1608,8 @@ cd /etc/wireguard && wgcf update $SBID > /etc/wireguard/wgcf+p.log 2>&1
wgcf generate && cd
sed -i "2s#.*#$(sed -ne 2p /etc/wireguard/wgcf-profile.conf)#;4s#.*#$(sed -ne 4p /etc/wireguard/wgcf-profile.conf)#" /etc/wireguard/wgcf.conf
sed -i "2s#.*#$(sed -ne 2p /etc/wireguard/wgcf-profile.conf)#;4s#.*#$(sed -ne 4p /etc/wireguard/wgcf-profile.conf)#" /etc/wireguard/buckup-profile.conf
else
yellow "warp+无法自动生成,直接生成warp普通账户"
fi
systemctl enable wg-quick@wgcf
cat /etc/wireguard/wgcf.conf && sleep 2
@ -1805,7 +1803,7 @@ case "$Input" in
1 ) warpinscha;;
2 ) [[ $cpu = amd64 ]] && SOCKS5ins || exit;;
3 ) WGproxy;;
4 ) WARPun && uncf;;
4 ) WARPun;;
5 ) WARPonoff;;
6 ) WARPtools;;
7 ) WARPup;;
@ -1820,11 +1818,12 @@ start_menu
fi
}
checkyl(){
yellow "首次安装脚本依赖……请稍等……"
( [ ! -f /tmp/pkgupdate ] && $yumapt update && touch /tmp/pkgupdate ) 2> /dev/null
$yumapt install curl wget bc qrencode python3 screen cron | grep -v "already installed"
yellow "首次安装检测安装环境并优选对端IP……请稍等30秒……"
if [ ! -f warp_update ]; then
yellow "首次安装必要依赖……请稍等……"
$yumapt update && $yumapt install curl wget bc qrencode python3 screen cron && touch warp_update 2> /dev/null
yellow "首次安装检测VPS环境并优选对端IP……请稍等30秒……"
tun && warpip
fi
}
startCFwarp(){
checkyl
@ -1843,7 +1842,7 @@ white "甬哥YouTube频道 :www.youtube.com/@ygkkk"
green "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
yellow " 提示:选项1与2任意选,支持相互切换"
white " ================================================================="
green " 1. 选择 wgcf 内核安装WARP"
green " 1. 选择 wgcf 内核安装WARP(默认直接生成2000多万GB的warp+账户)"
green " 2. 选择 warp-go 内核安装WARP"
green " 0. 退出脚本"
white " ================================================================="
@ -1861,7 +1860,7 @@ ONEWARPGO
elif [[ -n $(type -P warp-go) && -n $(type -P warp-cli) && -z $(type -P wg-quick) ]] && [[ -f '/usr/bin/cf' ]]; then
ONEWARPGO
elif [[ -z $(type -P warp-go) && -z $(type -P wg-quick) && -n $(type -P warp-cli) ]] && [[ -f '/usr/bin/cf' ]]; then
ONEWARPGO
ONEWGCFWARP
elif [[ -n $(type -P wg-quick) && -z $(type -P warp-go) ]] && [[ -f '/usr/bin/cf' ]]; then
ONEWGCFWARP
elif [[ -n $(type -P wg-quick) && -n $(type -P warp-cli) && -z $(type -P warp-go) ]] && [[ -f '/usr/bin/cf' ]]; then

Loading…
Cancel
Save