VPS搭建Speedtest-x在线测速
项目简介
Speeftest-x 为 LibreSpeed 的延伸项目,LibreSpeed 是一个非常轻巧的网站测速工具。
Speeftest-x 使用文件数据库来保存来自不同用户的测速结果,方便您查看全国不同地域与运营商的测速效果。
项目地址:https://github.com/BadApple9/speedtest-x
本教程以 Debian 系统为例,其他系统参考执行。
搭建教程
curl -sSL https://get.daocloud.io/docker | sh
systemctl start docker
systemctl enable docker
docker pull badapple9/speedtest-x
▲若是ARM架构的机器,执行
docker pull stilleshan/speedtest-x
docker run -d -p 9001:80 -it badapple9/speedtest-x
▲若是ARM架构的机器,执行
docker run -d -p 9001:80 -it badapple9/speedtest-x
-d:以常驻进程模式启动
9001: 默认容器开放端口,可改为其他端口
启动时可指定的环境变量:
-e WEBPORT=80: 容器内使用的端口
-e MAX_LOG_COUNT=100: 最大可保存多少条测速记录
-e IP_SERVICE=ip.sb: 使用的 IP 运营商解析服务(ip.sb 或 ipinfo.io)
-e SAME_IP_MULTI_LOGS=false: 是否允许同一IP记录多条测速结果
如果想让 Docker 容器支持 ipv6,可编辑 /etc/docker/daemon.json
,加上以下内容:(如果不存在这个文件则直接创建)
{
"ipv6": true,
"fixed-cidr-v6": "fd00::/80",
"experimental": true,
"ip6tables": true
}
{IP}:{端口}/index.html
接下来在浏览器中访问 xxx.xxx.xxx.xxx:端口/index.html 就可以测速了,尽情享用吧!
版权声明:
作者:GeekTech
链接:https://www.geektech.top/speedtest-x.html
来源:GeekTech | 极客科技 | 技术分享
文章版权归作者所有,未经允许请勿转载。

kele812