mirror of https://gitlab.com/rwkgyg/CFwarp.git
Update CFwarp1.sh
This commit is contained in:
parent
bcc423c8bc
commit
f64119325c
|
@ -115,8 +115,6 @@ v4v6
|
|||
isp4=`curl -s --user-agent "${UA_Browser}" https://api.ip.sb/geoip/$v4 -k | awk -F "isp" '{print $2}' | awk -F "offset" '{print $1}' | sed "s/[,\":]//g"`
|
||||
isp6=`curl -s --user-agent "${UA_Browser}" https://api.ip.sb/geoip/$v6 -k | awk -F "isp" '{print $2}' | awk -F "offset" '{print $1}' | sed "s/[,\":]//g"`
|
||||
|
||||
|
||||
|
||||
warppflow=$((`grep -oP '"quota":\K\d+' <<< $(curl -s "https://api.cloudflareclient.com/v0a884/reg/$(grep 'device_id' /etc/wireguard/wgcf-account.toml 2>/dev/null | cut -d \' -f2)" -H "User-Agent: okhttp/3.12.1" -H "Authorization: Bearer $(grep 'access_token' /etc/wireguard/wgcf-account.toml 2>/dev/null | cut -d \' -f2)")`))
|
||||
flow=`echo "scale=2; $warppflow/1000000000" | bc`
|
||||
[[ -e /etc/wireguard/wgcf+p.log ]] && cfplus="WARP+普通账户(有限WARP+流量:$flow GB),设备名称:$(grep -s 'Device name' /etc/wireguard/wgcf+p.log | awk '{ print $NF }')" || cfplus="WARP+Teams账户(无限WARP+流量)"
|
||||
|
@ -137,6 +135,8 @@ else
|
|||
WARPIPv4Status=$(white "IPV4状态:\c" ; red "不存在IPV4地址 ")
|
||||
fi
|
||||
if [[ -n $v6 ]]; then
|
||||
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
|
||||
wgcfv6=$(curl -s6 https://www.cloudflare.com/cdn-cgi/trace -k | grep warp | cut -d= -f2)
|
||||
nonf=$(curl -s --user-agent "${UA_Browser}" http://ip-api.com/json/$v6?lang=zh-CN -k | cut -f2 -d"," | cut -f4 -d '"')
|
||||
sunf=$(./nf | awk '{print $1}' | sed -n '8p')
|
||||
|
|
Loading…
Reference in New Issue