mirror of https://gitlab.com/rwkgyg/CFwarp.git
Update 661.sh
This commit is contained in:
parent
d2da018442
commit
b501c1bccc
10
661.sh
10
661.sh
|
@ -130,13 +130,23 @@ checkpt(){
|
||||||
if [[ ! -f '/root/warpip/result.csv' ]]; then
|
if [[ ! -f '/root/warpip/result.csv' ]]; then
|
||||||
cpujg
|
cpujg
|
||||||
mkdir -p /root/warpip
|
mkdir -p /root/warpip
|
||||||
|
v4v6
|
||||||
|
if [[ -z $v4 ]]; then
|
||||||
|
wget -qN https://gitlab.com/rwkgyg/CFwarp/raw/main/point/ip6.txt
|
||||||
|
mv ip6.txt ip.txt
|
||||||
|
else
|
||||||
wget -qN https://gitlab.com/rwkgyg/CFwarp/raw/main/point/ip.txt
|
wget -qN https://gitlab.com/rwkgyg/CFwarp/raw/main/point/ip.txt
|
||||||
|
fi
|
||||||
wget -qN https://gitlab.com/rwkgyg/CFwarp/raw/main/point/$cpu && chmod +x $cpu
|
wget -qN https://gitlab.com/rwkgyg/CFwarp/raw/main/point/$cpu && chmod +x $cpu
|
||||||
mv $cpu ip.txt warpip/
|
mv $cpu ip.txt warpip/
|
||||||
cd /root/warpip
|
cd /root/warpip
|
||||||
./$cpu >/dev/null 2>&1
|
./$cpu >/dev/null 2>&1
|
||||||
cd
|
cd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
grep -qoE '\[[:xdigit:]+(:[[:xdigit:]]+)?\]:[0-9]+' /usr/local/bin/warp.conf && echo y || echo n
|
||||||
|
grep -qoE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+' /usr/local/bin/warp.conf && echo y || echo n
|
||||||
|
|
||||||
endpoint=`sed -n '2p' /root/warpip/result.csv | awk -F ',' '{print $1}'`
|
endpoint=`sed -n '2p' /root/warpip/result.csv | awk -F ',' '{print $1}'`
|
||||||
sed -i "s/162.159.193.10:1701/$endpoint/g" /usr/local/bin/warp.conf 2>/dev/nul
|
sed -i "s/162.159.193.10:1701/$endpoint/g" /usr/local/bin/warp.conf 2>/dev/nul
|
||||||
sed -i "s/162.159.193.10:2408/$endpoint/g" /etc/wireguard/wgcf.conf 2>/dev/nul
|
sed -i "s/162.159.193.10:2408/$endpoint/g" /etc/wireguard/wgcf.conf 2>/dev/nul
|
||||||
|
|
Loading…
Reference in New Issue