Update 661.sh

This commit is contained in:
甬哥侃侃侃ygkkk 2023-03-14 03:08:35 +00:00
parent d1b56b31f6
commit 54718a00a6
1 changed files with 4 additions and 9 deletions

13
661.sh
View File

@ -136,6 +136,10 @@ cd /root/warpip
./$cpu >/dev/null 2>&1 ./$cpu >/dev/null 2>&1
cd cd
endpoint=`sed -n '2p' /root/warpip/result.csv | awk -F ',' '{print $1}'` endpoint=`sed -n '2p' /root/warpip/result.csv | awk -F ',' '{print $1}'`
pogo=`grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+' /usr/local/bin/warp.conf >/dev/null 2>&1`
powgcf=`grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+' /etc/wireguard/wgcf.conf >/dev/null 2>&1`
sed -i "s/$pogo/$endpoint/g" /usr/local/bin/warp.conf >/dev/null 2>&1
sed -i "s/$powgcf/$endpoint/g" /etc/wireguard/wgcf.conf >/dev/null 2>&1
} }
checkwgcf checkwgcf
if [[ ! $wgcfv4 =~ on|plus && ! $wgcfv6 =~ on|plus ]]; then if [[ ! $wgcfv4 =~ on|plus && ! $wgcfv6 =~ on|plus ]]; then
@ -151,7 +155,6 @@ systemctl start warp-go >/dev/null 2>&1
fi fi
} }
mtuwarp(){ mtuwarp(){
v4v6 v4v6
yellow "开始自动设置warp的MTU最佳网络吞吐量值以优化WARP网络" yellow "开始自动设置warp的MTU最佳网络吞吐量值以优化WARP网络"
@ -691,10 +694,6 @@ WantedBy=multi-user.target
EOF EOF
ABC ABC
point point
echo $endpoint
po1=`grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+' /usr/local/bin/warp.conf`
echo $po1
sed -i "s/$po1/$endpoint/g" /usr/local/bin/warp.conf >/dev/null 2>&1
systemctl daemon-reload systemctl daemon-reload
systemctl enable warp-go systemctl enable warp-go
systemctl start warp-go systemctl start warp-go
@ -1400,10 +1399,6 @@ ABC
mv -f wgcf-profile.conf /etc/wireguard >/dev/null 2>&1 mv -f wgcf-profile.conf /etc/wireguard >/dev/null 2>&1
mv -f wgcf-account.toml /etc/wireguard >/dev/null 2>&1 mv -f wgcf-account.toml /etc/wireguard >/dev/null 2>&1
point point
echo $endpoint
po1=`grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+' /etc/wireguard/wgcf.conf`
echo $po1
sed -i "s/$po1/$endpoint/g" /etc/wireguard/wgcf.conf >/dev/null 2>&1
systemctl enable wg-quick@wgcf >/dev/null 2>&1 systemctl enable wg-quick@wgcf >/dev/null 2>&1
CheckWARP && ShowWGCF && WGCFmenu && lncf CheckWARP && ShowWGCF && WGCFmenu && lncf
} }