mirror of
https://github.com/everett7623/nodeloc_vps_test.git
synced 2024-11-20 15:05:22 +00:00
Update Nlbench_beta.sh
This commit is contained in:
parent
d291d70259
commit
5f3af04441
@ -51,19 +51,16 @@ install_dependencies() {
|
||||
clear
|
||||
}
|
||||
|
||||
# 获取IP地址和ISP信息
|
||||
ip_address_and_isp() {
|
||||
ipv4_address=$(curl -s --max-time 5 ipv4.ip.sb)
|
||||
ipv6_address=$(curl -s --max-time 5 ipv6.ip.sb)
|
||||
ipv4_address=$(curl -s --max-time 5 -4 ip.sb)
|
||||
ipv6_address=$(curl -s --max-time 5 -6 ip.sb)
|
||||
|
||||
# 获取ISP信息
|
||||
isp_info=$(curl -s ipinfo.io/org)
|
||||
isp=$(echo "$isp_info" | grep -oP '(?<="org":")[^"]*')
|
||||
asn=$(echo "$isp_info" | grep -oP '(?<="asn":")[^"]*')
|
||||
|
||||
# 检查是否为WARP或Cloudflare
|
||||
is_warp=false
|
||||
if echo "$isp $asn" | grep -iq "cloudflare\|warp\|1.1.1.1"; then
|
||||
if echo "$isp_info" | grep -iq "cloudflare\|warp\|1.1.1.1"; then
|
||||
is_warp=true
|
||||
fi
|
||||
|
||||
@ -75,6 +72,7 @@ ip_address_and_isp() {
|
||||
|
||||
echo "IPv4: $ipv4_address"
|
||||
echo "IPv6: $ipv6_address"
|
||||
echo "ISP: $isp_info"
|
||||
echo "Is WARP: $is_warp"
|
||||
echo "Use IPv6: $use_ipv6"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user