diff --git a/CFwarp.sh b/CFwarp.sh index 5d17331..3b5d549 100644 --- a/CFwarp.sh +++ b/CFwarp.sh @@ -342,7 +342,7 @@ fi uncf(){ if [[ -z $(type -P warp-go) && -z $(type -P wg-quick) && -z $(type -P warp-cli) ]]; then -rm -rf /root/CFwarp.sh nf /usr/bin/cf +rm -rf /root/CFwarp.sh /usr/bin/cf fi } @@ -366,6 +366,13 @@ fi $yumapt autoremove } +lncf(){ +if [[ -n $(type -P warp-go) || -n $(type -P warp-cli) || -n $(type -P wg-quick) ]]; then +chmod +x /root/CFwarp.sh +ln -sf /root/CFwarp.sh /usr/bin/cf +fi +} + ShowSOCKS5(){ if [[ $(systemctl is-active warp-svc) = active ]]; then mport=`warp-cli --accept-tos settings 2>/dev/null | grep 'WarpProxy on port' | awk -F "port " '{print $2}'` @@ -459,8 +466,7 @@ warp-cli --accept-tos register >/dev/null 2>&1 && sleep 2 warp-cli --accept-tos set-mode proxy >/dev/null 2>&1 warp-cli --accept-tos set-custom-endpoint "$endpoint" >/dev/null 2>&1 warp-cli --accept-tos enable-always-on >/dev/null 2>&1 -sleep 2 && ShowSOCKS5 -S5menu +sleep 2 && ShowSOCKS5 && S5menu && lncf } WGCFmenu(){ @@ -505,13 +511,6 @@ red "请先卸载已安装的WGCF-WARP,否则无法安装当前的WARP-GO, fi } -lncf(){ -if [[ -n $(type -P warp-go) || -n $(type -P warp-cli) ]]; then -chmod +x /root/CFwarp.sh -ln -sf /root/CFwarp.sh /usr/bin/cf -fi -} - ShowWGCF(){ UA_Browser="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36" v4v6 @@ -1238,13 +1237,6 @@ systemctl restart wg-quick@wgcf ; bash CFwarp.sh fi } -lncf(){ -if [[ $(type -P wg-quick) || $(type -P warp-cli) ]]; then -chmod +x /root/CFwarp.sh -ln -sf /root/CFwarp.sh /usr/bin/cf -fi -} - fawgcf(){ rm -f /etc/wireguard/wgcf+p.log ID=$(cat /etc/wireguard/buckup-account.toml | grep license_key | awk '{print $3}')