Giter Club home page Giter Club logo

netspeedtest's Introduction

luci-app-netspeedtest

访问数:[]

screenshots

luci-app-netspeedtest 网络速度诊断测试(包括:内网网页版测速、内网iperf3吞吐测速、外网speedtest.net网速测试、特定服务器的端口延迟测速)

luci-app-netspeedtest 网络速度诊断测试

认真阅读完毕 本页面,本页面包含注意事项和如何使用。

写在前面

  • 一直在找OPENWRT上测试速度的插件,苦寻不到,于是有了它! 此插件可进行内外和外网网络速度测试。
  • TG群友说插件2年没更新了,花了几天时间结合时下需要,将网络测试功能升级到2.0版本。

功能说明

  • 内网网页版测速插件 :基于speedtest-web网页版,启用后再点start进行测速。网页版启动后程序会驻留内存不测速建议不启用服务。
  • 内网iperf3吞吐测试 ,服务端路由器如果没有安装请先安装此iperf3插件。
  • 外网测速使用speedtest.net测速内核,基于speedtest-cli,需要有python3才能执行。
  • 特定服务器的端口延迟测速,是测试指定服务器的端口的延迟情况。

iperf3吞吐测试注意事项

  • 测速的终端使用机器必须和测速服务器在同一个局域网络中!
  • 客户端使用步骤:启动测速服务器端-->下载测试客户端-->运行测速客户端-->输入服务端IP地址-->查看结果。
  • 客户端运行,国内端下载中有“iperf3测速客户端”,运行它输入服务器IP即可。 国外原版,需要手动进入 CMD命令模式,再输入命令:iperf3.exe -c 服务器IP
  • 网络测速iperf3客户端下载地址:https://sipdboy.lanzoui.com/b01c3esih 密码:cpd6
  • 需要依赖: python3 iperf3 speedtest-web

版本说明

2023.3.2 网速测试V2.1.3:

  • 修复测速Speedtest看不到测试报名问题。
  • 重新调试IPERF3测试页面代码,解决某些主题显示不优雅的问题。
  • 修复取消服务自动启用的问题

2023.1.15 网速测试V2.1:

  • 内网测试速度WEB页采用homebox。
  • 修复WEB页内网测试自动启用问题。
  • 外网测速加入Netperf测试。
  • 外网测速Speedtest某些节点会禁止测速。要测速建议关了留国的插件。

2022.10.18 网速测试V2.0.3:

  • 代码基本重写和优化。
  • Iperf3可实时体现服务状态。
  • 增加内网测试网页版。
  • 外网测速,加入更详细测试报告。

2021.3.2 网速测试V1.6:

  • 升级宽带测试带2.13内核。
  • 解决1.806以上版本不能编译问题。

使用方法

将NetSpeedTest 主题添加至 LEDE/OpenWRT 源码的方法。

下载源码:

# 下载源码

git clone https://github.com/sirpdboy/netspeedtest.git package/netspeedtest
make menuconfig
### 配置菜单

