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
20225624b7
commit
b9ff5013bb
@ -41,15 +41,6 @@ install_dependencies() {
|
||||
echo -e "${GREEN}依赖项检查和安装完成。${NC}"
|
||||
}
|
||||
|
||||
# 获取IP地址
|
||||
get_ip_address() {
|
||||
ipv4_address=$(curl -s --max-time 5 ipv4.ip.sb)
|
||||
[ -z "$ipv4_address" ] && ipv4_address=$(ip -4 addr show | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -v '127.0.0.1' | head -n1)
|
||||
|
||||
ipv6_address=$(curl -s --max-time 5 ipv6.ip.sb)
|
||||
[ -z "$ipv6_address" ] && ipv6_address=$(ip -6 addr show | grep -oP '(?<=inet6\s)[\da-f:]+' | grep -v '^::1' | grep -v '^fe80' | head -n1)
|
||||
}
|
||||
|
||||
# 检测VPS地理位置
|
||||
detect_region() {
|
||||
local country
|
||||
@ -211,7 +202,6 @@ generate_markdown() {
|
||||
echo "- IPv6: $ipv6_address"
|
||||
echo ""
|
||||
echo "[tabs]"
|
||||
|
||||
echo "[tab=\"YABS\"]"
|
||||
echo "\`\`\`"
|
||||
cat yabs_result.txt | escape_markdown
|
||||
|
Loading…
Reference in New Issue
Block a user