Update 测速中文
This commit is contained in:
25
测速中文
25
测速中文
@@ -1,12 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "🌐 开始测速..."
|
echo "🚀 一键网络测速"
|
||||||
{
|
|
||||||
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 - --simple
|
# 下载并运行官方 Speedtest
|
||||||
} 2>/dev/null | while IFS= read -r line; do
|
result=$(wget -q -O- https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-x86_64.tgz | tar xz && ./speedtest --simple)
|
||||||
case $line in
|
|
||||||
*Ping:*) echo "🔄 延迟: ${line#*:}" ;;
|
# 显示中文结果
|
||||||
*Download:*) echo "⬇️ 下载: ${line#*:}" ;;
|
echo "$result" | awk '
|
||||||
*Upload:*) echo "⬆️ 上传: ${line#*:}" ;;
|
/Ping:/ {printf "🔄 网络延迟: %s %s\n", $2, $3}
|
||||||
esac
|
/Download:/ {printf "⬇️ 下载速度: %s %s\n", $2, $3}
|
||||||
done
|
/Upload:/ {printf "⬆️ 上传速度: %s %s\n", $2, $3}
|
||||||
echo "✅ 完成"
|
'
|
||||||
|
|
||||||
|
# 清理文件
|
||||||
|
rm -f speedtest
|
||||||
|
|||||||
Reference in New Issue
Block a user