Update 测速中文
This commit is contained in:
17
测速中文
17
测速中文
@@ -1,15 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "🚀 一键网络测速"
|
echo "🚀 一键网络测速"
|
||||||
|
|
||||||
# 下载并运行官方 Speedtest
|
# 直接使用 Python 测速,无需下载安装
|
||||||
result=$(wget -q -O- https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-x86_64.tgz | tar xz && ./speedtest --simple)
|
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 - | awk '
|
||||||
|
/Testing from/ {print "🌐 IP地址: " $5}
|
||||||
# 显示中文结果
|
/Ping:/ {print "🔄 网络延迟: " $2 " " $3}
|
||||||
echo "$result" | awk '
|
/Download:/ {print "⬇️ 下载速度: " $2 " " $3}
|
||||||
/Ping:/ {printf "🔄 网络延迟: %s %s\n", $2, $3}
|
/Upload:/ {print "⬆️ 上传速度: " $2 " " $3}
|
||||||
/Download:/ {printf "⬇️ 下载速度: %s %s\n", $2, $3}
|
|
||||||
/Upload:/ {printf "⬆️ 上传速度: %s %s\n", $2, $3}
|
|
||||||
'
|
'
|
||||||
|
|
||||||
# 清理文件
|
|
||||||
rm -f speedtest
|
|
||||||
|
|||||||
Reference in New Issue
Block a user