mirror of
https://github.com/sirpdboy/sirpdboy-package.git
synced 2025-01-07 03:17:03 +08:00
update readme
This commit is contained in:
parent
8a42e60292
commit
f4a7fe9592
@ -1,22 +1,86 @@
|
||||
luci-app-autopoweroff for OpenWRT/Lede(中文)
|
||||
源码地址 https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
定时重启关机二合一升级版。
|
||||
[![若部分图片无法正常显示,请挂上机场浏览或点这里到末尾看修复教程](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)](#解决-github-网页上图片显示失败的问题) [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
|
||||
|
||||
Install to OpenWRT/LEDE
|
||||
[autopoweroff自动定时重启关机插件](https://github.com/sirpdboy/luci-app-autopoweroff)
|
||||
======================
|
||||
请 **认真阅读完毕** 本页面,本页面包含注意事项和如何使用。
|
||||
|
||||
git clone https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
cp -r luci-app-autopoweroff LEDE_DIR/package/luci-app-autopoweroff
|
||||
## 功能说明:
|
||||
|
||||
cd LEDE_DIR
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
定时设置重启和定时设置关机二合一升级版,解决原本需要保存二次才能生效的问题。
|
||||
|
||||
make menuconfig
|
||||
LuCI --->
|
||||
1. Collections --->
|
||||
<*> luci
|
||||
3. Applications --->
|
||||
<*> luci-app-autopoweroff.........................LuCI support for Scheduled poweroff
|
||||
## 编译使用方法 [![](https://img.shields.io/badge/-编译使用方法-F5F5F5.svg)](#编译使用方法-)
|
||||
|
||||
将luci-app-autopoweroff添加至 LEDE/OpenWRT 源码的方法。
|
||||
|
||||
### 下载源码方法一:
|
||||
编辑源码文件夹根目录feeds.conf.default并加入如下内容:
|
||||
|
||||
```Brach
|
||||
# feeds获取源码:
|
||||
src-git autopoweroff https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
```
|
||||
```Brach
|
||||
# 更新feeds,并安装主题:
|
||||
scripts/feeds update autopoweroff
|
||||
scripts/feeds install luci-app-autopoweroff
|
||||
```
|
||||
|
||||
### 下载源码方法二:
|
||||
```Brach
|
||||
# 下载源码
|
||||
git clone https://github.com/sirpdboy/luci-app-autopoweroff package/luci-app-autopoweroff
|
||||
make menuconfig
|
||||
```
|
||||
### 配置菜单
|
||||
```Brach
|
||||
make menuconfig
|
||||
# 找到 LuCI -> Themes, 选择 luci-app-autopoweroff, 保存后退出。
|
||||
```
|
||||
### 编译
|
||||
```Brach
|
||||
# 编译固件
|
||||
make package/luci-app-autopoweroff/compile V=s
|
||||
```
|
||||
|
||||
## 说明 [![](https://img.shields.io/badge/-说明-F5F5F5.svg)](#说明-)
|
||||
|
||||
源码来源:https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
|
||||
你可以随意使用其中的源码,但请注明出处。
|
||||
============================
|
||||
|
||||
# My other project
|
||||
网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
定时关机重启 : https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
|
||||
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
|
||||
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
|
||||
|
||||
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
|
||||
|
||||
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
||||
## 捐助 [![](https://img.shields.io/badge/-捐助-F5F5F5.svg)](#捐助-)
|
||||
|
||||
**如果你觉得此项目对你有帮助,请捐助我们,以使项目能持续发展,更加完善。··请作者喝杯咖啡~~~**
|
||||
|
||||
**你们的支持就是我的动力!**
|
||||
|
||||
### 捐助方式
|
||||
|
||||
| <img src="https://img.shields.io/badge/-支付宝-F5F5F5.svg" href="#赞助支持本项目-" height="25" alt="图飞了😂"/> | <img src="https://img.shields.io/badge/-微信-F5F5F5.svg" height="25" alt="图飞了😂" href="#赞助支持本项目-"/> |
|
||||
| :-----------------: | :-------------: |
|
||||
|<img src="https://img.vim-cn.com/fd/8e2793362ac3510094961b04407beec569b2b4.png" width="150" height="150" alt="图飞了😂" href="#赞助支持本项目-"/>|<img src="https://img.vim-cn.com/c7/675730a88accebf37a97d9e84e33529322b6e9.png" width="150" height="150" alt="图飞了😂" href="#赞助支持本项目-"/>|
|
||||
|
||||
<a href="#readme">
|
||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="图飞了😂" title="返回顶部" align="right"/>
|
||||
</a>
|
||||
|
||||
###### [解决 Github 网页上图片显示失败的问题](https://blog.csdn.net/qq_38232598/article/details/91346392)
|
||||
|
||||
[![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
|
||||
|
||||
make package/luci-app-autopoweroff/compile V=s
|
@ -2,7 +2,7 @@ msgid "Scheduled Setting"
|
||||
msgstr "定时设置"
|
||||
|
||||
msgid "Scheduled reboot poweroff Setting"
|
||||
msgstr "定时重启关机二合一设置,启用后可以同时设置一次自动重启和一次自动关机。"
|
||||
msgstr "定时重启关机二合一设置"
|
||||
|
||||
msgid "Scheduled Type"
|
||||
msgstr "定时类型"
|
||||
@ -14,13 +14,13 @@ msgid "Scheduled Poweroff"
|
||||
msgstr "定时关机"
|
||||
|
||||
msgid "Week Day"
|
||||
msgstr "设定星期"
|
||||
msgstr "指定星期"
|
||||
|
||||
msgid "Everyday"
|
||||
msgstr "每天"
|
||||
|
||||
msgid "Hour"
|
||||
msgstr "设定小时"
|
||||
msgstr "指定小时"
|
||||
|
||||
msgid "Minute"
|
||||
msgstr "设定分钟"
|
||||
msgstr "指定分钟"
|
17
luci-app-netspeedtest/Makefile
Normal file
17
luci-app-netspeedtest/Makefile
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
# Copyright (C) 2020-2021 sirpdboy <herboy2008@gmail.com>
|
||||
# The LuCI Network speed test intranet and Extranet <https://github.com/sirpdboy/NetSpeedTest/luci-app-NetSpeedTest>
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-netspeedtest
|
||||
LUCI_TITLE:=LuCI support Network speed test intranet and Extranet
|
||||
LUCI_DEPENDS:=+iperf3
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=20210206
|
||||
PKG_RELEASE:=2
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
117
luci-app-netspeedtest/README.md
Normal file
117
luci-app-netspeedtest/README.md
Normal file
@ -0,0 +1,117 @@
|
||||
[![若部分图片无法正常显示,请挂上机场浏览或点这里到末尾看修复教程](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)](#解决-github-网页上图片显示失败的问题) [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
|
||||
<a href="#readme">
|
||||
<img src="https://img.vim-cn.com/a1/8713845a4aa922ac96619b0d2fb3d6919d37fc.png" alt="图飞了😂" title="NetSpeedTest" align="right" height="180" />
|
||||
</a>
|
||||
|
||||
欢迎来到sirpdboy的源码仓库!
|
||||
=
|
||||
Welcome to sirpdboy's git source of packages
|
||||
-
|
||||
[NetSpeedTest — 网络速度测试](https://github.com/sirpdboy/NetSpeedTest)
|
||||
======================
|
||||
|
||||
[![](https://img.shields.io/badge/-目录:-696969.svg)](#readme) [![](https://img.shields.io/badge/-写在前面-F5F5F5.svg)](#写在前面-) [![](https://img.shields.io/badge/-编译说明-F5F5F5.svg)](#编译说明-) [![](https://img.shields.io/badge/-说明-F5F5F5.svg)](#说明-) [![](https://img.shields.io/badge/-捐助-F5F5F5.svg)](#捐助-)
|
||||
|
||||
请 **认真阅读完毕** 本页面,本页面包含注意事项和如何使用。
|
||||
|
||||
a new NetSpeedTest luci app bese luci-app-NetSpeedTest
|
||||
-
|
||||
|
||||
## 写在前面:[![](https://img.shields.io/badge/-写在前面-F5F5F5.svg)](#写在前面-)
|
||||
|
||||
一直在找OPENWRT上测试速度的插件,苦寻不到,于是有了它!
|
||||
此插件目前只能测试内网,后期测试稳定了再加入外网网络速度测试。
|
||||
|
||||
1.内网测速基于iperf3 插件,服务端路由器如果没有安装请先安装此ipk插件。
|
||||
|
||||
2.测速的终端使用机器必须和测速服务器在同一个局域网络中!
|
||||
|
||||
3.客户端使用步骤:
|
||||
启动测速服务器端-->下载测试客户端-->运行测速客户端-->输入服务端IP地址-->查看结果。
|
||||
|
||||
5.客户端运行,国内端下载中有“iperf3测速客户端”,运行它输入服务器IP即可。
|
||||
国外原版,需要手动进入 CMD命令模式,再输入命令:iperf3.exe -c 服务器IP
|
||||
|
||||
6.网络测速iperf3客户端下载地址:https://sipdboy.lanzoui.com/b01c3esih 密码:cpd6
|
||||
|
||||
7.新插件难免有bug 请不要大惊小怪。欢迎提交bug。
|
||||
|
||||
## 编译说明 [![](https://img.shields.io/badge/-编译说明-F5F5F5.svg)](#编译说明-)
|
||||
|
||||
将NetSpeedTest 主题添加至 LEDE/OpenWRT 源码的方法。
|
||||
|
||||
## 下载源码方法一:
|
||||
编辑源码文件夹根目录feeds.conf.default并加入如下内容:
|
||||
|
||||
```Brach
|
||||
# feeds获取源码:
|
||||
src-git NetSpeedTest https://github.com/sirpdboy/NetSpeedTest
|
||||
```
|
||||
```Brach
|
||||
# 更新feeds,并安装主题:
|
||||
scripts/feeds update NetSpeedTest
|
||||
scripts/feeds install luci-app-NetSpeedTest
|
||||
```
|
||||
|
||||
## 下载源码方法二:
|
||||
```Brach
|
||||
# 下载源码
|
||||
|
||||
git clone https://github.com/sirpdboy/NetSpeedTest package/NetSpeedTest
|
||||
|
||||
make menuconfig
|
||||
```
|
||||
## 配置菜单
|
||||
```Brach
|
||||
make menuconfig
|
||||
# 找到 LuCI -> Applications, 选择 luci-app-NetSpeedTest, 保存后退出。
|
||||
```
|
||||
## 编译
|
||||
```Brach
|
||||
# 编译固件
|
||||
make package/NetSpeedTest/luci-app-NetSpeedTest/{clean,compile} V=s
|
||||
```
|
||||
|
||||
## 说明 [![](https://img.shields.io/badge/-说明-F5F5F5.svg)](#说明-)
|
||||
|
||||
源码来源:https://github.com/sirpdboy/NetSpeedTest/luci-app-NetSpeedTest
|
||||
|
||||
|
||||
你可以随意使用其中的源码,但请注明出处。
|
||||
============================
|
||||
|
||||
# My other project
|
||||
网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
定时关机重启 : https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
|
||||
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
|
||||
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
|
||||
|
||||
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
|
||||
|
||||
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
||||
## 捐助 [![](https://img.shields.io/badge/-捐助-F5F5F5.svg)](#捐助-)
|
||||
|
||||
**如果你觉得此项目对你有帮助,请捐助我们,以使项目能持续发展,更加完善。··请作者喝杯咖啡~~~**
|
||||
|
||||
**你们的支持就是我的动力!**
|
||||
|
||||
### 捐助方式
|
||||
|
||||
| <img src="https://img.shields.io/badge/-支付宝-F5F5F5.svg" href="#赞助支持本项目-" height="25" alt="图飞了😂"/> | <img src="https://img.shields.io/badge/-微信-F5F5F5.svg" height="25" alt="图飞了😂" href="#赞助支持本项目-"/> |
|
||||
| :-----------------: | :-------------: |
|
||||
|<img src="https://img.vim-cn.com/fd/8e2793362ac3510094961b04407beec569b2b4.png" width="150" height="150" alt="图飞了😂" href="#赞助支持本项目-"/>|<img src="https://img.vim-cn.com/c7/675730a88accebf37a97d9e84e33529322b6e9.png" width="150" height="150" alt="图飞了😂" href="#赞助支持本项目-"/>|
|
||||
|
||||
<a href="#readme">
|
||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="图飞了😂" title="返回顶部" align="right"/>
|
||||
</a>
|
||||
|
||||
###### [解决 Github 网页上图片显示失败的问题](https://blog.csdn.net/qq_38232598/article/details/91346392)
|
||||
|
||||
[![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
|
||||
|
117
luci-app-netspeedtest/docs/README.md
Normal file
117
luci-app-netspeedtest/docs/README.md
Normal file
@ -0,0 +1,117 @@
|
||||
[![若部分图片无法正常显示,请挂上机场浏览或点这里到末尾看修复教程](https://visitor-badge.glitch.me/badge?page_id=sirpdboy-visitor-badge)](#解决-github-网页上图片显示失败的问题) [![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
|
||||
<a href="#readme">
|
||||
<img src="https://img.vim-cn.com/a1/8713845a4aa922ac96619b0d2fb3d6919d37fc.png" alt="图飞了😂" title="NetSpeedTest" align="right" height="180" />
|
||||
</a>
|
||||
|
||||
欢迎来到sirpdboy的源码仓库!
|
||||
=
|
||||
Welcome to sirpdboy's git source of packages
|
||||
-
|
||||
[NetSpeedTest — 网络速度测试](https://github.com/sirpdboy/NetSpeedTest)
|
||||
======================
|
||||
|
||||
[![](https://img.shields.io/badge/-目录:-696969.svg)](#readme) [![](https://img.shields.io/badge/-写在前面-F5F5F5.svg)](#写在前面-) [![](https://img.shields.io/badge/-编译说明-F5F5F5.svg)](#编译说明-) [![](https://img.shields.io/badge/-说明-F5F5F5.svg)](#说明-) [![](https://img.shields.io/badge/-捐助-F5F5F5.svg)](#捐助-)
|
||||
|
||||
请 **认真阅读完毕** 本页面,本页面包含注意事项和如何使用。
|
||||
|
||||
a new NetSpeedTest luci app bese luci-app-NetSpeedTest
|
||||
-
|
||||
|
||||
## 写在前面:[![](https://img.shields.io/badge/-写在前面-F5F5F5.svg)](#写在前面-)
|
||||
|
||||
一直在找OPENWRT上测试速度的插件,苦寻不到,于是有了它!
|
||||
此插件目前只能测试内网,后期测试稳定了再加入外网网络速度测试。
|
||||
|
||||
1.内网测速基于iperf3 插件,服务端路由器如果没有安装请先安装此ipk插件。
|
||||
|
||||
2.测速的终端使用机器必须和测速服务器在同一个局域网络中!
|
||||
|
||||
3.客户端使用步骤:
|
||||
启动测速服务器端-->下载测试客户端-->运行测速客户端-->输入服务端IP地址-->查看结果。
|
||||
|
||||
5.客户端运行,国内端下载中有“iperf3测速客户端”,运行它输入服务器IP即可。
|
||||
国外原版,需要手动进入 CMD命令模式,再输入命令:iperf3.exe -c 服务器IP
|
||||
|
||||
6.网络测速iperf3客户端下载地址:https://sipdboy.lanzoui.com/b01c3esih 密码:cpd6
|
||||
|
||||
7.新插件难免有bug 请不要大惊小怪。欢迎提交bug。
|
||||
|
||||
## 编译说明 [![](https://img.shields.io/badge/-编译说明-F5F5F5.svg)](#编译说明-)
|
||||
|
||||
将NetSpeedTest 主题添加至 LEDE/OpenWRT 源码的方法。
|
||||
|
||||
## 下载源码方法一:
|
||||
编辑源码文件夹根目录feeds.conf.default并加入如下内容:
|
||||
|
||||
```Brach
|
||||
# feeds获取源码:
|
||||
src-git NetSpeedTest https://github.com/sirpdboy/NetSpeedTest
|
||||
```
|
||||
```Brach
|
||||
# 更新feeds,并安装主题:
|
||||
scripts/feeds update NetSpeedTest
|
||||
scripts/feeds install luci-app-NetSpeedTest
|
||||
```
|
||||
|
||||
## 下载源码方法二:
|
||||
```Brach
|
||||
# 下载源码
|
||||
|
||||
git clone https://github.com/sirpdboy/NetSpeedTest package/NetSpeedTest
|
||||
|
||||
make menuconfig
|
||||
```
|
||||
## 配置菜单
|
||||
```Brach
|
||||
make menuconfig
|
||||
# 找到 LuCI -> Applications, 选择 luci-app-NetSpeedTest, 保存后退出。
|
||||
```
|
||||
## 编译
|
||||
```Brach
|
||||
# 编译固件
|
||||
make package/NetSpeedTest/luci-app-NetSpeedTest/{clean,compile} V=s
|
||||
```
|
||||
|
||||
## 说明 [![](https://img.shields.io/badge/-说明-F5F5F5.svg)](#说明-)
|
||||
|
||||
源码来源:https://github.com/sirpdboy/NetSpeedTest/luci-app-NetSpeedTest
|
||||
|
||||
|
||||
你可以随意使用其中的源码,但请注明出处。
|
||||
============================
|
||||
|
||||
# My other project
|
||||
网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
定时关机重启 : https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
|
||||
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
|
||||
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
|
||||
|
||||
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
|
||||
|
||||
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
||||
## 捐助 [![](https://img.shields.io/badge/-捐助-F5F5F5.svg)](#捐助-)
|
||||
|
||||
**如果你觉得此项目对你有帮助,请捐助我们,以使项目能持续发展,更加完善。··请作者喝杯咖啡~~~**
|
||||
|
||||
**你们的支持就是我的动力!**
|
||||
|
||||
### 捐助方式
|
||||
|
||||
| <img src="https://img.shields.io/badge/-支付宝-F5F5F5.svg" href="#赞助支持本项目-" height="25" alt="图飞了😂"/> | <img src="https://img.shields.io/badge/-微信-F5F5F5.svg" height="25" alt="图飞了😂" href="#赞助支持本项目-"/> |
|
||||
| :-----------------: | :-------------: |
|
||||
|<img src="https://img.vim-cn.com/fd/8e2793362ac3510094961b04407beec569b2b4.png" width="150" height="150" alt="图飞了😂" href="#赞助支持本项目-"/>|<img src="https://img.vim-cn.com/c7/675730a88accebf37a97d9e84e33529322b6e9.png" width="150" height="150" alt="图飞了😂" href="#赞助支持本项目-"/>|
|
||||
|
||||
<a href="#readme">
|
||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="图飞了😂" title="返回顶部" align="right"/>
|
||||
</a>
|
||||
|
||||
###### [解决 Github 网页上图片显示失败的问题](https://blog.csdn.net/qq_38232598/article/details/91346392)
|
||||
|
||||
[![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
|
||||
|
BIN
luci-app-netspeedtest/img/alipay.png
Normal file
BIN
luci-app-netspeedtest/img/alipay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
BIN
luci-app-netspeedtest/img/netspeedtest.png
Normal file
BIN
luci-app-netspeedtest/img/netspeedtest.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
BIN
luci-app-netspeedtest/img/wepay.png
Normal file
BIN
luci-app-netspeedtest/img/wepay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 61 KiB |
80
luci-app-netspeedtest/luasrc/controller/netspeedtest.lua
Normal file
80
luci-app-netspeedtest/luasrc/controller/netspeedtest.lua
Normal file
@ -0,0 +1,80 @@
|
||||
|
||||
-- Copyright (C) 2020-2021 sirpdboy <herboy2008@gmail.com>
|
||||
-- The LuCI Network diagnosis and speed test <https://github.com/sirpdboy/NetSpeedTest/luci-app-NetSpeedTest>
|
||||
-- This is free software, licensed under the GNU General Public License v3.
|
||||
|
||||
module("luci.controller.netspeedtest", package.seeall)
|
||||
|
||||
function index()
|
||||
local uci = require("luci.model.uci").cursor()
|
||||
local page
|
||||
page = entry({"admin", "network", "NetSpeedTest"}, template("NetSpeedTest/NetSpeedTest"), "NetSpeedTest", 90)
|
||||
page.dependent = true
|
||||
|
||||
page = entry({"admin", "network", "diag_iperf3"}, call("diag_iperf3"), nil)
|
||||
page.leaf = true
|
||||
|
||||
page = entry({"admin", "network", "diag_iperf36"}, call("diag_iperf36"), nil)
|
||||
page.leaf = true
|
||||
page = entry({"admin", "network","diag_ping"}, call("diag_ping"), nil)
|
||||
page.leaf = true
|
||||
page = entry({"admin", "network","diag_ping6"}, call("diag_ping6"), nil)
|
||||
page.leaf = true
|
||||
end
|
||||
|
||||
function diag_cmd(cmd, addr)
|
||||
if addr and addr:match("^[a-zA-Z0-9%-%.:_]+$") then
|
||||
luci.http.prepare_content("text/plain")
|
||||
|
||||
local util = io.popen(cmd % luci.util.shellquote(addr))
|
||||
if util then
|
||||
while true do
|
||||
local ln = util:read("*l")
|
||||
if not ln then break end
|
||||
luci.http.write(ln)
|
||||
luci.http.write("\n")
|
||||
end
|
||||
|
||||
util:close()
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
luci.http.status(500, "Bad address")
|
||||
end
|
||||
function testlan(cmd)
|
||||
luci.http.prepare_content("text/plain")
|
||||
|
||||
local util = io.popen(cmd)
|
||||
if util then
|
||||
while true do
|
||||
local ln = util:read("*l")
|
||||
if not ln then break end
|
||||
luci.http.write(ln)
|
||||
luci.http.write("\n")
|
||||
end
|
||||
|
||||
util:close()
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
luci.http.status(500, "Bad Network")
|
||||
end
|
||||
function diag_iperf3(addr)
|
||||
testlan("iperf3 -s 2>&1")
|
||||
end
|
||||
|
||||
function diag_iperf36(addr)
|
||||
testlan("iperf3 -s -B 0.0.0.0 2>&1")
|
||||
end
|
||||
|
||||
function diag_ping(addr)
|
||||
diag_cmd("ping -c 5 -W 1 %s 2>&1", addr)
|
||||
end
|
||||
|
||||
function diag_ping6(addr)
|
||||
diag_cmd("ping6 -c 5 %s 2>&1", addr)
|
||||
end
|
133
luci-app-netspeedtest/luasrc/view/netspeedtest/netspeedtest.htm
Normal file
133
luci-app-netspeedtest/luasrc/view/netspeedtest/netspeedtest.htm
Normal file
@ -0,0 +1,133 @@
|
||||
<%#
|
||||
Copyright (C) 2020-2021 sirpdboy <herboy2008@gmail.com>
|
||||
The LuCI Network diagnosis and speed test <https://github.com/sirpdboy/NetSpeedTest>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
<%+header%>
|
||||
<%
|
||||
local fs = require "nixio.fs"
|
||||
local has_iperf3 = fs.access("/bin/iperf3") or fs.access("/usr/bin/iperf3")
|
||||
local has_ping6 = fs.access("/bin/ping6") or fs.access("/usr/bin/ping6")
|
||||
%>
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var stxhr = new XHR();
|
||||
|
||||
function update_status(field, proto)
|
||||
{
|
||||
var tool = field.name;
|
||||
var addr = field.value;
|
||||
var protocol = proto ? "6" : "";
|
||||
|
||||
var legend = document.getElementById('diag-rc-legend');
|
||||
var output = document.getElementById('diag-rc-output');
|
||||
|
||||
0 if (legend && output)
|
||||
0{
|
||||
output.innerHTML =
|
||||
'<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /> ' +
|
||||
'<%:Waiting for command to complete...%>'
|
||||
;
|
||||
|
||||
legend.parentNode.style.display = 'block';
|
||||
legend.style.display = 'inline';
|
||||
|
||||
stxhr.get('<%=url('status')%>/diag_' + tool + protocol + '/' + addr, null,
|
||||
function(x)
|
||||
{
|
||||
if (x.responseText)
|
||||
{
|
||||
legend.style.display = 'none';
|
||||
output.innerHTML = String.format('<pre>%h</pre>', x.responseText);
|
||||
}
|
||||
else
|
||||
{
|
||||
legend.style.display = 'none';
|
||||
output.innerHTML = '<span class="error"><%:Bad address specified!%></span>';
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
//]]></script>
|
||||
|
||||
<form method="post" action="<%=pcdata(FULL_REQUEST_URI)%>">
|
||||
<div class="cbi-map">
|
||||
<h2 name="content">
|
||||
<%:Netspeedtest%>
|
||||
</h2>
|
||||
<fieldset class="cbi-section">
|
||||
<legend>
|
||||
<%:Network speed diagnosis test (including intranet and extranet)%>
|
||||
</legend>
|
||||
<br />
|
||||
<div style="width:50%; float:left">
|
||||
<% if has_iperf3 then %>
|
||||
<select name="iperf3_proto" style="width:auto">
|
||||
<option value="" selected="selected">
|
||||
<%:iperflan%>
|
||||
</option>
|
||||
<option value="6">
|
||||
<%:iperfwan%>
|
||||
</option>
|
||||
<input type="button" value="<%:Start the speed measurement server%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.iperf3)" />
|
||||
<% else %>
|
||||
</br>
|
||||
<%:You need to install iperf3 plug-in to start the test speed server%>
|
||||
</br>
|
||||
<% end %>
|
||||
</br>
|
||||
</div>
|
||||
<div style="width:50%; float:left">
|
||||
<input style="margin: 5px 0" type="text" value="www.baidu.com" name="ping" />
|
||||
<br />
|
||||
<% if has_ping6 then %>
|
||||
<select name="ping_proto" style="width:auto">
|
||||
<option value="" selected="selected">
|
||||
<%:IPv4%>
|
||||
</option>
|
||||
<option value="6">
|
||||
<%:IPv6%>
|
||||
</option>
|
||||
</select>
|
||||
<input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping, this.form.ping_proto.selectedIndex)" />
|
||||
<% else %>
|
||||
<input type="button" value="<%:Ping%>" class="cbi-button cbi-button-apply" onclick="update_status(this.form.ping)" />
|
||||
<% end %>
|
||||
</div>
|
||||
<br style="clear:both" />
|
||||
<br />
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section">
|
||||
<div style="width:50%; float:left">
|
||||
<label class="cbi-value-title">
|
||||
<%:instructions:%> </label>
|
||||
<div class="cbi-value-field"> <%<br />
|
||||
<u> < font color = '# ff0000' > the terminal machine of speed measurement must be in the same local area network as the speed measurement server. </font></u> <br />
|
||||
Use steps: A, start the speed measurement server, B, download the test client, C, run the speed measurement client, D, enter the server IP address. <br />
|
||||
<br />%>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Iperf3 speed measurement software download:%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="button" class="cbi-button cbi-input-reload" value="<%:Domestic download password:%>cpd6" onclick="javascript:window.open('https://sipdboy.lanzoui.com/b01c3esih','target');" />
|
||||
<input type="button" class="cbi-button cbi-input-reload" value="<%:Download from foreign official websites%>" onclick="javascript:window.open('https://iperf.fr/iperf-download.php','target');" />
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Click to enter:%> </label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="button" class="cbi-button cbi-input-reload" value="<%:Network speed test TG AC group%>" onclick="javascript:window.open('https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ','target');" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<fieldset class="cbi-section" style="display:none">
|
||||
<legend id="diag-rc-legend"><%:Collecting data...%>
|
||||
</legend>
|
||||
<span id="diag-rc-output"></span>
|
||||
</fieldset>
|
||||
</form>
|
||||
<%+footer%>
|
50
luci-app-netspeedtest/po/zh-cn/netspeedtest.po
Normal file
50
luci-app-netspeedtest/po/zh-cn/netspeedtest.po
Normal file
@ -0,0 +1,50 @@
|
||||
#
|
||||
# Copyright (C) 2020-2021 sirpdboy <herboy2008@gmail.com>
|
||||
# The LuCI Network diagnosis and speed test <https://github.com/sirpdboy/NetSpeedTest/luci-app-NetSpeedTest>
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
|
||||
msgid "NetSpeedTest"
|
||||
msgstr "网络速度测试"
|
||||
|
||||
msgid "Network speed diagnosis test (including intranet and extranet)"
|
||||
msgstr "网络速度诊断测试(包括内网和外网)"
|
||||
|
||||
msgid "iperflan"
|
||||
msgstr "iperf内网"
|
||||
|
||||
msgid "iperfwan"
|
||||
msgstr "iperf外网"
|
||||
|
||||
msgid "Start the speed measurement server"
|
||||
msgstr "启动测速服务器"
|
||||
|
||||
msgid "You need to install iperf3 plug-in to start the test speed server"
|
||||
msgstr "需要安装iperf3插件才能开启测试速度服务器"
|
||||
|
||||
msgid "instructions:"
|
||||
msgstr "使用说明:"
|
||||
|
||||
msgid "<br />
|
||||
<u> < font color = '# ff0000' > the terminal machine of speed measurement must be in the same local area network as the speed measurement server. </font></u> <br />
|
||||
Use steps: A, start the speed measurement server, B, download the test client, C, run the speed measurement client, D, enter the server IP address. <br />
|
||||
<br />"
|
||||
msgstr "<br />
|
||||
<u><font color='#FF0000'>测速的终端机器必须和测速服务器在同一个局域网络中。</font></u> <br />
|
||||
使用步骤:A、启动测速服务器端,B、下载测试客户端,C、运行测速客户端,D、输入服务端IP地址。 <br />
|
||||
<br />"
|
||||
|
||||
msgid "Domestic download password:"
|
||||
msgstr "国内下载密码:"
|
||||
|
||||
msgid "Iperf3 speed measurement software download:"
|
||||
msgstr "iperf3测速软件下载:"
|
||||
|
||||
msgid "Download from foreign official websites"
|
||||
msgstr "国外官网下载"
|
||||
|
||||
msgid "Click to enter:"
|
||||
msgstr "点击进入:"
|
||||
|
||||
msgid "Network speed test TG AC group"
|
||||
msgstr "网速测试TG交流群"
|
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
rm -f /tmp/luci-indexcache
|
1
luci-app-poweroffdevice
Submodule
1
luci-app-poweroffdevice
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit f476dbbfa282e50e18b3373c81b28121b39ecd36
|
@ -12,43 +12,61 @@ openwrt 1806 luci主题,具有PC和手机自适应的特性,界面简洁大
|
||||
|
||||
要是好用的话,请多分享给其他有需要的人吧。欢迎大家一起完善。
|
||||
|
||||
|
||||
## 编译使用方法 [![](https://img.shields.io/badge/-编译使用方法-F5F5F5.svg)](#编译使用方法-)
|
||||
```Brach
|
||||
# 下载源码
|
||||
|
||||
git clone https://github.com/sirpdboy/luci-theme-btmod package/luci-theme-btmod
|
||||
|
||||
make menuconfig
|
||||
```
|
||||
|
||||
# 编译选择
|
||||
|
||||
make menuconfig,进入luci->themes,选择luci-theme-btmod,保存退出,make V=99编译。
|
||||
|
||||
# 编译
|
||||
```Brach
|
||||
make package/luci-app-btmod/{clean,compile} V=s
|
||||
将luci-theme-btmod主题添加至 LEDE/OpenWRT 源码的方法。
|
||||
|
||||
### 下载源码方法一:
|
||||
编辑源码文件夹根目录feeds.conf.default并加入如下内容:
|
||||
|
||||
```Brach
|
||||
# feeds获取源码:
|
||||
src-git btmod https://github.com/sirpdboy/luci-theme-btmod
|
||||
```
|
||||
```Brach
|
||||
# 更新feeds,并安装主题:
|
||||
scripts/feeds update btmob
|
||||
scripts/feeds install luci-theme-btmob
|
||||
```
|
||||
|
||||
|
||||
# My other project
|
||||
NetSpeedTest :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
autopoweroff : https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
|
||||
opentopd theme : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
btmob theme : https://github.com/sirpdboy/luci-theme-btmob
|
||||
|
||||
advanced : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
||||
### 下载源码方法二:
|
||||
```Brach
|
||||
# 下载源码
|
||||
git clone https://github.com/sirpdboy/luci-theme-btmob package/luci-theme-btmob
|
||||
make menuconfig
|
||||
```
|
||||
### 配置菜单
|
||||
```Brach
|
||||
make menuconfig
|
||||
# 找到 LuCI -> Themes, 选择 luci-theme-btmob, 保存后退出。
|
||||
```
|
||||
### 编译
|
||||
```Brach
|
||||
# 编译固件
|
||||
make package/luci-theme-btmob/{clean,compile} V=s
|
||||
```
|
||||
|
||||
## 说明 [![](https://img.shields.io/badge/-说明-F5F5F5.svg)](#说明-)
|
||||
|
||||
源码来源:https://github.com/sirpdboy/luci-theme-btmob
|
||||
|
||||
你可以随意使用其中的源码,但请注明出处。
|
||||
============================
|
||||
|
||||
# My other project
|
||||
网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
定时关机重启 : https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
|
||||
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
|
||||
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
|
||||
|
||||
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
|
||||
|
||||
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
||||
## 捐助 [![](https://img.shields.io/badge/-捐助-F5F5F5.svg)](#捐助-)
|
||||
|
||||
@ -69,3 +87,4 @@ advanced : https://github.com/sirpdboy/luci-app-advanced
|
||||
###### [解决 Github 网页上图片显示失败的问题](https://blog.csdn.net/qq_38232598/article/details/91346392)
|
||||
|
||||
[![](https://img.shields.io/badge/TG群-点击加入-FFFFFF.svg)](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
|
||||
|
||||
|
@ -65,15 +65,21 @@ opentopd是一款基于luci-theme-material构建,使用HTML5、CSS3编写的Luci
|
||||
|
||||
源码来源:https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
### 你可以随意使用其中的源码,但请注明出处。
|
||||
|
||||
你可以随意使用其中的源码,但请注明出处。
|
||||
============================
|
||||
|
||||
# My other project
|
||||
网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
定时关机重启 : https://github.com/sirpdboy/luci-app-autopoweroff
|
||||
|
||||
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
|
||||
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
|
||||
|
||||
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
|
||||
|
||||
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
Loading…
Reference in New Issue
Block a user