```Brach
   make menuconfig
   # 找到 LuCI -> Applications, 选择 luci-app-netspeedtest, 保存后退出。

编译

   # 编译固件
   make package/netspeedtest/luci-app-netspeedtest/compile V=s

源码说明

screenshots

界面

screenshots

screenshots

screenshots

screenshots

使用与授权相关说明

  • 本人开源的所有源码,任何引用需注明本处出处,如需修改二次发布必告之本人,未经许可不得做于任何商用用途。

My other project

捐助

screenshots

图飞了😂 图飞了😂
xm1 xm1
图飞了😂

感谢

感谢sivel、superspeed、user1121114685、ZeaKyX、佐须之男、lean等。因为有你们珠玉在前!

netspeedtest's People

Contributors

bluestar800 avatar kiddin9 avatar milespoupart avatar shinegod avatar sirpdboy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netspeedtest's Issues

用git下载的,编译出错

git clone https://github.com/sirpdboy/netspeedtest.git package/netspeedtest
make menuconfig
make package/netspeedtest/luci-app-netspeedtest/compile V=s

echo "kmod-drm-i915" >> /home/ssvs/lede/staging_dir/target-x86_64_musl/pkginfo/linux.default.install
WARNING: kmod-amazon-ena is not available in the kernel config - generating empty package
echo "kmod-amazon-ena" >> /home/ssvs/lede/staging_dir/target-x86_64_musl/pkginfo/linux.default.install
WARNING: kmod-amd-xgbe is not available in the kernel config - generating empty package
echo "kmod-amd-xgbe" >> /home/ssvs/lede/staging_dir/target-x86_64_musl/pkginfo/linux.default.install
make[2]: Leaving directory '/home/ssvs/lede/package/kernel/linux'
time: package/kernel/linux/compile#3.74#0.51#4.32
make[2]: Entering directory '/home/ssvs/lede/package/kernel/cryptodev-linux'
make[2]: *** No rule to make target '/home/ssvs/lede/build_dir/target-x86_64_musl/linux-x86_64/linux-5.15.98/.config', needed by '/home/ssvs/lede/build_dir/target-x86_64_musl/linux-x86_64/cryptodev-linux-cryptodev-linux-1.12/.built'. Stop.
make[2]: Leaving directory '/home/ssvs/lede/package/kernel/cryptodev-linux'
time: package/kernel/cryptodev-linux/compile#0.20#0.09#0.30
ERROR: package/kernel/cryptodev-linux failed to build.
package/Makefile:114: recipe for target 'package/kernel/cryptodev-linux/compile' failed
make[1]: *** [package/kernel/cryptodev-linux/compile] Error 1
make[1]: Leaving directory '/home/ssvs/lede'
/home/ssvs/lede/include/toplevel.mk:229: recipe for target 'package/netspeedtest/luci-app-netspeedtest/compile' failed
make: *** [package/netspeedtest/luci-app-netspeedtest/compile] Error 2

软路由重启后无法自动拉起

确认netspeedtest在启动项中开启,但是软路由重启后未能重新自动开启,需手动拉起。

软路由版本:
ImmortalWrt 21.02-SNAPSHOT r19403-80080fa5b5 / LuCI openwrt-21.02 branch git-22.163.47328-e24e8f3

系统日志:
Tue Jun 21 23:31:30 2022 daemon.notice procd: /etc/rc.d/S95netspeedtest:
Tue Jun 21 23:31:32 2022 daemon.notice netifd: Interface 'wan_6' is now up
Tue Jun 21 23:31:32 2022 user.notice firewall: Reloading firewall due to ifup of wan_6 (pppoe-wan)
Tue Jun 21 23:31:32 2022 daemon.notice procd: /etc/rc.d/S95netspeedtest: ————————————————————————————Retrieving speedtest.net configuration...
Tue Jun 21 23:31:37 2022 daemon.notice procd: /etc/rc.d/S95netspeedtest: Cannot retrieve speedtest configuration
Tue Jun 21 23:31:37 2022 daemon.notice procd: /etc/rc.d/S95netspeedtest: ERROR: <urlopen error [Errno -3] Try again>
Tue Jun 21 23:31:37 2022 daemon.notice procd: /etc/rc.d/S95netspeedtest:
Tue Jun 21 23:31:37 2022 daemon.notice procd: /etc/rc.d/S95netspeedtest: 测服信息:
Tue Jun 21 23:31:37 2022 daemon.notice procd: /etc/rc.d/S95netspeedtest: 下行速率: ---- 上行速率:
Tue Jun 21 23:31:37 2022 daemon.notice procd: /etc/rc.d/S95netspeedtest: 测试时间: 2022-06-21 23:31:37

编译安装iperf3和iperf3-ssl模块有冲突

* check_conflicts_for: The following packages conflict with iperf3-ssl:
 * check_conflicts_for: 	iperf3 * 
 * opkg_install_cmd: Cannot install package luci-app-netspeedtest.
 * check_conflicts_for: The following packages conflict with iperf3-ssl:
 * check_conflicts_for: 	iperf3 * 
 * opkg_install_cmd: Cannot install package iperf3-ssl.
make[1]: *** [package/Makefile:70: package/install] Error 255

云编译报错

Finding targets

Building targets

/workdir/openwrt/staging_dir/host/bin/upx --lzma --best /workdir/openwrt/build_dir/target-x86_64_musl/speedtest-web-1.1.5/.go_work/build/bin/speedtest
bash: line 1: /workdir/openwrt/staging_dir/host/bin/upx: No such file or directory
make[3]: *** [Makefile:79: /workdir/openwrt/build_dir/target-x86_64_musl/speedtest-web-1.1.5/.built] Error 127
make[3]: Leaving directory '/workdir/openwrt/feeds/netspeedtest/speedtest-web'
time: package/feeds/netspeedtest/speedtest-web/compile#1.07#0.42#1.20
ERROR: package/feeds/netspeedtest/speedtest-web failed to build.
make[2]: Leaving directory '/workdir/openwrt'
make[2]: *** [package/Makefile:116: package/feeds/netspeedtest/speedtest-web/compile] Error 1
make[1]: *** [package/Makefile:110: /workdir/openwrt/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/workdir/openwrt'
make: *** [/workdir/openwrt/include/toplevel.mk:231: world] Error 2
Error: Process completed with exit code 2.

v2.0.3反馈一个小问题,从luci界面关闭内网测速web版,会自动重新拉起。

[V2.0.3]配合arm64的speedtest-web,当从 luci界面关闭启用后,会自动重新拉起,再关闭再被拉起,重复5次。猜测是触发了procd的检测机制。init.d中start_service()脚本,注释speedtestweb_prepare一行即可解决,它的作用是kill进程(也可以保留speedtestweb_prepare,注释procd_set_param respawn,但这样貌似不太正规);另外stop_service中speedtestweb_prepare也是多余,导致当从命令行运行/etc/init.d/netspeedtest stop时,会被procd_set_param respawn自动拉起,procd会自己关闭运行的服务,无需设置额外的kill进程指令,反而会认为是意外终止而触发重启。

start_service() {
speedtestweb_prepare
config_load netspeedtest
config_foreach get_config speedtestweb
[ x$enabled == x1 ] || return 1
logger -t netspeedtest -p warn "Netspeedtest speedtest-web is start."
echo "Netspeedtest speedtest-web is start."
procd_open_instance
procd_set_param command $PROG --listen_port "${port}"
[ "x$logger" == x1 ] && procd_set_param stderr 1
procd_set_param respawn
procd_close_instance
}
stop_service() {
speedtestweb_prepare
echo "Netspeedtest speedtest-web is stop."
}

2个疑问点

1、客户端软件,能否设置默认的服务端地址?避免每次都要手动输入。
2、测速包大小是10M,能否手动设定?

error

root@iStoreOS:/tmp/upload# opkg install *.ipk --force-depends
Unknown package 'luci-app-netspeedtest'.
Installing luci-i18n-netspeedtest-zh-cn (2.1.3-20230302) to root...
Installing luci-app-netspeedtest (2.1.3-20230302) to root...
Collected errors:

  • pkg_hash_check_unresolved: cannot find dependency homebox for luci-app-netspeedtest
  • pkg_hash_fetch_best_installation_candidate: Packages for luci-app-netspeedtest found, but incompatible with the architectures configured
  • opkg_install_cmd: Cannot install package luci-app-netspeedtest.
  • satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-i18n-netspeedtest-zh-cn:
  •  homebox
    
  • check_data_file_clashes: Package luci-app-netspeedtest wants to install file /usr/bin/speedtest
    But that file is already provided by package * python3-speedtest-cli
  • opkg_install_cmd: Cannot install package luci-i18n-netspeedtest-zh-cn.

Netperf无法正常测速

netperf测速
测服信息:netperf.bufferbloat.net 协议:(ipv4) 线程:4
下行速率: Mbps ---- 上行速率: Mbps
测试时间: 2023-01-16 14:13:23

init.d内的服务文件权限错误

/etc/init.d/netspeedtest的权限默认是0644,调用提示'-ash: /etc/init.d/netspeedtest: Permission denied',导致netspeedtest相关程序都开不起来,比如speedtest-web,改为0755正常启动

内网测速不能显示

image

内网测速无法打开,显示缺少配置。
之前不基于homebox的是ok的。
即使另外安装了homebox并启用,还是不能够显示。

开机报错

n1编译了之后开机报错
/usr/lib/lua/luci/dispatcher.lua:527: Invalid controller file found
The file '/usr/lib/lua/luci/controller/NetSpeedTest.lua' contains an invalid module line.
Please verify whether the module name is set to 'luci.controller.NetSpeedTest' - It must correspond to the file path!
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:527: in function 'createindex'
/usr/lib/lua/luci/dispatcher.lua:553: in function 'createtree'
/usr/lib/lua/luci/dispatcher.lua:238: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:121: in function </usr/lib/lua/luci/dispatcher.lua:120>

测试速度似乎不太准

R4s, 也是大佬您的固件(220301),有运行Openclash(Tun+啥混合忘了)
测试只有个位数的速度,我的线路是电信千兆,自行登录speedtest.net测有700左右
image

怎么开启ssl?

在nginx https下页面不显示,怎么开启ssl?https下访问?

编译报错

新版本有问题吗?单独编译插件也报错,固件编译scripts/feeds install netspeedtest这步就报错了

readme中安装 luci-app-NetSpeedTest 貌似应为 luci-app-netspeedtest

更新feeds,并安装主题:

scripts/feeds update NetSpeedTest
scripts/feeds install luci-app-NetSpeedTest

执行 scripts/feeds install luci-app-NetSpeedTest 会提示
WARNING: No feed for package 'luci-app-NetSpeedTest' found

但是 改成全小写 scripts/feeds install luci-app-netspeedtest 就OK了 😂

arm编译成功,安装失败

  • pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.92-1-97356f4e229ff1d47d93048566c94202) for kmod-crypto-hash
  • pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.92-1-97356f4e229ff1d47d93048566c94202) for kmod-crypto-null
  • pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.92-1-97356f4e229ff1d47d93048566c94202) for kmod-crypto-aead
  • pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.92-1-97356f4e229ff1d47d93048566c94202) for kmod-crypto-manager
  • pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.92-1-97356f4e229ff1d47d93048566c94202) for kmod-crypto-authenc

外网测速被代理

默认情况下 。speedtest.net会被机场代理、
加入了规则。内网其他客户端都可以正常识别国内的server ID。
但是这个还是只有外网的,也就是指定不走代理无效。

speedtest-web 编译失败

make[3] -C feeds/netspeedtest/speedtest-web compile
ERROR: package/feeds/netspeedtest/speedtest-web failed to build.
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on

具体编译失败细节不清楚sorry,用的官方源22.02

编译报错

make[3]: Entering directory '/home/lu/data/source/lede_new/feeds/netspeedtest/homebox'
mkdir -p /home/lu/data/source/lede_new/dl
SHELL= flock /home/lu/data/source/lede_new/tmp/.homebox-0.0.0-dev.2020062901.tar.gz.flock -c ' /home/lu/data/source/lede_new/scripts/download.pl "/home/lu/data/source/lede_new/dl" "homebox-0.0.0-dev.2020062901.tar.gz" "skip" "v0.0.0-dev.2020062901.tar.gz" "https://github.com/XGHeaven/homebox/archive/refs/tags/" '
rm -f /home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901/.built
touch /home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901/.built_check
rm -rf /home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901/build/static
mkdir -p /home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901/build
cp -fpR /home/lu/data/source/lede_new/build_dir/hostpkg/homebox/build/static /home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901/build/
( cd /home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901; GOOS="linux" GOARCH="amd64" GO386="" GOAMD64="v1" GOARM="" GOMIPS="" GOMIPS64="" GOPPC64="" CGO_ENABLED=1 CC="x86_64-openwrt-linux-musl-gcc" CXX="x86_64-openwrt-linux-musl-g++" CGO_CFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901=homebox-0.0.0-dev.2020062901 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_CPPFLAGS="-I/home/lu/data/source/lede_new/staging_dir/toolchain-x86_64_gcc-11.3.0_musl/usr/include -I/home/lu/data/source/lede_new/staging_dir/toolchain-x86_64_gcc-11.3.0_musl/include/fortify -I/home/lu/data/source/lede_new/staging_dir/toolchain-x86_64_gcc-11.3.0_musl/include" CGO_CXXFLAGS="-Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -fmacro-prefix-map=/home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901=homebox-0.0.0-dev.2020062901 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro" CGO_LDFLAGS="-L/home/lu/data/source/lede_new/staging_dir/toolchain-x86_64_gcc-11.3.0_musl/usr/lib -L/home/lu/data/source/lede_new/staging_dir/toolchain-x86_64_gcc-11.3.0_musl/lib -znow -zrelro" GOPATH="/home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901/.go_work/build" GOCACHE="/home/lu/data/source/lede_new/tmp/go-build" GOMODCACHE="/home/lu/data/source/lede_new/dl/go-mod-cache" GOENV=off GO111MODULE=auto PATH=/home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901/.go_work/build/bin:$PATH make build-server; )
make[4]: Entering directory '/home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901'
go-bindata -fs -o server/assets.go -prefix build/static build/static
flag provided but not defined: -fs
-debug
Do not embed the assets, but provide the embedding API. Contents will still be loaded from disk.
-dev
Similar to debug, but does not emit absolute paths. Expects a rootDir variable to already exist in the generated code's package.
Usage: go-bindata [options]

-ignore value
Regex pattern to ignore
-mode uint
Optional file mode override for all files.
-modtime int
Optional modification unix timestamp override for all files.
-nocompress
Assets will not be GZIP compressed when this flag is specified.
-nomemcopy
Use a .rodata hack to get rid of unnecessary memcopies. Refer to the documentation to see what implications this carries.
-nometadata
Assets will not preserve size, mode, and modtime info.
-o string
Optional name of the output file to be generated. (default "./bindata.go")
-pkg string
Package name to use in the generated code. (default "main")
-prefix string
Optional path prefix to strip off asset names.
-tags string
Optional set of build tags to include.
-version
Displays version information.
make[4]: *** [Makefile:24: build-assets] Error 2
make[4]: Leaving directory '/home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901'
make[3]: *** [Makefile:91: /home/lu/data/source/lede_new/build_dir/target-x86_64_musl/homebox-0.0.0-dev.2020062901/.built] Error 2
make[3]: Leaving directory '/home/lu/data/source/lede_new/feeds/netspeedtest/homebox'
time: package/feeds/netspeedtest/homebox/compile#0.17#0.06#0.21
ERROR: package/feeds/netspeedtest/homebox failed to build.
make[2]: *** [package/Makefile:116: package/feeds/netspeedtest/homebox/compile] Error 1
make[2]: Leaving directory '/home/lu/data/source/lede_new'
make[1]: *** [package/Makefile:110: /home/lu/data/source/lede_new/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/lu/data/source/lede_new'
make: *** [/home/lu/data/source/lede_new/include/toplevel.mk:231:world] 错误 2

Netperf宽带测速和Speedtest宽带测速问题

5.15.98版本
PKG_VERSION:=2.1.3
PKG_RELEASE:=20230302
PKG_MAINTAINER:=https://github.com/sirpdboy/netspeedtest

speedtest测速
测服信息: 延时:
下行速率: ---- 上行速率:
测试时间: 2023-03-17 20:00:42
————————————————————————————

netperf测速
测服信息:netperf.bufferbloat.net 协议:(ipv4) 线程:4
下行速率: Mbps ---- 上行速率: Mbps
测试时间: 2023-03-17 20:00:48
————————————————————————————

测速无结果。

https error

on local http working fine but external access by https is error

issue

尚无任何配置

如图,内网测速网页版和内网iperf3吞吐测速下面均只显示,尚无任何配置,并没有其他图文了。

i1

i2

请问这个怎么办?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.