├── Changelog_old.txt ├── LICENSE ├── README.md ├── apps ├── aria2 │ ├── bin │ │ ├── aria2 │ │ ├── aria2_R3G │ │ ├── aria2_R3_R1CM │ │ └── aria2_mips │ ├── config │ │ ├── aria2.conf │ │ ├── aria2.uci │ │ ├── monlor.conf │ │ └── version.txt │ ├── lib │ │ ├── libstdc++.so │ │ ├── libstdc++.so.6 │ │ └── libxml2.so.2 │ ├── script │ │ ├── aria2.sh │ │ └── install.sh │ └── web │ │ └── AriaNG │ │ ├── LICENSE │ │ ├── css │ │ ├── aria-ng-aed476e868.min.css │ │ ├── bootstrap-3.3.7.min.css │ │ └── plugins-a7090b9582.min.css │ │ ├── favicon.ico │ │ ├── favicon.png │ │ ├── fonts │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ │ ├── index.html │ │ ├── index.manifest │ │ ├── js │ │ ├── angular-packages-1.6.5.min.js │ │ ├── aria-ng-32e6c713b1.min.js │ │ ├── bootstrap-3.3.7.min.js │ │ ├── echarts-common-3.7.1.min.js │ │ ├── jquery-2.2.4.min.js │ │ ├── moment-with-locales-2.18.1.min.js │ │ └── plugins-7eed010b9e.min.js │ │ ├── langs │ │ ├── zh_Hans.txt │ │ └── zh_Hant.txt │ │ ├── robots.txt │ │ ├── tileicon.png │ │ └── touchicon.png ├── baidupcs │ ├── config │ │ ├── baidupcs.uci │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── baidupcs.sh ├── easyexplorer │ ├── bin │ │ └── easyexplorer │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── easyexplorer.sh ├── entware │ ├── config │ │ ├── entware.uci │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── entware.sh ├── fastdick │ ├── bin │ │ └── fastdick │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── fastdick.sh ├── filebrowser │ ├── bin │ │ ├── filebrowser │ │ └── filebrowser_mips │ ├── config │ │ ├── filebrowser.uci │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── filebrowser.sh ├── firewall │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── firewall.sh ├── frpc │ ├── bin │ │ ├── frpc │ │ └── frpc_mips │ ├── config │ │ ├── frpc.uci │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ ├── frpc.sh │ │ └── install.sh ├── httpfile │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── httpfile.sh ├── jetbrains │ ├── bin │ │ ├── jetbrains │ │ └── jetbrains_mips │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── jetbrains.sh ├── kms │ ├── bin │ │ ├── kms │ │ └── kms_mips │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── kms.sh ├── kodexplorer │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── kodexplorer.sh ├── koolproxy │ ├── bin │ │ ├── data │ │ │ ├── dnsmasq.adblock │ │ │ ├── gen_ca.sh │ │ │ ├── koolproxy_ipset.conf │ │ │ ├── openssl.cnf │ │ │ └── rules │ │ │ │ ├── daily.txt │ │ │ │ ├── koolproxy.txt │ │ │ │ ├── kp.dat │ │ │ │ └── user.txt │ │ ├── koolproxy │ │ ├── koolproxy_mips │ │ ├── openssl │ │ └── openssl_mips │ ├── config │ │ ├── koolproxy.uci │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ ├── install.sh │ │ ├── koolproxy.sh │ │ └── updaterules.sh ├── ngrok │ ├── bin │ │ ├── ngrok │ │ └── ngrok_mips │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── ngrok.sh ├── qiandao │ ├── bin │ │ └── qiandao │ ├── config │ │ ├── monlor.conf │ │ ├── qiandao.uci │ │ └── version.txt │ └── script │ │ └── qiandao.sh ├── shadowsocks │ ├── bin │ │ ├── dns2socks │ │ ├── dns2socks_mips │ │ ├── ss-local │ │ ├── ss-local_mips │ │ ├── ss-redir │ │ ├── ss-redir_mips │ │ ├── ssr-local │ │ ├── ssr-local_mips │ │ ├── ssr-redir │ │ └── ssr-redir_mips │ ├── config │ │ ├── cdn.txt │ │ ├── chnroute.txt │ │ ├── customize_black.conf │ │ ├── customize_white.conf │ │ ├── gfwlist.conf │ │ ├── monlor.conf │ │ ├── shadowsocks.uci │ │ └── version.txt │ └── script │ │ ├── install.sh │ │ ├── shadowsocks.sh │ │ ├── ss_online_update.sh │ │ └── ss_rule_update.sh ├── tinyproxy │ ├── bin │ │ ├── tinyproxy │ │ └── tinyproxy_mips │ ├── config │ │ ├── monlor.conf │ │ ├── tinyproxy.conf │ │ └── version.txt │ └── script │ │ └── tinyproxy.sh ├── verysync │ ├── bin │ │ ├── verysync │ │ └── verysync_mips │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ ├── install.sh │ │ └── verysync.sh ├── vsftpd │ ├── bin │ │ ├── vsftpd │ │ └── vsftpd_mips │ ├── config │ │ ├── monlor.conf │ │ ├── version.txt │ │ └── vsftpd.conf │ └── script │ │ └── vsftpd.sh ├── webshell │ ├── bin │ │ ├── webshell │ │ └── webshell_mips │ ├── config │ │ ├── monlor.conf │ │ └── version.txt │ └── script │ │ └── webshell.sh └── zerotier │ ├── config │ ├── monlor.conf │ ├── version.txt │ └── zerotier.uci │ └── script │ └── zerotier.sh ├── appstore ├── aria2.tar.gz ├── easyexplorer.tar.gz ├── entware.tar.gz ├── fastdick.tar.gz ├── filebrowser.tar.gz ├── firewall.tar.gz ├── frpc.tar.gz ├── httpfile.tar.gz ├── jetbrains.tar.gz ├── kms.tar.gz ├── kodexplorer.tar.gz ├── koolproxy.tar.gz ├── monlor.tar.gz ├── ngrok.tar.gz ├── qiandao.tar.gz ├── shadowsocks.tar.gz ├── tinyproxy.tar.gz ├── verysync.tar.gz ├── vsftpd.tar.gz ├── webshell.tar.gz └── zerotier.tar.gz ├── config ├── hosts.txt ├── monlor.uci ├── profile └── version.txt ├── gitsync.sh ├── install.sh ├── md5.txt ├── newapp.sh ├── newinfo.txt ├── scripts ├── addweb ├── appmanage.sh ├── base.sh ├── init.sh ├── monitor.sh ├── monlor ├── uninstall.sh ├── update.sh └── userscript.sh ├── temp ├── applist.txt ├── applist_R3G.txt ├── applist_R3P.txt ├── applist_mips.txt ├── dnsmasq ├── frp-bin │ ├── 0.17.0 │ │ ├── frpc │ │ ├── frpc_mips │ │ ├── frps │ │ └── frps_mips │ ├── 0.20.0 │ │ ├── frpc │ │ ├── frpc_mips │ │ ├── frps │ │ └── frps_mips │ └── 0.9.3 │ │ ├── frpc │ │ ├── frpc_mips │ │ ├── frps │ │ └── frps_mips ├── img.png ├── img_old.png ├── kodexplorer.tar.gz └── wget ├── version.tar.gz └── web ├── css └── monlor-style.css ├── htm ├── aria2.htm ├── fastdick.htm ├── frp.htm ├── index.htm ├── kms.htm ├── koolproxy.htm ├── nginx.htm ├── ss.htm ├── tinyproxy.htm └── webshell.htm ├── img ├── ico_dropdown.png ├── ico_dropup.png ├── ico_notice.png ├── icon-koolproxy-bg.png ├── icon-koolproxy.png ├── icon-shadowsocks-bg.png ├── icon-shadowsocks.png └── monlor-background.jpg ├── js └── jquery-3.2.1.min.js └── lua ├── api └── monlor.lua └── web └── monlor.lua /Changelog_old.txt: -------------------------------------------------------------------------------- 1 | 2017-11-22 2 | 1. 已支持小米路由器R3P,有需要的可以测试一下,因为没有测试设备,所以不能保证工具箱的正常运行 3 | 2. 更新了安装卸载脚本 4 | 3. 为R3P路由器添加了相应插件的二进制文件 5 | 4. 添加了工具箱更新脚本 6 | 5. 修复了BUG 7 | 6. 更新内容小米路由R2D已成功测试,R3P无法测试 8 | 9 | 2017-12-01 10 | 1. 由于小米路由器R3P不支持unzip,插件安装包改为tar压缩方式 11 | 2. 可能是由于小米路由器R2D新版固件原因,插件可能无法开机自启,开机终端运行init.sh解决 12 | 3. 经测试,无法开机自启为脚本问题,已修复 13 | 14 | 2017-12-02 15 | 1. 修复了工具箱多处bug 16 | 17 | 2017-12-03 18 | 1. 更新脚本,工具箱卸载备份配置,安装时可以恢复配置 19 | 2. 支持了小米路由器R1D, R2D, R3D, R3, R3G, R3P 20 | 3. R2D运行正常,其他型号无法测试 21 | 4. shadowsocks插件增添ssr功能,理论ssr正常了,没账号未测试 22 | 5. 添加mips机型aria2插件的库文件 23 | 24 | 2017-12-04 25 | 1. 修复了ss脚本bug, ssr已测试正常, ssr游戏模式测试正常 26 | 2. 增加KodExplorer网页文件管理插件,需配合entware安装nginx+php环境 27 | 3. 可以用update.sh命令或者修改配置文件更新下工具箱脚本 28 | 29 | 2017-12-05 30 | 1. 增加EasyKodexplorer插件,一款跨设备、点对点文件传输同步工具,详情:http://koolshare.cn/thread-129199-1-1.html 31 | 32 | 2017-12-16 33 | 1. 添加了KoolProxy最新vip规则 34 | 2. 优化KodExplorer安装脚本 35 | 3. 更新Frpc 1.1版本,增加配置添加提示 36 | 4. 优化了所有脚本的提示 37 | 5. 修复安装命令BUG 38 | 39 | 2017-12-19 40 | 1. 同步更新EasyExplorer二进制版本到0.1.3,支持DLAN了,详情https://github.com/koolshare/ddnsto 41 | 2. 修改了工具箱插件安装逻辑,配置文件更新,建议使用新的配置文件,或重装工具箱 42 | 43 | 2017-12-26 44 | 1. 准备修改工具箱配置文件逻辑,方面各个插件的配置 45 | 46 | 2017-12-28 47 | 1. 更新插件的配置方式,配置插件更容易了,按提示一步一步操作。 48 | 2. 去除以前的配置文件,新增命令monlor,执行monlor即可轻松配置工具箱,注意Ctrl + c即可退出monlor命令。 49 | 3. 以前的版本建议重装工具箱或更新工具箱和全部插件 50 | 51 | 2017-12-29 52 | 1. 修复了更新造成的bug 53 | 2. 新增插件Ngrok 54 | -------------------------------------------------------------------------------- /apps/aria2/bin/aria2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/bin/aria2 -------------------------------------------------------------------------------- /apps/aria2/bin/aria2_R3G: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/bin/aria2_R3G -------------------------------------------------------------------------------- /apps/aria2/bin/aria2_R3_R1CM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/bin/aria2_R3_R1CM -------------------------------------------------------------------------------- /apps/aria2/bin/aria2_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/bin/aria2_mips -------------------------------------------------------------------------------- /apps/aria2/config/aria2.conf: -------------------------------------------------------------------------------- 1 | #用户名 2 | #rpc-user=user 3 | #密码 4 | #rpc-passwd=passwd 5 | #设置加密的密钥 6 | #rpc-secret=secret 7 | #允许rpc 8 | enable-rpc=true 9 | #允许所有来源, web界面跨域权限需要 10 | rpc-allow-origin-all=true 11 | #是否启用https加密,启用之后要设置公钥,私钥的文件路径 12 | #rpc-secure=true 13 | #启用加密设置公钥 14 | #rpc-certificate=/home/name/.config/aria2/example.crt 15 | #启用加密设置私钥 16 | #rpc-private-key=/home/name/.config/aria2/example.key 17 | #允许外部访问,false的话只监听本地端口 18 | rpc-listen-all=true 19 | #RPC端口, 仅当默认端口被占用时修改 20 | rpc-listen-port=6800 21 | #最大同时下载数(任务数), 路由建议值: 3 22 | max-concurrent-downloads=5 23 | #断点续传 24 | continue=true 25 | #同服务器连接数 26 | max-connection-per-server=5 27 | #最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要 28 | min-split-size=10M 29 | #单文件最大线程数, 路由建议值: 5 30 | split=10 31 | #下载速度限制 32 | max-overall-download-limit=0 33 | #单文件速度限制 34 | max-download-limit=0 35 | #上传速度限制 36 | max-overall-upload-limit=0 37 | #单文件速度限制 38 | max-upload-limit=0 39 | #断开速度过慢的连接 40 | #lowest-speed-limit=0 41 | #验证用,需要1.16.1之后的release版本 42 | #referer=* 43 | #文件保存路径, 默认为当前启动位置 44 | dir=/extdisks/sda1/下载 45 | #文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本 46 | #disk-cache=0 47 | #另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?) 48 | #enable-mmap=true 49 | #文件预分配, 能有效降低文件碎片, 提高磁盘性能. 缺点是预分配时间较长 50 | #所需时间 none < falloc ? trunc << prealloc, falloc和trunc需要文件系统和内核支持 51 | file-allocation=prealloc 52 | #不进行证书校验 53 | check-certificate=false 54 | #保存aria2下载记录 55 | input-file=/etc/aria2.session 56 | save-session=/etc/aria2.session 57 | save-session-interval=60 -------------------------------------------------------------------------------- /apps/aria2/config/aria2.uci: -------------------------------------------------------------------------------- 1 | appname=aria2 2 | uci set monlor.$appname=config 3 | uci set monlor.$appname.service=Aria2 4 | uci set monlor.$appname.appname="$appname" 5 | uci set monlor.$appname.tools="2.5.28" 6 | uci set monlor.$appname.newinfo="更新了R3G的二进制文件" -------------------------------------------------------------------------------- /apps/aria2/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【Aria2】-------------------- 2 | aria2() { 3 | appname=aria2 4 | service=Aria2 5 | uciset="uci set monlor.$appname" 6 | $uciset=config && $uciset.service=$service 7 | echo "********* $service ***********" 8 | echo "[Linux下一款高效的下载工具]" 9 | read -p "启动$appname服务?[1/0] " enable 10 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 11 | if [ "$enable" == '1' ]; then 12 | read -p "修改$appname端口号(`uci -q get monlor.$appname.port || echo 6800`)?[1/0] " res 13 | if [ "$res" == '1' ]; then 14 | read -p "请输入$appname端口号(默认6800):" res 15 | $uciset.port="$res" 16 | fi 17 | token=$(uci -q get monlor.$appname.token) 18 | path=$(uci -q get monlor.$appname.path) 19 | [ -z $token ] && token="空" 20 | [ -z $path ] && path="$userdisk/下载" 21 | read -p "修改$appname配置($token, $path)?[1/0] " res 22 | if [ "$res" == '1' ]; then 23 | read -p "请输入$appname密钥(回车表示不设置):" res 24 | [ ! -z "$res" ] && $uciset.token="$res" || $uciset.token="" 25 | read -p "请输入$appname下载路径(回车默认$userdisk/下载):" res 26 | [ ! -z "$res" ] && $uciset.path="$res" || $uciset.path="$userdisk/下载" 27 | fi 28 | fi 29 | if [ "$enable" == '1' ]; then 30 | $monlorpath/apps/$appname/script/$appname.sh restart 31 | else 32 | $monlorpath/apps/$appname/script/$appname.sh stop 33 | fi 34 | 35 | } 36 | #------------------【Aria2】-------------------- -------------------------------------------------------------------------------- /apps/aria2/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.2.7 2 | -------------------------------------------------------------------------------- /apps/aria2/lib/libstdc++.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/lib/libstdc++.so -------------------------------------------------------------------------------- /apps/aria2/lib/libstdc++.so.6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/lib/libstdc++.so.6 -------------------------------------------------------------------------------- /apps/aria2/lib/libxml2.so.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/lib/libxml2.so.2 -------------------------------------------------------------------------------- /apps/aria2/script/aria2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | eval `ucish export aria2` 12 | EXTRA_COMMANDS=" status backup recover" 13 | EXTRA_HELP=" status Get $appname status" 14 | port=6800 15 | WEBDIR=$monlorpath/apps/$appname/web 16 | [ -z "$port" ] && port=6800 17 | [ -z "$path" ] && path="$userdisk/下载" 18 | aria2url=http://$lanip/backup/log/$appname 19 | 20 | set_config() { 21 | 22 | logsh "【$service】" "加载$appname配置..." 23 | [ ! -f /etc/aria2.session ] && touch /etc/aria2.session 24 | 25 | [ ! -z "$port" ] && sed -i "s/^.*rpc-listen-port.*$/rpc-listen-port=$port/" $CONF/$appname.conf 26 | 27 | if [ ! -z "$token" ]; then 28 | sed -i "s/^.*rpc-secret.*$/rpc-secret=$token/" $CONF/$appname.conf 29 | else 30 | sed -i "s/^.*rpc-secret.*$/#rpc-secret=/" $CONF/$appname.conf 31 | fi 32 | 33 | sed -i "s#dir.*#dir=$path#" $CONF/$appname.conf 34 | 35 | [ ! -d "$path" ] && mkdir -p $path 36 | 37 | #R3加载库文件 38 | [ "$xq" == "R3" -o "$xq" == "R1CM" ] && export LD_LIBRARY_PATH=$monlorpath/apps/$appname/lib:/usr/lib:/lib 39 | 40 | if [ ! -d /tmp/syslogbackup/$appname ]; then 41 | logsh "【$service】" "生成$appname本地web页面" 42 | mkdir -p /tmp/syslogbackup &> /dev/null 43 | ln -s $WEBDIR/AriaNG /tmp/syslogbackup/$appname > /dev/null 2>&1 44 | fi 45 | #添加定时重启任务 46 | cru a $appname "0 6 * * * $monlorpath/apps/$appname/script/$appname.sh restart" 47 | 48 | } 49 | 50 | start () { 51 | 52 | result=$(ps | grep $BIN/$appname | grep -v grep | wc -l) 53 | if [ "$result" != '0' ];then 54 | logsh "【$service】" "$appname已经在运行!" 55 | exit 1 56 | fi 57 | logsh "【$service】" "正在启动$appname服务... " 58 | 59 | set_config 60 | 61 | iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 62 | service_start $BIN/$appname --conf-path=$CONF/$appname.conf -D -l $LOG/$appname.log 63 | if [ $? -ne 0 ]; then 64 | logsh "【$service】" "启动$appname服务失败!" 65 | exit 66 | fi 67 | logsh "【$service】" "启动$appname服务完成!" 68 | logsh "【$service】" "访问[$aria2url]管理服务" 69 | [ -z "$token" ] && tokentext="" || tokentext=token:"$token"@ 70 | logsh "【$service】" "jsonrpc地址:http://"$tokentext""$lanip":"$port"/jsonrpc" 71 | 72 | } 73 | 74 | stop () { 75 | 76 | logsh "【$service】" "正在停止$appname服务... " 77 | service_stop $BIN/$appname 78 | ps | grep $BIN/$appname | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 79 | iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 80 | destroy 81 | } 82 | 83 | destroy() { 84 | if [ "$enable" == '0' ]; then 85 | [ -d /tmp/syslogbackup/$appname ] && rm -rf /tmp/syslogbackup/$appname 86 | cru d $appname 87 | fi 88 | } 89 | 90 | restart () { 91 | 92 | stop 93 | sleep 1 94 | start 95 | 96 | } 97 | 98 | status() { 99 | 100 | result=$(pssh | grep $BIN/$appname | grep -v grep | wc -l) 101 | if [ "$result" == '0' ]; then 102 | echo "未运行" 103 | echo "0" 104 | else 105 | echo "运行端口号: $port" 106 | echo "1" 107 | fi 108 | 109 | } 110 | 111 | backup() { 112 | 113 | mkdir -p $monlorbackup/$appname 114 | cp -rf $CONF/$appname.conf $monlorbackup/$appname/$appname.conf 115 | 116 | } 117 | 118 | recover() { 119 | 120 | cp -rf $monlorbackup/$appname/$appname.conf $CONF/$appname.conf 121 | 122 | } -------------------------------------------------------------------------------- /apps/aria2/script/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | monlorpath=$(uci -q get monlor.tools.path) 4 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 5 | 6 | appname=aria2 7 | [ "$xq" != "R3" -a "$xq" != "R1CM" ] && rm -rf /tmp/$appname/lib -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016-2017 MaysWind (i@mayswind.net) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/web/AriaNG/favicon.ico -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/web/AriaNG/favicon.png -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/web/AriaNG/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/web/AriaNG/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/web/AriaNG/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/web/AriaNG/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/index.manifest: -------------------------------------------------------------------------------- 1 | CACHE MANIFEST 2 | 3 | CACHE: 4 | css/aria-ng-aed476e868.min.css 5 | css/bootstrap-3.3.7.min.css 6 | css/plugins-a7090b9582.min.css 7 | js/angular-packages-1.6.5.min.js 8 | js/aria-ng-32e6c713b1.min.js 9 | js/bootstrap-3.3.7.min.js 10 | js/echarts-common-3.7.1.min.js 11 | js/jquery-2.2.4.min.js 12 | js/moment-with-locales-2.18.1.min.js 13 | js/plugins-7eed010b9e.min.js 14 | fonts/fontawesome-webfont.woff2 15 | index.html 16 | 17 | NETWORK: 18 | * 19 | 20 | SETTINGS: 21 | prefer-online 22 | 23 | # hash: f37bfed7e11b1314fd3548eb389b75c77b11b7b67189c2cd313b34cc4caf7acf -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/robots.txt: -------------------------------------------------------------------------------- 1 | # AriaNg 2 | 3 | User-agent: * 4 | Disallow: / 5 | -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/tileicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/web/AriaNG/tileicon.png -------------------------------------------------------------------------------- /apps/aria2/web/AriaNG/touchicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/aria2/web/AriaNG/touchicon.png -------------------------------------------------------------------------------- /apps/baidupcs/config/baidupcs.uci: -------------------------------------------------------------------------------- 1 | uciset="uci set monlor.baidupcs" 2 | $uciset=config 3 | $uciset.service="BaiduPCS" 4 | $uciset.appname="baidupcs" 5 | $uciset.tools="2.6.6" 6 | -------------------------------------------------------------------------------- /apps/baidupcs/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【BaiduPCS】-------------------- 2 | baidupcs() { 3 | 4 | eval `ucish export baidupcs` 5 | uciset="uci set monlor.$appname" 6 | echo "********* $service ***********" 7 | echo "[百度网盘文件夹同步工具]" 8 | read -p "启动$appname服务?[1/0] " enable 9 | checkread $enable && $uciset.enable="$enable" 10 | if [ "$enable" == '1' ]; then 11 | # Scripts Here 12 | 13 | $monlorpath/apps/$appname/script/$appname.sh restart 14 | else 15 | $monlorpath/apps/$appname/script/$appname.sh stop 16 | fi 17 | 18 | } 19 | #------------------【BaiduPCS】-------------------- 20 | -------------------------------------------------------------------------------- /apps/baidupcs/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.0.0 2 | -------------------------------------------------------------------------------- /apps/baidupcs/script/baidupcs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | eval `ucish export baidupcs` 5 | 6 | START=95 7 | STOP=95 8 | SERVICE_USE_PID=1 9 | SERVICE_WRITE_PID=1 10 | SERVICE_DAEMONIZE=1 11 | EXTRA_COMMANDS=" status backup recover" 12 | EXTRA_HELP=" status Get $appname status" 13 | 14 | start() { 15 | 16 | [ -n "$(pidof $appname)" ] && logsh "【$service】" "$appname已经在运行!" && exit 1 17 | logsh "【$service】" "正在启动$appname服务... " 18 | # Scripts Here 19 | 20 | # iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 21 | service_start $BIN/$appname 22 | [ $? -ne 0 ] && logsh "【$service】" "启动$appname服务失败!" && exit 1 23 | logsh "【$service】" "启动$appname服务完成!" 24 | 25 | } 26 | 27 | stop() { 28 | 29 | logsh "【$service】" "正在停止$appname服务... " 30 | service_stop $BIN/$appname 31 | kill -9 "$(pidof $appname)" 32 | # iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 33 | 34 | } 35 | 36 | restart() { 37 | 38 | stop 39 | sleep 1 40 | start 41 | 42 | } 43 | 44 | status() { 45 | 46 | if [ -z "$(pidof $appname)" ]; then 47 | echo -e "未运行\n0" 48 | else 49 | echo -e "运行中\n1" 50 | fi 51 | } 52 | 53 | backup() { 54 | 55 | mkdir -p $monlorbackup/$appname 56 | echo -n 57 | 58 | } 59 | 60 | recover() { 61 | 62 | echo -n 63 | 64 | } 65 | -------------------------------------------------------------------------------- /apps/easyexplorer/bin/easyexplorer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/easyexplorer/bin/easyexplorer -------------------------------------------------------------------------------- /apps/easyexplorer/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【EasyExplorer】-------------------- 2 | easyexplorer() { 3 | 4 | appname=easyexplorer 5 | service=EasyExplorer 6 | uciset="uci set monlor.$appname" 7 | $uciset=config && $uciset.service=$service 8 | echo "********* $service ***********" 9 | echo "[一款跨设备的文件同步工具]" 10 | read -p "启动$appname服务?[1/0] " enable 11 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 12 | if [ "$enable" == '1' ]; then 13 | read -p "修改$appname文件共享目录(`uci -q get monlor.$appname.share_path || echo $userdisk`)?[1/0] " res 14 | if [ "$res" == '1' ]; then 15 | read -p "请输入$appname文件共享目录(回车默认$userdisk):" res 16 | [ ! -z $res ] && $uciset.share_path="$res" || $uciset.share_path="$userdisk" 17 | fi 18 | echo "请在https://www.ddnsto.com/注册获取秘钥(token)" 19 | token=$(uci -q get monlor.$appname.token) 20 | [ -z $token ] && token="空" 21 | read -p "修改$appname秘钥($token)?[1/0] " res 22 | if [ "$res" == '1' ]; then 23 | read -p "请输入$appname秘钥:" res 24 | $uciset.token="$res" 25 | fi 26 | port=$(uci -q get monlor.$appname.port) || port=8890 27 | read -p "修改$appname运行端口号($port)?[1/0] " res 28 | if [ "$res" == '1' ]; then 29 | read -p "请输入$appname运行端口号:" res 30 | $uciset.port="$res" 31 | fi 32 | fi 33 | 34 | if [ "$enable" == '1' ]; then 35 | $monlorpath/apps/$appname/script/$appname.sh restart 36 | else 37 | $monlorpath/apps/$appname/script/$appname.sh stop 38 | fi 39 | 40 | } 41 | #------------------【EasyExplorer】-------------------- -------------------------------------------------------------------------------- /apps/easyexplorer/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.2.4 2 | -------------------------------------------------------------------------------- /apps/easyexplorer/script/easyexplorer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=EasyExplorer 12 | appname=easyexplorer 13 | EXTRA_COMMANDS=" status backup recover" 14 | EXTRA_HELP=" status Get $appname status" 15 | BIN=$monlorpath/apps/$appname/bin/$appname 16 | # CONF=$monlorpath/apps/$appname/config/$appname.conf 17 | LOG=/var/log/$appname.log 18 | path=$(uci -q get monlor.$appname.share_path) || path="$userdisk" 19 | port=$(uci -q get monlor.$appname.port) || port=8890 20 | 21 | set_config() { 22 | 23 | [ ! -d "$path" ] && mkdir -p $path 24 | token=$(uci -q get monlor.$appname.token) 25 | [ -z "$token" ] && logsh "【$service】" "未配置$appname的密钥" && exit 26 | 27 | } 28 | 29 | start () { 30 | 31 | if [ "$model" != "arm" ]; then 32 | logsh "【$service】" "$appname服务仅支持arm路由器,准备卸载" 33 | $monlorpath/scripts/appmanage.sh del $appname 34 | exit 35 | fi 36 | result=$(ps | grep $BIN | grep -v grep | wc -l) 37 | if [ "$result" != '0' ];then 38 | logsh "【$service】" "$appname已经在运行!" 39 | exit 1 40 | fi 41 | logsh "【$service】" "正在启动$appname服务... " 42 | 43 | set_config 44 | 45 | #iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 46 | service_start $BIN -fe 0.0.0.0:$port -u $token -share $path -c /tmp 47 | if [ $? -ne 0 ]; then 48 | logsh "【$service】" "启动$appname服务失败!" 49 | exit 50 | fi 51 | logsh "【$service】" "启动$appname服务完成!" 52 | logsh "【$service】" "请在浏览器中访问[http://$lanip:$port]" 53 | 54 | } 55 | 56 | stop () { 57 | 58 | logsh "【$service】" "正在停止$appname服务... " 59 | service_stop $BIN 60 | ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 61 | #iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 62 | 63 | } 64 | 65 | restart () { 66 | 67 | stop 68 | sleep 1 69 | start 70 | 71 | } 72 | 73 | status() { 74 | 75 | result=$(pssh | grep $BIN | grep -v grep | wc -l) 76 | if [ "$result" == '0' ]; then 77 | echo "未运行" 78 | echo "0" 79 | else 80 | echo "运行端口号:$port,共享目录: $path" 81 | echo "1" 82 | fi 83 | 84 | } 85 | 86 | backup() { 87 | 88 | mkdir -p $monlorbackup/$appname 89 | echo -n 90 | 91 | } 92 | 93 | recover() { 94 | 95 | echo -n 96 | 97 | } 98 | -------------------------------------------------------------------------------- /apps/entware/config/entware.uci: -------------------------------------------------------------------------------- 1 | appname=entware 2 | uci set monlor.$appname=config 3 | uci set monlor.$appname.service=Entware 4 | uci set monlor.$appname.appname="$appname" 5 | uci set monlor.$appname.tools="2.6.21" 6 | uci set monlor.$appname.newinfo="增加了启动ONMP安装程序的选项" -------------------------------------------------------------------------------- /apps/entware/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【Entware】-------------------- 2 | entware() { 3 | 4 | appname=entware 5 | service=Entware 6 | uciset="uci set monlor.$appname" 7 | echo "********* $service ***********" 8 | echo "[一款开源的包管理工具]" 9 | read -p "启动$appname服务?[1/0] " enable 10 | checkread $enable && $uciset.enable="$enable" 11 | if [ "$enable" == '1' ]; then 12 | path=$(uci -q get monlor.$appname.path) 13 | [ -z $path ] && path="空" 14 | read -p "修改$appname安装路径($path)?[1/0] " res 15 | if [ "$res" == '1' ]; then 16 | read -p "请输入$appname安装路径(回车默认$userdisk/.Entware):" res 17 | [ ! -z $res ] && $uciset.path="$res" || $uciset.path="$userdisk/.Entware" 18 | fi 19 | echo "安装ONMP后,请勿安装工具箱插件HttpFile和KodExplorer" 20 | read -p "启动ONMP安装程序?[1/0] " res 21 | [ "$res" == '1' ] && $uciset.onmp="1" || $uciset.onmp="0" 22 | fi 23 | if [ "$enable" == '1' ]; then 24 | $monlorpath/apps/$appname/script/$appname.sh restart 25 | else 26 | $monlorpath/apps/$appname/script/$appname.sh stop 27 | fi 28 | 29 | } 30 | #------------------【Entware】-------------------- -------------------------------------------------------------------------------- /apps/entware/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.1.9 2 | -------------------------------------------------------------------------------- /apps/entware/script/entware.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | eval `ucish export entware` 12 | EXTRA_COMMANDS=" status backup recover" 13 | EXTRA_HELP=" status Get $appname status" 14 | # port= 15 | BIN=/opt/etc/init.d/rc.unslung 16 | [ -z "$path" ] && path="$userdisk/.Entware" 17 | 18 | init() { 19 | 20 | logsh "【$service】" "初始化$appname服务..." 21 | if [ -z "$path" ]; then 22 | logsh "【$service】" "未配置安装路径!" 23 | exit 24 | fi 25 | [ ! -f $BIN ] && mount -o blind $path /opt > /dev/null 2>&1 26 | [ -z "$profilepath" ] && logsh "【$service】" "工具箱环境变量出现问题!" && end 27 | result1=$(echo $profilepath | grep -c /opt/sbin) 28 | result2=$(echo $libpath | grep -c /opt/lib) 29 | [ "$result1" == '0' ] && uci -q set monlor.tools.profilepath="$profilepath:/opt/bin:/opt/sbin" 30 | [ "$result2" == '0' ] && uci -q set monlor.tools.libpath="$libpath:/opt/lib" 31 | uci commit monlor 32 | 33 | if [ ! -f $path/etc/init.d/rc.unslung ]; then 34 | logsh "【$service】" "检测到第一次运行$appname服务,正在安装..." 35 | mkdir -p $path > /dev/null 2>&1 36 | [ $? -ne 0 ] && logsh "【Tools】" "创建目录失败,检查你的路径是否正确!" && end 37 | umount -lf /opt > /dev/null 2>&1 38 | mount -o blind $path /opt 39 | if [ "$xq" == "R3D" ]; then 40 | wget -O - http://bin.entware.net/armv7sf-k3.2/installer/generic.sh | sh 41 | elif [ "$model" == "arm" ]; then 42 | wget -O - http://bin.entware.net/armv7sf-k2.6/installer/generic.sh | sh 43 | elif [ "$model" == "mips" ]; then 44 | wget -O - http://bin.entware.net/mipselsf-k3.4/installer/generic.sh | sh 45 | else 46 | logsh "【Tools】" "不支持你的路由器!" 47 | end 48 | fi 49 | if [ $? -ne 0 ]; then 50 | logsh "【Tools】" "【$appname】服务安装失败" 51 | umount -lf /opt 52 | rm -rf $path 53 | exit 1 54 | fi 55 | /opt/bin/opkg update 56 | source /etc/profile > /dev/null 2>&1 57 | logsh "【$service】" "安装完成,请运行source /etc/profile使配置生效!" 58 | logsh "【$service】" "如需安装ONMP,参考https://github.com/monlor/ONMP" 59 | fi 60 | # echo >> $monlorpath/config/profile 61 | if [ -z "$(cat $monlorpath/config/profile | grep "alias opkg")" ]; then 62 | echo "alias opkg=/opt/bin/opkg" >> $monlorpath/config/profile 63 | logsh "【$service】" "已修改opkg配置,请运行source /etc/profile生效!" 64 | fi 65 | } 66 | 67 | start () { 68 | 69 | result=$(ps | grep "{$appname}" | grep -v grep | wc -l) 70 | if [ "$result" -gt '2' ];then 71 | logsh "【$service】" "$appname已经在运行!" 72 | exit 1 73 | fi 74 | logsh "【$service】" "正在启动$appname服务... " 75 | 76 | init 77 | 78 | # iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 79 | [ ! -f "$BIN" ] && sleep 2 80 | $BIN start >> /tmp/messages 2>&1 81 | if [ $? -ne 0 ]; then 82 | logsh "【$service】" "启动$appname服务失败!" 83 | exit 84 | else 85 | logsh "【$service】" "$appname服务启动完成" 86 | if [ -f $CONF/relyon.txt ] && [ -n "$(cat $CONF/relyon.txt)" ]; then 87 | logsh "【$service】" "启动依赖$appname的所有插件..." 88 | cat $CONF/relyon.txt | while read line 89 | do 90 | [ -z "$line" ] && continue 91 | uci set monlor.$line.enable=1 92 | if [ "$($monlorpath/apps/$line/script/$line.sh status | tail -1)" == '0' ]; then 93 | $monlorpath/apps/$line/script/$line.sh restart 94 | fi 95 | done 96 | uci commit monlor 97 | fi 98 | [ "$onmp" == '1' ] && sh -c "$(curl -kfsSl https://raw.githubusercontent.com/monlor/ONMP/master/oneclick.sh)" 99 | fi 100 | 101 | } 102 | 103 | stop () { 104 | 105 | logsh "【$service】" "正在停止$appname服务... " 106 | [ "$enable" == '0' ] && destroy 107 | $BIN stop >> /tmp/messages 2>&1 108 | [ -f $BIN ] && umount -lf /opt 109 | # ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 110 | # iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 111 | logsh "【$service】" "停止成功,请运行source /etc/profile使配置生效!" 112 | logsh "【$service】" "若要重置【$appname】服务,删除$path文件并启动即可" 113 | 114 | } 115 | 116 | destroy() { 117 | if [ "$enable" == '0' ]; then 118 | logsh "【$service】" "关闭依赖$appname的所有插件..." 119 | if [ -f $CONF/relyon.txt ]; then 120 | cat $CONF/relyon.txt | while read line 121 | do 122 | [ -z "$line" ] && continue 123 | $monlorpath/apps/$line/script/$line.sh stop 124 | # 后将enable置为0不会运行destroy方法,保存依赖entware的插件列表 125 | uci set monlor.$line.enable=0 126 | done 127 | fi 128 | uci -q set monlor.tools.profilepath="`echo $profilepath | sed -e 's#:/opt/bin:/opt/sbin##g'`" 129 | uci -q set monlor.tools.libpath="`echo $libpath | sed -e 's#:/opt/lib##g'`" 130 | uci commit monlor 131 | sed -i "/alias opkg/d" $monlorpath/config/profile 132 | unalias opkg &> /dev/null 133 | fi 134 | } 135 | 136 | end() { 137 | 138 | uci set monlor.$appname.enable=0 139 | uci commit monlor 140 | stop 141 | exit 1 142 | 143 | } 144 | 145 | restart () { 146 | 147 | stop 148 | sleep 1 149 | start 150 | 151 | } 152 | 153 | status() { 154 | 155 | result1=$(echo $libpath | grep -c "/opt/lib") 156 | result2=$(echo $profilepath | grep -c /opt/sbin) 157 | if [ ! -f $BIN ] || [ -z $path ] || [ "$result1" == '0' ] || [ "$result2" == '0' ]; then 158 | echo "未运行" 159 | echo "0" 160 | else 161 | echo "安装路径: $path" 162 | echo "1" 163 | fi 164 | 165 | } 166 | 167 | backup() { 168 | 169 | mkdir -p $monlorbackup/$appname 170 | echo -n 171 | } 172 | 173 | recover() { 174 | 175 | echo -n 176 | } -------------------------------------------------------------------------------- /apps/fastdick/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【FastDick】-------------------- 2 | fastdick() { 3 | 4 | appname=fastdick 5 | service=FastDick 6 | uciset="uci set monlor.$appname" 7 | $uciset=config && $uciset.service=$service 8 | echo "********* $service ***********" 9 | echo "[迅雷快鸟,快带提速工具]" 10 | read -p "启动$appname服务?[1/0] " enable 11 | checkread $enable && $uciset.enable="$enable" 12 | if [ "$enable" == '1' ]; then 13 | uid=$(uci -q get monlor.$appname.uid) || uid="空" 14 | pwd=$(uci -q get monlor.$appname.pwd) || pwd="空" 15 | peerid=$(uci -q get monlor.$appname.peerid) || peerid="空" 16 | read -p "修改$appname配置($uid, $pwd, $peerid)?[1/0]" res 17 | if [ "$res" == '1' ]; then 18 | read -p "请输入用户名uid(回车跳过):" res 19 | [ ! -z "$res" ] && $uciset.uid="$res" 20 | read -p "请输入密码pwd(回车跳过):" res 21 | [ ! -z "$res" ] && $uciset.pwd="$res" 22 | read -p "请输入peerid(回车跳过):" res 23 | [ ! -z "$res" ] && $uciset.peerid="$res" 24 | fi 25 | fi 26 | if [ "$enable" == '1' ]; then 27 | $monlorpath/apps/$appname/script/$appname.sh restart 28 | else 29 | $monlorpath/apps/$appname/script/$appname.sh stop 30 | fi 31 | 32 | } 33 | #------------------【FastDick】-------------------- -------------------------------------------------------------------------------- /apps/fastdick/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.0.3 2 | -------------------------------------------------------------------------------- /apps/fastdick/script/fastdick.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | service=FastDick 11 | appname=fastdick 12 | EXTRA_COMMANDS=" status backup recover" 13 | EXTRA_HELP=" status Get $appname status" 14 | # port= 15 | BIN=$monlorpath/apps/$appname/bin/$appname 16 | CONF=$monlorpath/apps/$appname/config/$appname.conf 17 | LOG=/var/log/$appname.log 18 | uid=$(uci -q get monlor.$appname.uid) 19 | pwd=$(uci -q get monlor.$appname.pwd) 20 | peerid=$(uci -q get monlor.$appname.peerid) 21 | 22 | set_config() { 23 | 24 | logsh "【$service】" "检查$appname配置" 25 | if [ -z "$uid" ] || [ -z "pwd" ] || [ -z "peerid" ]; then 26 | logsh "【$service】" "$appname用户名或密码为空" 27 | exit 28 | fi 29 | uidline=$(cat $BIN | grep -n uid | head -1 | cut -d: -f1) 30 | pwdline=$(cat $BIN | grep -n pwd | head -1 | cut -d: -f1) 31 | peerline=$(cat $BIN | grep -n peerid | head -1 | cut -d: -f1) 32 | #设置用户名密码 33 | sed -i ""$uidline"s#.*#uid=$uid#" $BIN 34 | sed -i ""$pwdline"s#.*#pwd=$pwd#" $BIN 35 | sed -i ""$peerline"s#.*#peerid=$peerid#" $BIN 36 | 37 | } 38 | 39 | start () { 40 | 41 | result=$(ps | grep $BIN | grep -v grep | wc -l) 42 | if [ "$result" != '0' ];then 43 | logsh "【$service】" "$appname已经在运行!" 44 | exit 1 45 | fi 46 | logsh "【$service】" "正在启动$appname服务... " 47 | set_config 48 | [ -f "$LOG" ] && rm -rf $LOG 49 | # iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 50 | nohup $BIN > /dev/null 2>&1 & 51 | if [ $? -ne 0 ]; then 52 | logsh "【$service】" "启动$appname服务失败!" 53 | exit 54 | fi 55 | logsh "【$service】" "启动$appname服务完成!" 56 | 57 | } 58 | 59 | stop () { 60 | 61 | logsh "【$service】" "正在停止$appname服务... " 62 | ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 63 | killall $BIN > /dev/null 2>&1 64 | # iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 65 | 66 | } 67 | 68 | restart () { 69 | 70 | stop 71 | sleep 1 72 | start 73 | 74 | } 75 | 76 | status() { 77 | 78 | result=$(pssh | grep $BIN | grep -v grep | wc -l) 79 | if [ "$result" == '0' ]; then 80 | echo "未运行" 81 | echo "0" 82 | else 83 | if [ -f $LOG ]; then 84 | info=$(cat $LOG | tail -1) 85 | message=$(echo "$info" | awk -F ',|\{|\}' '{print$8}' | sed -e 's/\"//g' | cut -d':' -f2) 86 | province_name=$(echo "$info" | awk -F ',|\{|\}' '{print$10}' | sed -e 's/\"//g' | cut -d':' -f2) 87 | sp_name=$(echo "$info" | awk -F ',|\{|\}' '{print$14}' | sed -e 's/\"//g' | cut -d':' -f2) 88 | downstream=$(echo "$info" | awk -F ',|\{|\}' '{print$3}' | sed -e 's/\"//g' | cut -d':' -f2) 89 | let downstream=$downstream/1024 > /dev/null 2>&1 90 | if [ "$message" == "提速成功" ]; then 91 | echo "登录用户id: $uid, 运营商: $province_name$sp_name, 下行速度: "$downstream"Mbps" 92 | else 93 | echo "提速异常, 可能还在运行, 请查看日志cat $LOG" 94 | fi 95 | else 96 | echo "提速异常, 账号问题或登录频繁" 97 | fi 98 | echo "1" 99 | fi 100 | 101 | } 102 | 103 | backup() { 104 | mkdir -p $monlorbackup/$appname 105 | echo -n 106 | } 107 | 108 | recover() { 109 | echo -n 110 | } -------------------------------------------------------------------------------- /apps/filebrowser/bin/filebrowser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/filebrowser/bin/filebrowser -------------------------------------------------------------------------------- /apps/filebrowser/bin/filebrowser_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/filebrowser/bin/filebrowser_mips -------------------------------------------------------------------------------- /apps/filebrowser/config/filebrowser.uci: -------------------------------------------------------------------------------- 1 | uciset="uci set monlor.filebrowser" 2 | $uciset=config 3 | $uciset.service="FileBrowser" 4 | $uciset.appname="filebrowser" 5 | $uciset.tools="2.6.13" 6 | $uciset.appinfo="Web文件浏览器" 7 | -------------------------------------------------------------------------------- /apps/filebrowser/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【FileBrowser】-------------------- 2 | filebrowser() { 3 | 4 | eval `ucish export filebrowser` 5 | uciset="uci set monlor.$appname" 6 | echo "********* $service ***********" 7 | echo "[$appinfo]" 8 | read -p "启动$appname服务?[1/0] " enable 9 | checkread $enable && $uciset.enable="$enable" 10 | if [ "$enable" == '1' ]; then 11 | # Scripts Here 12 | [ -z "$port" ] && port=1086 13 | read -p "修改$appname端口号($port)?[1/0] " res 14 | if [ "$res" == '1' ]; then 15 | read -p "请输入端口号:" res 16 | [ -n "$res" ] && $uciset.port="$res" 17 | fi 18 | [ -z "$scope" ] && scope="$userdisk" 19 | read -p "修改$appname默认访问路径($scope)?[1/0] " res 20 | if [ "$res" == '1' ]; then 21 | while(true) 22 | do 23 | read -p "请输入默认访问路径:" res 24 | [ -z "$res" ] && break 25 | if [ ! -d "$res" ]; then 26 | echo "输入的路径不存在!" 27 | else 28 | [ -n "$res" ] && $uciset.scope="$res" 29 | break 30 | fi 31 | done 32 | fi 33 | 34 | $monlorpath/apps/$appname/script/$appname.sh restart 35 | else 36 | $monlorpath/apps/$appname/script/$appname.sh stop 37 | fi 38 | 39 | } 40 | #------------------【FileBrowser】-------------------- 41 | -------------------------------------------------------------------------------- /apps/filebrowser/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.0.0 2 | -------------------------------------------------------------------------------- /apps/filebrowser/script/filebrowser.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | source "$(uci -q get monlor.tools.path)"/scripts/base.sh 3 | eval `ucish export filebrowser` 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | EXTRA_COMMANDS=" status backup recover" 11 | EXTRA_HELP=" status Get $appname status" 12 | 13 | [ -z "$port" ] && port=1086 14 | [ -z "$scope" ] && scope="$userdisk" 15 | 16 | start() { 17 | 18 | [ -n "$(pidof $appname)" ] && logsh "【$service】" "$appname已经在运行!" && exit 1 19 | logsh "【$service】" "正在启动$appname服务... " 20 | cru a "$appname" "0 6 * * * $monlorpath/apps/$appname/script/$appname.sh restart" 21 | # Scripts Here 22 | iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 23 | service_start $BIN/$appname -p $port -d $CONF/$appname.db -l $LOG/$appname.log -s $scope 24 | [ $? -ne 0 ] && logsh "【$service】" "启动$appname服务失败!" && exit 1 25 | logsh "【$service】" "启动$appname服务完成!" 26 | logsh "【$service】" "请在浏览器中访问[http://$lanip:$port],默认用户名密码admin" 27 | 28 | } 29 | 30 | stop() { 31 | 32 | logsh "【$service】" "正在停止$appname服务... " 33 | service_stop $BIN/$appname 34 | kill -9 "$(pidof $appname)" 35 | iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 36 | [ "$enable" == '0' ] && destroy 37 | 38 | } 39 | 40 | destroy() { 41 | 42 | # End app, Scripts here 43 | cru d "$appname" 44 | return 45 | 46 | } 47 | 48 | restart() { 49 | 50 | stop 51 | sleep 1 52 | start 53 | 54 | } 55 | 56 | status() { 57 | 58 | if [ -z "$(pidof $appname)" ]; then 59 | echo -e "未运行\n0" 60 | else 61 | echo -e "运行端口号:$port\n1" 62 | fi 63 | } 64 | 65 | backup() { 66 | 67 | mkdir -p $monlorbackup/$appname 68 | cp -rf $CONF/$appname.db $monlorbackup/$appname 69 | return 70 | 71 | } 72 | 73 | recover() { 74 | 75 | cp -rf $monlorbackup/$appname/$appname.db $CONF 76 | return 77 | 78 | } 79 | -------------------------------------------------------------------------------- /apps/firewall/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【FireWall】-------------------- 2 | firewall() { 3 | 4 | appname=firewall 5 | service=FireWall 6 | uciname=openport 7 | uciset="uci set monlor.$appname" 8 | $uciset=config && $uciset.service=$service 9 | echo "********* $service ***********" 10 | echo "[防火墙端口开放插件]" 11 | read -p "启动$appname服务?[1/0] " enable 12 | checkread $enable && $uciset.enable="$enable" 13 | 14 | if [ "$enable" == '1' ]; then 15 | echo "已开放端口(工具箱插件默认已开通端口): " 16 | allport=$(ucish show) 17 | [ -z "$allport" ] && echo "没有开通端口!" || echo "$allport" 18 | read -p "是否要更改$appname配置?[1/0] " res 19 | if [ "$res" == '1' ]; then 20 | read -p "添加$appname配置?[1/0] " res 21 | if [ "$res" == '1' ]; then 22 | while(true) 23 | do 24 | read -p "请输入配置名称: " name 25 | read -p "请输入开通端口: " port 26 | if [ ! -z "$name" -a ! -z "$port" ]; then 27 | ucish set $name $port 28 | else 29 | echo "配置为空,未添加!" 30 | fi 31 | read -p "继续添加配置?[1/0] " res 32 | [ "$res" == '0' -o -z "$res" ] && break 33 | done 34 | fi 35 | read -p "删除$appname配置?[1/0] " res 36 | if [ "$res" == '1' ]; then 37 | read -p "清空配置再添加?[1/0] " res 38 | [ "$res" == '1' ] && ucish clear 39 | echo "`ucish keys`" 40 | while(true) 41 | do 42 | read -p "请输入要删除的配置名: " res 43 | [ ! -z "$res" ] && ucish del $res 44 | read -p "继续删除配置?[1/0] " res 45 | [ "$res" == '0' -o -z "$res" ] && break 46 | done 47 | fi 48 | fi 49 | fi 50 | 51 | if [ "$enable" == '1' ]; then 52 | $monlorpath/apps/$appname/script/$appname.sh restart 53 | else 54 | $monlorpath/apps/$appname/script/$appname.sh stop 55 | fi 56 | 57 | } 58 | #------------------【FireWall】-------------------- -------------------------------------------------------------------------------- /apps/firewall/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.0.6 2 | -------------------------------------------------------------------------------- /apps/firewall/script/firewall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=FireWall 12 | appname=firewall 13 | uciname=openport 14 | EXTRA_COMMANDS=" status backup recover" 15 | EXTRA_HELP=" status Get $appname status" 16 | # port=1688 17 | BIN=$monlorpath/apps/$appname/bin/$appname 18 | CONF=$monlorpath/apps/$appname/config/$appname.conf 19 | LOG=/var/log/$appname.log 20 | 21 | set_config() { 22 | 23 | logsh "【$service】" "加载$appname配置" 24 | [ -z "`ucish keys`" ] && logsh "【$service】" "未添加$appname配置!" && exit 25 | ucish keys | while read line 26 | do 27 | name="$line" 28 | port=$(ucish get $name) 29 | [ -z "$name" -o -z "$port" ] && return 1 30 | logsh "【$service】" "开放$name的端口号: $port" 31 | iptables -I INPUT -p tcp --dport "$port" -m comment --comment "$appname"-"$name" -j ACCEPT > /dev/null 2>&1 32 | done 33 | return 0 34 | } 35 | 36 | start () { 37 | 38 | result=$(ps | grep $BIN | grep -v grep | wc -l) 39 | if [ "$result" != '0' ];then 40 | logsh "【$service】" "$appname已经在运行!" 41 | exit 1 42 | fi 43 | logsh "【$service】" "正在启动$appname服务... " 44 | 45 | set_config 46 | 47 | # iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 48 | if [ $? -eq 0 ]; then 49 | logsh "【$service】" "启动$appname服务完成!" 50 | else 51 | logsh "【$service】" "开放端口失败,配置出现问题!" 52 | logsh "【$service】" "启动$appname服务失败!" 53 | exit 54 | fi 55 | 56 | 57 | } 58 | 59 | stop () { 60 | 61 | logsh "【$service】" "正在停止$appname服务... " 62 | # iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 63 | iptables -S | grep "$appname"- | sed -e 's/-A/iptables -D/g' > /tmp/clean.sh 64 | chmod +x /tmp/clean.sh 65 | /tmp/clean.sh 66 | rm -rf /tmp/clean.sh 67 | 68 | } 69 | 70 | restart () { 71 | 72 | stop 73 | sleep 1 74 | start 75 | 76 | } 77 | 78 | status() { 79 | 80 | result=$(iptables -S | grep -c "$appname"-) 81 | if [ "$result" != '0' ]; then 82 | echo "运行中" 83 | echo "1" 84 | else 85 | echo "未运行" 86 | echo "0" 87 | fi 88 | 89 | } 90 | 91 | backup() { 92 | 93 | mkdir -p $monlorbackup/$appname 94 | echo -n 95 | } 96 | 97 | recover() { 98 | echo -n 99 | } -------------------------------------------------------------------------------- /apps/frpc/bin/frpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/frpc/bin/frpc -------------------------------------------------------------------------------- /apps/frpc/bin/frpc_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/frpc/bin/frpc_mips -------------------------------------------------------------------------------- /apps/frpc/config/frpc.uci: -------------------------------------------------------------------------------- 1 | appname=frpc 2 | uci set monlor.$appname=config 3 | uci set monlor.$appname.service=Frpc 4 | uci set monlor.$appname.appname="$appname" 5 | uci set monlor.$appname.tools="2.5.28" -------------------------------------------------------------------------------- /apps/frpc/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【Frpc】-------------------- 2 | frpcAdd() { 3 | read -p "请输入$appname名称:" name 4 | [ -z "$name" ] && return 5 | read -p "请输入$appname类型(1.http 2.tcp):" type 6 | read -p "请输入$appname本地ip(回车默认$lanip):" local_ip 7 | read -p "请输入$appname本地端口:" local_port 8 | remote_port="" && domain="" 9 | [ "$type" == '2' ] && read -p "请输入$appname远程访问端口:" remote_port 10 | [ "$type" == '1' ] && read -p "请输入$appname域名(自动识别子域名或自定义域名):" domain 11 | if [ ! -z $name ]; then 12 | [ -z $local_ip ] && local_ip=$lanip 13 | if [ "$type" == '1' ]; then 14 | type=http 15 | elif [ "$type" == '2' ]; then 16 | type=tcp 17 | else 18 | type="输入有误" 19 | fi 20 | read -p "确定要添加配置:$name,$type,$local_ip,$local_port,$remote_port,$domain?[1/0] " res 21 | if [ "$res" == '1' ]; then 22 | ucish set $name "$type,$local_ip,$local_port,$remote_port,$domain" 23 | fi 24 | fi 25 | read -p "添加完成,再添加一个?[1/0] " res 26 | if checkread $res; then 27 | [ "$res" == '1' ] && frpcAdd 28 | fi 29 | } 30 | 31 | frpcDel() { 32 | 33 | frpclist=$(ucish keys) 34 | echo "$appname穿透配置[`echo $frpclist`]" 35 | read -p "请输入要删除的配置名:" res 36 | [ ! -z "$res" ] && ucish del $res 37 | read -p "删除完成,继续删除?[1/0] " res 38 | if checkread $res; then 39 | [ "$res" == '1' ] && frpcDel 40 | fi 41 | } 42 | 43 | frpc() { 44 | 45 | eval `ucish export frpc` 46 | uciset="uci set monlor.$appname" 47 | echo "********* $service ***********" 48 | echo "[内网穿透工具,相对于ngrok资源占用较多]" 49 | read -p "启动$appname服务?[1/0] " enable 50 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 51 | if [ "$enable" == '1' ]; then 52 | echo "1.[0.9.3] 2.[0.17.0] 3.[0.20.0]" 53 | read -p "请选择$appname运行版本(回车不修改,默认最新):" res 54 | case "$res" in 55 | 1) res="0.9.3" ;; 56 | 2) res="0.17.0" ;; 57 | 3) res="0.20.0" ;; 58 | *) res="" ;; 59 | esac 60 | [ -z "$res" ] && [ -z "$runver" ] && res="0.20.0" 61 | [ -n "$res" ] && $uciset.runver="$res" 62 | 63 | [ -z "$server" ] && server="空" 64 | [ -z "$server_port" ] && server_port="空" 65 | [ -z "$token" ] && token="空" 66 | read -p "修改$appname服务器($server, $server_port, $token)?[1/0] " res 67 | if [ "$res" == '1' ]; then 68 | read -p "请输入$appname服务器:" res 69 | [ ! -z "$res" ] && $uciset.server="$res" 70 | read -p "请输入$appname服务器端口:" res 71 | [ ! -z "$res" ] && $uciset.server_port="$res" 72 | read -p "请输入$appname服务器秘钥:" res 73 | [ ! -z "$res" ] && $uciset.token="$res" 74 | if [ "$(uci -q get monlor.$appname.runver)" != "0.9.3" ]; then 75 | read -p "请输入$appname的tcp_mux配置(true/false):" res 76 | [ -n "$res" ] && $uciset.tcp_mux="$res" 77 | read -p "请输入$appname的user配置:" res 78 | [ -n "$res" ] && $uciset.user="$res" 79 | read -p "请输入$appname的协议配置protocol:" res 80 | [ -n "$res" ] && $uciset.protocol="$res" 81 | 82 | fi 83 | fi 84 | frpclist=$(ucish keys) 85 | [ -z "$frpclist" ] && frpclist="空" 86 | echo "$appname穿透配置[`echo $frpclist`]" 87 | read -p "添加$appname穿透配置?[1/0] " res 88 | [ "$res" == '1' ] && frpcAdd 89 | read -p "删除$appname穿透配置?[1/0] " res 90 | [ "$res" == '1' ] && frpcDel 91 | fi 92 | if [ "$enable" == '1' ]; then 93 | $monlorpath/apps/$appname/script/$appname.sh restart 94 | else 95 | $monlorpath/apps/$appname/script/$appname.sh stop 96 | fi 97 | 98 | } 99 | #------------------【Frpc】-------------------- -------------------------------------------------------------------------------- /apps/frpc/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.3.0 -------------------------------------------------------------------------------- /apps/frpc/script/frpc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | eval `ucish export frpc` 12 | EXTRA_COMMANDS=" status backup recover" 13 | EXTRA_HELP=" status Get $appname status" 14 | # port= 15 | [ -z "$tcp_mux" ] && tcp_mux="true" 16 | [ -z "$user" ] && user="monlor" 17 | [ -z "$protocol" ] && protocol="tcp" 18 | [ -z "$runver" ] && runver=0.20.0 19 | 20 | set_config() { 21 | 22 | logsh "【$service】" "生成$appname配置文件" 23 | result=$(uci -q show monlor.$appname | grep server | wc -l) 24 | if [ "$result" == '0' ]; then 25 | logsh "【$service】" "$appname配置出现问题!" 26 | exit 27 | fi 28 | 29 | if [ "$($BIN/$appname -v)" != "$runver" ]; then 30 | logsh "【$service】" "检测到版本号更换,重新下载$appname程序..." 31 | [ "$model" == "mips" ] && tmptext="_mips" || tmptext="" 32 | wgetsh "$BIN/$appname" "$monlorurl/temp/frp-bin/$runver/frpc$tmptext" 33 | [ "$?" -ne 0 ] && logsh "【$service】" "下载$appname程序失败!" && exit 1 34 | fi 35 | 36 | token=$(uci -q get monlor.$appname.token) 37 | cat > $CONF/$appname.conf <<-EOF 38 | [common] 39 | server_addr = $server 40 | server_port = $server_port 41 | log_file = $LOG/$appname.log 42 | log_level = info 43 | log_max_days = 1 44 | EOF 45 | if [ "$runver" != "0.9.3" ]; then 46 | echo "token = $token" >> $CONF/$appname.conf 47 | echo "tcp_mux = $tcp_mux" >> $CONF/$appname.conf 48 | echo "user = $user" >> $CONF/$appname.conf 49 | echo "protocol = $protocol" >> $CONF/$appname.conf 50 | else 51 | echo "privilege_token = $token" >> $CONF/$appname.conf 52 | fi 53 | ucish keys | while read line 54 | do 55 | [ -z "$line" ] || [ ${line:0:1} == "#" ] && continue 56 | echo >> $CONF/$appname.conf 57 | name="$line" 58 | info=$(ucish get $name) 59 | echo "[$name]" >> $CONF/$appname.conf 60 | type=`cutsh $info 1` 61 | [ "$type" != "http" -a "$type" != "tcp" ] && logsh "【$service】" "节点$name类型设置错误!" && exit 62 | echo "type = $type" >> $CONF/$appname.conf 63 | echo "local_ip = `cutsh $info 2`" >> $CONF/$appname.conf 64 | echo "local_port = `cutsh $info 3`" >> $CONF/$appname.conf 65 | if [ "$type" == "tcp" -o "$type" == "udp" ]; then 66 | echo "remote_port = `cutsh $info 4`" >> $CONF/$appname.conf 67 | logsh "【$service】" "加载$appname配置:【$name】启动为tcp/udp模式,端口号:[`cutsh $line 4`]" 68 | fi 69 | if [ "$type" == "http" -o "$type" == "https" ]; then 70 | domain=`cutsh $info 5` 71 | if [ `echo $domain | grep "\." | wc -l` -eq 0 ]; then 72 | echo "subdomain = $domain" >> $CONF/$appname.conf 73 | logsh "【$service】" "加载$appname配置:【$name】启动为http/https子域名模式,域名:[$domain]" 74 | else 75 | echo "custom_domain = $domain" >> $CONF/$appname.conf 76 | logsh "【$service】" "加载$appname配置:【$name】启动为http/https自定义域名模式,域名:[$domain]" 77 | fi 78 | fi 79 | echo "use_encryption = true" >> $CONF/$appname.conf 80 | echo "use_gzip = false" >> $CONF/$appname.conf 81 | done 82 | 83 | } 84 | 85 | start () { 86 | 87 | result=$(ps | grep $BIN/$appname | grep -v grep | wc -l) 88 | if [ "$result" != '0' ];then 89 | logsh "【$service】" "$appname已经在运行!" 90 | exit 1 91 | fi 92 | logsh "【$service】" "正在启动$appname服务... " 93 | cru a "$appname" "0 6 * * * $monlorpath/apps/$appname/script/$appname.sh restart" 94 | set_config 95 | 96 | # iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 97 | service_start $BIN/$appname -c $CONF/$appname.conf 98 | if [ $? -ne 0 ]; then 99 | logsh "【$service】" "启动$appname服务失败!" 100 | exit 101 | fi 102 | logsh "【$service】" "启动$appname服务完成!" 103 | 104 | } 105 | 106 | stop () { 107 | 108 | logsh "【$service】" "正在停止$appname服务... " 109 | service_stop $BIN/$appname 110 | ps | grep $BIN/$appname | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 111 | # iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 112 | rm -rf $CONF/$appname.conf > /dev/null 2>&1 113 | [ "$enable" == '0' ] && destroy 114 | 115 | } 116 | 117 | destroy() { 118 | 119 | cru d "$appname" 120 | 121 | } 122 | 123 | restart () { 124 | 125 | stop 126 | sleep 1 127 | start 128 | 129 | } 130 | 131 | status() { 132 | 133 | result=$(pssh | grep $BIN/$appname | grep -v grep | wc -l) 134 | if [ "$result" == '0' ]; then 135 | echo "未运行" 136 | echo "0" 137 | else 138 | echo "运行服务器: $server:$server_port" 139 | echo "1" 140 | fi 141 | 142 | } 143 | 144 | backup() { 145 | 146 | mkdir -p $monlorbackup/$appname 147 | 148 | } 149 | 150 | recover() { 151 | 152 | echo -n 153 | 154 | } -------------------------------------------------------------------------------- /apps/frpc/script/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | appname=frpc 6 | uciname=info 7 | frplist=$monlorpath/apps/$appname/config/frplist 8 | if [ -f $frplist ]; then 9 | cat $frplist | while read line 10 | do 11 | name=$(echo $line | cutsh 1) 12 | type=$(echo $line | cutsh 2) 13 | localip=$(echo $line | cutsh 3) 14 | localport=$(echo $line | cutsh 4) 15 | remoteport=$(echo $line | cutsh 5) 16 | domain=$(echo $line | cutsh 6) 17 | ucish set $name "$type,$localip,$localport,$remoteport,$domain" 18 | done 19 | [ $? -eq 0 ] && rm -rf $frplist 20 | fi 21 | [ -x $monlorpath/apps/$appname/bin/$appname ] && rm -rf /tmp/$appname/bin/$appname -------------------------------------------------------------------------------- /apps/httpfile/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【HttpFile】-------------------- 2 | httpfile() { 3 | 4 | appname=httpfile 5 | service=HttpFile 6 | uciset="uci set monlor.$appname" 7 | $uciset=config && $uciset.service=$service 8 | echo "********* $service ***********" 9 | echo "[基于Nginx的文件下载服务器,需要entware环境]" 10 | read -p "启动$appname服务?[1/0] " enable 11 | checkread $enable && $uciset.enable="$enable" 12 | if [ "$enable" == '1' ]; then 13 | echo "$appname全部配置: " 14 | allinfo=$(ucish show) 15 | [ -z "$allinfo" ] && echo "未添加配置!" || echo "$allinfo" 16 | read -p "是否要更改$appname配置?[1/0] " res 17 | if [ "$res" == '1' ]; then 18 | read -p "添加$appname配置?[1/0] " res 19 | if [ "$res" == '1' ]; then 20 | while(true) 21 | do 22 | read -p "请输入$appname配置名称: " name 23 | read -p "请输入$appname运行端口号: " port 24 | read -p "请输入$appname访问路径: " path 25 | if [ -z "$name" -o -z "$port" -o -z "$path" ]; then 26 | echo "配置不能为空,未添加!" 27 | else 28 | ucish set $name "$port,$path" 29 | fi 30 | read -p "继续添加配置?[1/0] " res 31 | [ "$res" == '0' -o -z "$res" ] && break 32 | done 33 | fi 34 | read -p "删除$appname配置?[1/0] " res 35 | if [ "$res" == '1' ]; then 36 | read -p "清空配置再添加?[1/0] " res 37 | [ "$res" == '1' ] && ucish clear 38 | echo "["$(ucish keys)"]" 39 | while(true) 40 | do 41 | read -p "请输入要删除的配置名: " res 42 | [ ! -z "$res" ] && ucish del $res 43 | read -p "继续删除配置?[1/0] " res 44 | [ "$res" == '0' -o -z "$res" ] && break 45 | done 46 | fi 47 | fi 48 | 49 | $monlorpath/apps/$appname/script/$appname.sh restart 50 | else 51 | $monlorpath/apps/$appname/script/$appname.sh stop 52 | fi 53 | 54 | } 55 | #------------------【HttpFile】-------------------- -------------------------------------------------------------------------------- /apps/httpfile/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.1.0 -------------------------------------------------------------------------------- /apps/httpfile/script/httpfile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=HttpFile 12 | appname=httpfile 13 | EXTRA_COMMANDS=" status backup recover" 14 | EXTRA_HELP=" status Get $appname status" 15 | # port= 16 | BIN=/opt/sbin/nginx 17 | NGINXCONF=/opt/etc/nginx/nginx.conf 18 | CONF=/opt/etc/nginx/vhost/httpfile.conf 19 | LOG=/var/log/$appname.log 20 | 21 | set_config() { 22 | 23 | result=$(/opt/bin/opkg list-installed | grep -c "^nginx") 24 | [ "$result" == '0' ] && /opt/bin/opkg install nginx 25 | if [ ! -f "$NGINXCONF".bak ]; then 26 | logsh "【$service】" "检测到nginx未配置, 正在配置..." 27 | #修改nginx配置文件 28 | [ ! -x "$BIN" ] && logsh "【$service】" "nginx未安装" && exit 29 | [ ! -f "$NGINXCONF" ] && logsh "【$service】" "未找到nginx配置文件!" && exit 30 | cp $NGINXCONF $NGINXCONF.bak 31 | cat > "$NGINXCONF" <<-\EOF 32 | user root; 33 | pid /opt/var/run/nginx.pid; 34 | worker_processes auto; 35 | worker_rlimit_nofile 65535; 36 | 37 | events { 38 | worker_connections 1024; 39 | } 40 | 41 | http { 42 | 43 | include mime.types; 44 | sendfile on; 45 | default_type application/octet-stream; 46 | keepalive_timeout 65; 47 | client_max_body_size 4G; 48 | include /opt/etc/nginx/vhost/*.conf; 49 | 50 | } 51 | EOF 52 | fi 53 | # 生成配置文件 54 | logsh "【$service】" "生成$appname配置文件..." 55 | [ ! -d "/opt/etc/nginx/vhost" ] && mkdir -p /opt/etc/nginx/vhost 56 | [ -z "`ucish keys`" ] && logsh "【$service】" "未添加$appname配置!" && exit 57 | rm -rf $CONF 58 | ucish keys | while read line 59 | do 60 | port=$(ucish get $line | cutsh 1) 61 | path=$(ucish get $line | cutsh 2) 62 | cat >> "$CONF" <<-\EOF 63 | server { 64 | listen port; 65 | server_name httpfile; 66 | charset utf-8; 67 | location / { 68 | root directory; 69 | index index.php index.html index.htm; 70 | autoindex on; 71 | autoindex_exact_size off; 72 | autoindex_localtime on; 73 | } 74 | } 75 | EOF 76 | sed -i "s/port/$port/" $CONF 77 | sed -i "s#directory#$path#" $CONF 78 | logsh "【$service】" "加载$appname配置:[端口号:$port, 路径:$path]" 79 | iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 80 | done 81 | #添加entware识别 82 | sed -i "/$appname/d" $monlorpath/apps/entware/config/relyon.txt &> /dev/null 83 | echo "$appname" >> $monlorpath/apps/entware/config/relyon.txt 84 | } 85 | 86 | start () { 87 | 88 | result=$(ps | grep nginx | grep -v sysa | grep -v grep | wc -l) 89 | if [ "$result" != '0' ] && [ -f "$CONF" ];then 90 | logsh "【$service】" "$appname已经在运行!" 91 | exit 1 92 | fi 93 | # result=$(ps | grep entware.sh | grep -v grep | wc -l) 94 | # if [ "$result" != '0' ];then 95 | # logsh "【$service】" "检测到【Entware】正在运行,现在启用$appname可能会冲突" 96 | # exit 1 97 | # fi 98 | logsh "【$service】" "正在启动$appname服务... " 99 | # 检查entware 100 | result1=$(uci -q get monlor.entware) 101 | result2=$(ls /opt | grep etc) 102 | if [ -z "$result1" ] || [ -z "$result2" ]; then 103 | logsh "【$service】" "检测到【Entware】服务未启动或未安装" 104 | end 105 | else 106 | result3=$(echo $PATH | grep opt) 107 | [ -z "$result3" ] && export PATH=/opt/bin/:/opt/sbin:$PATH 108 | fi 109 | 110 | set_config 111 | 112 | [ ! -f "/opt/etc/init.d/S80nginx" ] && logsh "【$service】" "未找到启动脚本!" && exit 113 | /opt/etc/init.d/S80nginx stop &> /dev/null 114 | /opt/etc/init.d/S80nginx start >> /tmp/messages 2>&1 115 | if [ $? -ne 0 ]; then 116 | logsh "【$service】" "启动$appname服务失败!" 117 | exit 118 | fi 119 | logsh "【$service】" "启动$appname服务完成!" 120 | 121 | } 122 | 123 | stop () { 124 | 125 | logsh "【$service】" "正在停止$appname服务... " 126 | [ "$(uci -q get monlor.$appname.enable)" == '0' ] && destroy 127 | rm -rf $CONF 128 | result1=$(uci -q get monlor.kodexplorer.enable) 129 | result2=$(uci -q get monlor.$appname.enable) 130 | if [ "$result1" == '1' -a "$result2" == '0' ]; then 131 | /opt/etc/init.d/S80nginx restart >> /tmp/messages 2>&1 132 | else 133 | /opt/etc/init.d/S80nginx stop >> /tmp/messages 2>&1 134 | fi 135 | iptables -S | grep monlor-$appname | sed -e "s/-A/iptables -D/g" > /tmp/clean.sh 136 | chmod +x /tmp/clean.sh && /tmp/clean.sh && rm -rf /tmp/clean.sh 137 | 138 | } 139 | 140 | destroy() { 141 | #清除entware识别 142 | sed -i "/$appname/d" $monlorpath/apps/entware/config/relyon.txt 143 | } 144 | 145 | end() { 146 | 147 | stop 148 | uci set monlor.$appname.enable=0 149 | uci commit monlor 150 | exit 1 151 | 152 | } 153 | 154 | restart () { 155 | 156 | stop 157 | sleep 1 158 | start 159 | 160 | } 161 | 162 | status() { 163 | 164 | result=$(pssh | grep nginx | grep -v sysa | grep -v grep | wc -l) 165 | if [ "$result" != '0' ] && [ -f "$CONF" ]; then 166 | echo "运行中" 167 | echo "1" 168 | else 169 | echo "未运行" 170 | echo "0" 171 | fi 172 | 173 | } 174 | 175 | backup() { 176 | 177 | mkdir -p $monlorbackup/$appname 178 | echo -n 179 | } 180 | 181 | recover() { 182 | echo -n 183 | } -------------------------------------------------------------------------------- /apps/jetbrains/bin/jetbrains: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/jetbrains/bin/jetbrains -------------------------------------------------------------------------------- /apps/jetbrains/bin/jetbrains_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/jetbrains/bin/jetbrains_mips -------------------------------------------------------------------------------- /apps/jetbrains/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【Jetbrains】-------------------- 2 | jetbrains() { 3 | 4 | appname=jetbrains 5 | service=JetBrains 6 | uciset="uci set monlor.$appname" 7 | $uciset=config && $uciset.service=$service 8 | echo "********* $service ***********" 9 | echo "[快速搭建JetBrains激活服务器]" 10 | read -p "启动$appname服务?[1/0] " enable 11 | checkread $enable && $uciset.enable="$enable" 12 | 13 | if [ "$enable" == '1' ]; then 14 | $monlorpath/apps/$appname/script/$appname.sh restart 15 | else 16 | $monlorpath/apps/$appname/script/$appname.sh stop 17 | fi 18 | 19 | } 20 | #------------------【JetBrains】-------------------- -------------------------------------------------------------------------------- /apps/jetbrains/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.0 -------------------------------------------------------------------------------- /apps/jetbrains/script/jetbrains.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=JetBrains 12 | appname=jetbrains 13 | EXTRA_COMMANDS=" status backup recover" 14 | EXTRA_HELP=" status Get $appname status" 15 | port=1001 16 | BIN=$monlorpath/apps/$appname/bin/$appname 17 | CONF=$monlorpath/apps/$appname/config/$appname.conf 18 | LOG=/var/log/$appname.log 19 | 20 | start () { 21 | 22 | result=$(ps | grep $BIN | grep -v grep | wc -l) 23 | if [ "$result" != '0' ];then 24 | logsh "【$service】" "$appname已经在运行!" 25 | exit 1 26 | fi 27 | logsh "【$service】" "正在启动$appname服务... " 28 | 29 | iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 30 | service_start $BIN -p $port 31 | if [ $? -ne 0 ]; then 32 | logsh "【$service】" "启动$appname服务失败!" 33 | exit 34 | fi 35 | logsh "【$service】" "启动$appname服务完成!" 36 | logsh "【$service】" "激活服务器地址为:[http://$lanip:$port]" 37 | 38 | } 39 | 40 | stop () { 41 | 42 | logsh "【$service】" "正在停止$appname服务... " 43 | service_stop $BIN 44 | ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 45 | iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 46 | 47 | } 48 | 49 | restart () { 50 | 51 | stop 52 | sleep 1 53 | start 54 | 55 | } 56 | 57 | status() { 58 | 59 | result=$(pssh | grep $BIN | grep -v grep | wc -l) 60 | if [ "$result" == '0' ]; then 61 | echo "未运行" 62 | echo "0" 63 | else 64 | echo "运行端口号: $port" 65 | echo "1" 66 | fi 67 | 68 | } 69 | 70 | backup() { 71 | 72 | mkdir -p $monlorbackup/$appname 73 | echo -n 74 | } 75 | 76 | recover() { 77 | echo -n 78 | } -------------------------------------------------------------------------------- /apps/kms/bin/kms: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/kms/bin/kms -------------------------------------------------------------------------------- /apps/kms/bin/kms_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/kms/bin/kms_mips -------------------------------------------------------------------------------- /apps/kms/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【Kms】-------------------- 2 | kms() { 3 | 4 | appname=kms 5 | service=Kms 6 | uciset="uci set monlor.$appname" 7 | $uciset=config && $uciset.service=$service 8 | echo "********* $service ***********" 9 | echo "[快速搭建Windows、Office激活服务器]" 10 | read -p "启动$appname服务?[1/0] " enable 11 | checkread $enable && $uciset.enable="$enable" 12 | 13 | if [ "$enable" == '1' ]; then 14 | $monlorpath/apps/$appname/script/$appname.sh restart 15 | else 16 | $monlorpath/apps/$appname/script/$appname.sh stop 17 | fi 18 | 19 | } 20 | #------------------【Kms】-------------------- -------------------------------------------------------------------------------- /apps/kms/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.1.2 2 | -------------------------------------------------------------------------------- /apps/kms/script/kms.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=Kms 12 | appname=kms 13 | EXTRA_COMMANDS=" status backup recover" 14 | EXTRA_HELP=" status Get $appname status" 15 | port=1688 16 | BIN=$monlorpath/apps/$appname/bin/$appname 17 | CONF=$monlorpath/apps/$appname/config/$appname.conf 18 | LOG=/var/log/$appname.log 19 | 20 | set_config() { 21 | 22 | echo -e "srv-host=_vlmcs._tcp,XiaoQiang,1688,0,100\ndomain=lan" > /etc/dnsmasq.d/kms.conf 23 | /etc/init.d/dnsmasq reload 24 | 25 | } 26 | 27 | start () { 28 | 29 | result=$(ps | grep $BIN | grep -v grep | wc -l) 30 | if [ "$result" != '0' ];then 31 | logsh "【$service】" "$appname已经在运行!" 32 | exit 1 33 | fi 34 | logsh "【$service】" "正在启动$appname服务... " 35 | 36 | set_config 37 | 38 | iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 39 | service_start $BIN -i $CONF -l $LOG 40 | if [ $? -ne 0 ]; then 41 | logsh "【$service】" "启动$appname服务失败!" 42 | exit 43 | fi 44 | logsh "【$service】" "启动$appname服务完成!" 45 | 46 | } 47 | 48 | stop () { 49 | 50 | logsh "【$service】" "正在停止$appname服务... " 51 | service_stop $BIN 52 | ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 53 | iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 54 | 55 | } 56 | 57 | restart () { 58 | 59 | stop 60 | sleep 1 61 | start 62 | 63 | } 64 | 65 | status() { 66 | 67 | result=$(pssh | grep $BIN | grep -v grep | wc -l) 68 | if [ "$result" == '0' ]; then 69 | echo "未运行" 70 | echo "0" 71 | else 72 | echo "运行端口号: $port" 73 | echo "1" 74 | fi 75 | 76 | } 77 | 78 | backup() { 79 | 80 | mkdir -p $monlorbackup/$appname 81 | echo -n 82 | } 83 | 84 | recover() { 85 | echo -n 86 | } -------------------------------------------------------------------------------- /apps/kodexplorer/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【KodExplorer】-------------------- 2 | kodexplorer() { 3 | 4 | appname=kodexplorer 5 | service=KodExplorer 6 | uciset="uci set monlor.$appname" 7 | $uciset=config && $uciset.service=$service 8 | echo "********* $service ***********" 9 | echo "[可道云,在线文档管理器,需要entware环境]" 10 | read -p "启动$appname服务?[1/0] " enable 11 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 12 | if [ "$enable" == '1' ]; then 13 | read -p "修改$appname端口号(`uci -q get monlor.$appname.port || echo 81`)?[1/0] " res 14 | if [ "$res" == '1' ]; then 15 | read -p "请输入$appname端口号(默认81):" res 16 | [ ! -z $res ] && $uciset.port="$res" || $uciset.port=81 17 | fi 18 | read -p "修改$appname管理目录(`uci -q get monlor.$appname.path || echo $userdisk`)?[1/0] " res 19 | if [ "$res" == '1' ]; then 20 | read -p "请输入$appname管理目录(回车默认$userdisk):" res 21 | [ ! -z $res ] && $uciset.path="$res" || $uciset.path="$userdisk" 22 | fi 23 | fi 24 | if [ "$enable" == '1' ]; then 25 | $monlorpath/apps/$appname/script/$appname.sh restart 26 | else 27 | $monlorpath/apps/$appname/script/$appname.sh stop 28 | fi 29 | 30 | } 31 | #------------------【KodExplorer】-------------------- -------------------------------------------------------------------------------- /apps/kodexplorer/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.3.7 2 | -------------------------------------------------------------------------------- /apps/koolproxy/bin/data/gen_ca.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | alias echo_date='echo $(date +%Y年%m月%d日\ %X):' 4 | 5 | if [ ! -f openssl.cnf ]; then 6 | echo_date "Cannot found openssl.cnf" 7 | exit 1 8 | fi 9 | if [ -f $monlorpath/apps/koolproxy/bin/data/private/ca.key.pem ]; then 10 | echo_date "已经又证书了!" 11 | else 12 | echo_date "生成证书中..." 13 | 14 | #step 1, root ca 15 | mkdir -p certs private 16 | rm -f index.txt serial private/ca.key.pem 17 | chmod 700 private 18 | touch index.txt 19 | echo 1000 > serial 20 | ../openssl genrsa -aes256 -passout pass:koolshare -out private/ca.key.pem 2048 21 | chmod 400 private/ca.key.pem 22 | ../openssl req -config openssl.cnf -passin pass:koolshare \ 23 | -subj "/C=CN/ST=Beijing/L=KP/O=KoolProxy inc/CN=koolproxy.com" \ 24 | -key private/ca.key.pem \ 25 | -new -x509 -days 7300 -sha256 -extensions v3_ca \ 26 | -out certs/ca.crt 27 | 28 | #step 2, domain rsa key 29 | ../openssl genrsa -aes256 -passout pass:koolshare -out private/base.key.pem 2048 30 | echo_date "证书生成完毕..." 31 | fi 32 | -------------------------------------------------------------------------------- /apps/koolproxy/bin/data/openssl.cnf: -------------------------------------------------------------------------------- 1 | # OpenSSL root CA configuration file. 2 | # Copy to `/root/ca/openssl.cnf`. 3 | 4 | [ ca ] 5 | # `man ca` 6 | default_ca = CA_default 7 | 8 | [ CA_default ] 9 | # Directory and file locations. 10 | dir = ./ca 11 | certs = $dir/certs 12 | crl_dir = $dir/crl 13 | new_certs_dir = $dir/newcerts 14 | database = $dir/index.txt 15 | serial = $dir/serial 16 | RANDFILE = $dir/private/.rand 17 | 18 | # The root key and root certificate. 19 | private_key = $dir/private/ca.key.pem 20 | certificate = $dir/certs/ca.cert.pem 21 | 22 | # For certificate revocation lists. 23 | crlnumber = $dir/crlnumber 24 | crl = $dir/crl/ca.crl.pem 25 | crl_extensions = crl_ext 26 | default_crl_days = 30 27 | 28 | # SHA-1 is deprecated, so use SHA-2 instead. 29 | default_md = sha256 30 | 31 | name_opt = ca_default 32 | cert_opt = ca_default 33 | default_days = 375 34 | preserve = no 35 | policy = policy_strict 36 | 37 | [ policy_strict ] 38 | # The root CA should only sign intermediate certificates that match. 39 | # See the POLICY FORMAT section of `man ca`. 40 | countryName = match 41 | stateOrProvinceName = match 42 | organizationName = match 43 | organizationalUnitName = optional 44 | commonName = supplied 45 | emailAddress = optional 46 | 47 | [ policy_loose ] 48 | # Allow the intermediate CA to sign a more diverse range of certificates. 49 | # See the POLICY FORMAT section of the `ca` man page. 50 | countryName = optional 51 | stateOrProvinceName = optional 52 | localityName = optional 53 | organizationName = optional 54 | organizationalUnitName = optional 55 | commonName = supplied 56 | emailAddress = optional 57 | 58 | [ req ] 59 | # Options for the `req` tool (`man req`). 60 | default_bits = 2048 61 | distinguished_name = req_distinguished_name 62 | string_mask = utf8only 63 | 64 | # SHA-1 is deprecated, so use SHA-2 instead. 65 | default_md = sha256 66 | 67 | # Extension to add when the -x509 option is used. 68 | x509_extensions = v3_ca 69 | 70 | [ req_distinguished_name ] 71 | # See . 72 | countryName = Country Name (2 letter code) 73 | stateOrProvinceName = State or Province Name 74 | localityName = Locality Name 75 | 0.organizationName = Organization Name 76 | organizationalUnitName = Organizational Unit Name 77 | commonName = Common Name 78 | emailAddress = Email Address 79 | 80 | # Optionally, specify some defaults. 81 | countryName_default = GB 82 | stateOrProvinceName_default = England 83 | localityName_default = 84 | 0.organizationName_default = Alice Ltd 85 | organizationalUnitName_default = 86 | emailAddress_default = 87 | 88 | [ v3_ca ] 89 | # Extensions for a typical CA (`man x509v3_config`). 90 | subjectKeyIdentifier = hash 91 | authorityKeyIdentifier = keyid:always,issuer 92 | basicConstraints = critical, CA:true 93 | keyUsage = critical, digitalSignature, cRLSign, keyCertSign 94 | 95 | [ v3_intermediate_ca ] 96 | # Extensions for a typical intermediate CA (`man x509v3_config`). 97 | subjectKeyIdentifier = hash 98 | authorityKeyIdentifier = keyid:always,issuer 99 | basicConstraints = critical, CA:true, pathlen:0 100 | keyUsage = critical, digitalSignature, cRLSign, keyCertSign 101 | 102 | [ usr_cert ] 103 | # Extensions for client certificates (`man x509v3_config`). 104 | basicConstraints = CA:FALSE 105 | nsCertType = client, email 106 | nsComment = "OpenSSL Generated Client Certificate" 107 | subjectKeyIdentifier = hash 108 | authorityKeyIdentifier = keyid,issuer 109 | keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment 110 | extendedKeyUsage = clientAuth, emailProtection 111 | 112 | [ server_cert ] 113 | # Extensions for server certificates (`man x509v3_config`). 114 | basicConstraints = CA:FALSE 115 | nsCertType = server 116 | nsComment = "OpenSSL Generated Server Certificate" 117 | subjectKeyIdentifier = hash 118 | authorityKeyIdentifier = keyid,issuer:always 119 | keyUsage = critical, digitalSignature, keyEncipherment 120 | extendedKeyUsage = serverAuth 121 | 122 | [ crl_ext ] 123 | # Extension for CRLs (`man x509v3_config`). 124 | authorityKeyIdentifier=keyid:always 125 | 126 | [ ocsp ] 127 | # Extension for OCSP signing certificates (`man ocsp`). 128 | basicConstraints = CA:FALSE 129 | subjectKeyIdentifier = hash 130 | authorityKeyIdentifier = keyid,issuer 131 | keyUsage = critical, digitalSignature 132 | extendedKeyUsage = critical, OCSPSigning 133 | -------------------------------------------------------------------------------- /apps/koolproxy/bin/data/rules/kp.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/koolproxy/bin/data/rules/kp.dat -------------------------------------------------------------------------------- /apps/koolproxy/bin/data/rules/user.txt: -------------------------------------------------------------------------------- 1 | ! ******************************* koolproxy 自定义过滤语法简表 ******************************* 2 | ! ------------------------ 规则基于adblock规则,并进行了语法部分的扩展 ------------------------ 3 | ! ABP规则请参考https://adblockplus.org/zh_CN/filters,下面为大致摘要 4 | ! "!" 为行注释符,注释行以该符号起始作为一行注释语义,用于规则描述 5 | ! "@@" 为白名单符,白名单具有最高优先级,放行过滤的网站,例如:@@||taobao.com 6 | ! ------------------------------------------------------------------------------------------ 7 | ! "*" 为字符通配符,能够匹配0长度或任意长度的字符串,该通配符不能与正则语法混用。 8 | ! "^" 为分隔符,可以是除了字母、数字或者 _ - . % 之外的任何字符。 9 | ! "~" 为排除标识符,通配符能过滤大多数广告,但同时存在误杀, 可以通过排除标识符修正误杀链接。 10 | ! 注:通配符仅在 url 规则中支持,html 规则中不支持 11 | ! ------------------------------------------------------------------------------------------ 12 | ! "|" 为管线符号,来表示地址的最前端或最末端 13 | ! "||" 为子域通配符,方便匹配主域名下的所有子域 14 | ! 用法及例子如下:(以下等号表示等价于) 15 | ! ||xx.com/ad = http://xx.com/ad* || http://*.xx.com/ad* 16 | ! ||http://xx.com/ad = http://xx.com/ad* || http://*.xx.com/ad* 17 | ! ||https://xx.com/ad = https://xx.com/ad* || https://*.xx.com/ad* 18 | ! |xx.com/ad = http://xx.com/ad* 19 | ! |http://xx.com/ad = http://xx.com/ad* 20 | ! |https://xx.com/ad = https://xx.com/ad* 21 | ! ad = http://*ad* 22 | ! http://ad = http://*ad* 23 | ! https://ad = 不支持,需要指定域名,如下例 24 | ! https://xx.com/ad = |https://xx.com/ad = https://xx.com/ad* 25 | ! [同时可以表示两个以及两个以上的域名]如下例子 26 | ! https://xx.ad.com 和 https://xxx.xx.ad.com = ||https://ad.com (注意! 由于https的原因使用要非常谨慎,不可以大范围使用) 27 | ! ------------------------------------------------------------------------------------------ 28 | ! 兼容adblock规则的html规则语法,例如: 29 | ! fulldls.com,torrentzap.com##.tp_reccomend_banner 30 | ! 但是推荐写成以下标准写法: 31 | ! ||fulldls.com##.tp_reccomend_banner 32 | ! ||torrentzap.com##.tp_reccomend_banner 33 | ! 如果一个网站html规则有多条,可以合并为这样: 34 | ! ||torrentzap.com##.tp_reccomend_banner,.ad_top,[class="ad_right"]...... 35 | ! ------------------------------------------------------------------------------------------ 36 | ! 文本替换语法:$s@匹配内容@替换内容@ 37 | ! 非标准端口过滤语法:||abc.com:8081/ad.html或者|http://adb.com:8081/ 38 | ! 文本替换例子:|http://cdn.pcbeta.js.inimc.com/data/cache/common.js?$s@old@new@ 39 | ! 重定向语法:$r@匹配内容@替换内容@ 40 | ! 重定向例子:|http://koolshare.cn$r@http://koolshare.cn/*@http://www.qq.com@ 41 | ! 注:文本替换语法及重定向语法中的匹配内容不仅支持通配符功能,而且额外支持以下功能 42 | ! 支持通配符 * 和 ? 表示单个字符 43 | ! 支持全正则匹配,/正则内容/ 表示应用正则匹配 44 | ! 正则替换:替换内容支持 $1 $2 这样的符号 45 | ! 普通替换:替换内容支持 * 这样的符号,表示把命中的内容复制到替换的内容。(类似 $1 $2,但是 * 号会自动计算数字) 46 | ! ------------------------------------------------------------------------------------------ 47 | ! 未来将逐步添加相关语法,兼容adblock puls的更多语法,敬请期待。 48 | ! ****************************************************************************************** 49 | -------------------------------------------------------------------------------- /apps/koolproxy/bin/koolproxy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/koolproxy/bin/koolproxy -------------------------------------------------------------------------------- /apps/koolproxy/bin/koolproxy_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/koolproxy/bin/koolproxy_mips -------------------------------------------------------------------------------- /apps/koolproxy/bin/openssl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/koolproxy/bin/openssl -------------------------------------------------------------------------------- /apps/koolproxy/bin/openssl_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/koolproxy/bin/openssl_mips -------------------------------------------------------------------------------- /apps/koolproxy/config/koolproxy.uci: -------------------------------------------------------------------------------- 1 | appname=koolproxy 2 | uci set monlor.$appname=config 3 | uci set monlor.$appname.service=KoolProxy 4 | uci set monlor.$appname.appname="$appname" 5 | uci set monlor.$appname.tools="2.5.28" -------------------------------------------------------------------------------- /apps/koolproxy/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #----------------【KoolProxy】------------------ 2 | 3 | koolproxy() { 4 | 5 | appname=koolproxy 6 | service=KoolProxy 7 | uciset="uci set monlor.$appname" 8 | $uciset=config && $uciset.service=$service 9 | control=$monlorpath/apps/$appname/config/kpcontrol.conf 10 | [ ! -f "$control" ] && touch $control 11 | echo "********* $service ***********" 12 | echo "[简单,快速屏蔽网页或视频广告]" 13 | read -p "启动$appname服务?[1/0] " enable 14 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 15 | if [ "$enable" == '1' ]; then 16 | echo "[1.全局模式 2.黑名单模式 3.视频模式]" 17 | read -p "请选择$appname模式:" res 18 | if [ "$res" == '1' -o "$res" == '2' -o "$res" == '3' ]; then 19 | $uciset.mode="$res" 20 | fi 21 | read -p "自动更新用户自定义规则?[1/0] " res 22 | checkread $res && $uciset.autorule="$res" 23 | cat $control | while read line 24 | do 25 | name=$(cutsh $line 1) 26 | mode=$(cutsh $line 3) 27 | case "$mode" in 28 | 0) mode="不过滤" ;; 29 | 1) mode="http模式" ;; 30 | 2) mode="https模式" ;; 31 | *) mode="空" ;; 32 | esac 33 | echo "设备[$name]运行模式为: $mode" 34 | done 35 | mode=$(uci -q get monlor.$appname.ss_acl_default_mode) 36 | case "$mode" in 37 | 0) mode="不过滤" ;; 38 | 1) mode="http模式" ;; 39 | 2) mode="https模式" ;; 40 | *) mode="http模式" ;; 41 | esac 42 | echo "其余设备运行模式为: $mode" 43 | read -p "设置局域网http/https控制?[1/0] " res 44 | if [ "$res" == '1' ]; then 45 | read -p "清空之前的配置再添加?[1/0] " res 46 | [ "$res" == '1' ] && echo -n > $control 47 | i=0 48 | cat /tmp/dhcp.leases | while read line 49 | do 50 | name=$(echo $line | cut -d' ' -f4) 51 | mac=$(echo $line | cut -d' ' -f2) 52 | ip=$(echo $line | cut -d' ' -f3) 53 | 54 | let i=$i+1 55 | echo "$i. $name [$ip] [$mac]" 56 | 57 | done 58 | while(true) 59 | do 60 | read -p "请选择一个设备:" res 61 | line=$(cat /tmp/dhcp.leases | grep -n . | grep -w "^$res") 62 | if [ ! -z "$line" ]; then 63 | name=$(echo $line | cut -d' ' -f4) 64 | mac=$(echo $line | cut -d' ' -f2) 65 | read -p "请选择(0.不过滤 1.http 2.https):" res 66 | if [ "$res" == '0' -o "$res" == '1' -o "$res" == '2' ]; then 67 | if [ ! -z "$mac" ]; then 68 | sed -i "/^$name,$mac/d" $control 69 | echo "$name,$mac,$res" >> $control 70 | else 71 | echo "mac不能为空, 添加失败!" 72 | fi 73 | else 74 | echo "输入有误, 添加失败" 75 | fi 76 | else 77 | echo "未找到设备, 添加失败!" 78 | fi 79 | read -p "继续增加设备?[1/0] " res 80 | [ "$res" == '0' ] && break 81 | done 82 | read -p "请选择其余设备(0.不过滤 1.http 2.https) " res 83 | [ "$res" == '0' -o "$res" == '1' -o "$res" == '2' ] && $uciset.koolproxy_acl_default_mode="$res" 84 | 85 | fi 86 | fi 87 | if [ "$enable" == '1' ]; then 88 | $monlorpath/apps/$appname/script/$appname.sh restart 89 | else 90 | $monlorpath/apps/$appname/script/$appname.sh stop 91 | fi 92 | 93 | } 94 | #----------------【KoolProxy】------------------ -------------------------------------------------------------------------------- /apps/koolproxy/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.4.5 2 | -------------------------------------------------------------------------------- /apps/koolproxy/script/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | monlorpath=$(uci -q get monlor.tools.path) 4 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 5 | 6 | appname=koolproxy 7 | openssl=$monlorpath/apps/$appname/bin/data/openssl 8 | [ -f $openssl ] && rm -rf "$openssl" 9 | [ -f "$openssl"_mips ] && rm -rf "$openssl"_mips 10 | if checkuci $appname; then 11 | ver1="`/tmp/$appname/bin/$appname -v`" 12 | ver2="`$monlorpath/apps/$appname/bin/$appname -v`" 13 | compare $ver1 $ver2 || rm -rf /tmp/$appname/bin/$appname 14 | rm -rf /tmp/$appname/bin/data/rules/user.txt 15 | fi -------------------------------------------------------------------------------- /apps/koolproxy/script/updaterules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | monlorpath=$(uci -q get monlor.tools.path) 4 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 5 | eval `ucish export koolproxy` 6 | adurl="https://raw.githubusercontent.com/kysdm/ad-rules/master/user-rules-koolproxy.txt" 7 | 8 | logsh "【$service】" "更新用户自定义规则" 9 | wgetsh $monlorpath/apps/$appname/bin/data/rules/user.txt $adurl 10 | [ $? -ne 0 ] && logsh "【$service】" "更新用户自定义规则失败" -------------------------------------------------------------------------------- /apps/ngrok/bin/ngrok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/ngrok/bin/ngrok -------------------------------------------------------------------------------- /apps/ngrok/bin/ngrok_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/ngrok/bin/ngrok_mips -------------------------------------------------------------------------------- /apps/ngrok/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【Ngrok】-------------------- 2 | ngrokAdd() { 3 | read -p "请输入$appname名称:" name 4 | [ -z "$name" ] && return 5 | read -p "请输入$appname类型(1.http 2.tcp):" type 6 | read -p "请输入$appname本地ip(回车默认192.168.31.1):" local_ip 7 | read -p "请输入$appname本地端口:" local_port 8 | [ "$type" == '2' ] && read -p "请输入$appname远程访问端口:" remote_port 9 | [ "$type" == '1' ] && read -p "请输入$appname域名(自动识别子域名或自定义域名):" domain 10 | if [ ! -z $name ]; then 11 | [ -z $local_ip ] && local_ip=192.168.31.1 12 | if [ "$type" == '1' ]; then 13 | type=http 14 | elif [ "$type" == '2' ]; then 15 | type=tcp 16 | else 17 | type="输入有误" 18 | fi 19 | read -p "确定要添加配置:$name,$type,$local_ip,$local_port,$remote_port,$domain?[1/0] " res 20 | if [ "$res" == '1' ]; then 21 | sed -i "/^$name,/d" $NGLIST 22 | echo "$name,$type,$local_ip,$local_port,$remote_port,$domain" >> $NGLIST 23 | fi 24 | fi 25 | read -p "添加完成,再添加一个?[1/0] " res 26 | if checkread $res; then 27 | [ "$res" == '1' ] && ngrokAdd 28 | fi 29 | } 30 | 31 | ngrokDel() { 32 | ngroklist=$(cat $NGLIST | cut -d, -f1) 33 | echo "$appname穿透配置[`echo $ngroklist`]" 34 | read -p "请输入要删除的配置名:" res 35 | [ ! -z "$res" ] && sed -i "/^$res,/d" $NGLIST 36 | read -p "删除完成,继续删除?[1/0] " res 37 | if checkread $res; then 38 | [ "$res" == '1' ] && ngrokDel 39 | fi 40 | } 41 | 42 | ngrok() { 43 | appname=ngrok 44 | service=Ngrok 45 | NGLIST=$monlorpath/apps/ngrok/config/ngroklist 46 | [ ! -f $NGLIST ] && touch $NGLIST 47 | uciset="uci set monlor.$appname" 48 | $uciset=config && $uciset.service=$service 49 | echo "********* $service ***********" 50 | echo "[轻量级的内网穿透工具]" 51 | read -p "启动$appname服务?[1/0] " enable 52 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 53 | if [ "$enable" == '1' ]; then 54 | ser_host=$(uci -q get monlor.$appname.ser_host) 55 | ser_port=$(uci -q get monlor.$appname.ser_port) 56 | ser_token=$(uci -q get monlor.$appname.ser_token) 57 | [ -z $ser_host ] && ser_host="空" 58 | [ -z $ser_port ] && ser_port="空" 59 | [ -z $ser_token ] && ser_token="空" 60 | read -p "修改$appname服务器($ser_host, $ser_port, $ser_token)?[1/0] " res 61 | if [ "$res" == '1' ]; then 62 | read -p "请输入$appname服务器:" res 63 | $uciset.ser_host="$res" 64 | read -p "请输入$appname服务器端口:" res 65 | $uciset.ser_port="$res" 66 | read -p "请输入$appname服务器秘钥:" res 67 | $uciset.ser_token="$res" 68 | fi 69 | ngroklist=$(cat $NGLIST | cut -d, -f1) 70 | [ -z "$ngroklist" ] && ngroklist="空" 71 | echo "$appname穿透配置[`echo $ngroklist`]" 72 | read -p "添加$appname穿透配置?[1/0] " res 73 | [ "$res" == '1' ] && ngrokAdd 74 | read -p "删除$appname穿透配置?[1/0] " res 75 | [ "$res" == '1' ] && ngrokDel 76 | fi 77 | if [ "$enable" == '1' ]; then 78 | $monlorpath/apps/$appname/script/$appname.sh restart 79 | else 80 | $monlorpath/apps/$appname/script/$appname.sh stop 81 | fi 82 | 83 | } 84 | #------------------【Ngrok】-------------------- -------------------------------------------------------------------------------- /apps/ngrok/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.0.2 2 | -------------------------------------------------------------------------------- /apps/ngrok/script/ngrok.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=Ngrok 12 | appname=ngrok 13 | EXTRA_COMMANDS=" status backup recover" 14 | EXTRA_HELP=" status Get $appname status" 15 | # port= 16 | BIN=$monlorpath/apps/$appname/bin/$appname 17 | CONF=$monlorpath/apps/$appname/config/ngroklist 18 | LOG=/var/log/$appname.log 19 | ser_host=$(uci -q get monlor.$appname.ser_host) 20 | ser_port=$(uci -q get monlor.$appname.ser_port) 21 | 22 | set_config() { 23 | 24 | local cmdstr="" 25 | ser_token=$(uci -q get monlor.$appname.ser_token) 26 | while read line 27 | do 28 | [ `echo $line | grep -c "^#"` -ne 0 ] && continue 29 | type=`echo $line | awk -F ',' '{print$2}'` 30 | lhost=`echo $line | awk -F ',' '{print$3}'` 31 | lport=`echo $line | awk -F ',' '{print$4}'` 32 | rport=`echo $line | awk -F ',' '{print$5}'` 33 | domain=`echo $line | awk -F ',' '{print$6}'` 34 | if [ "$type" == "tcp" ]; then 35 | cmdstr="$cmdstr -AddTun[Type:$type,Lhost:$lhost,Lport:$lport,Rport:$rport]" 36 | else 37 | if [ `echo $domain | grep "\." | wc -l` -ne 0 ]; then 38 | cmdstr="$cmdstr -AddTun[Type:$type,Lhost:$lhost,Lport:$lport,Hostname:$domain]" 39 | else 40 | cmdstr="$cmdstr -AddTun[Type:$type,Lhost:$lhost,Lport:$lport,Sdname:$domain]" 41 | fi 42 | fi 43 | done < $CONF 44 | [ -z "$cmdstr" ] || cmdstr="$BIN -SER[Shost:$ser_host,Sport:$ser_port,Password:$ser_token]$cmdstr" 45 | echo $cmdstr 46 | 47 | } 48 | 49 | start () { 50 | 51 | result=$(ps | grep $BIN | grep -v grep | wc -l) 52 | if [ "$result" != '0' ];then 53 | logsh "【$service】" "$appname已经在运行!" 54 | exit 1 55 | fi 56 | logsh "【$service】" "正在启动$appname服务... " 57 | [ -z "$ser_host" -o -z "$ser_port" ] && logsh "【$service】" "$appname未配置" && exit 58 | runstr=`set_config` 59 | # iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 60 | service_start $runstr 61 | if [ $? -ne 0 ]; then 62 | logsh "【$service】" "启动$appname服务失败!" 63 | exit 64 | fi 65 | logsh "【$service】" "启动$appname服务完成!" 66 | 67 | } 68 | 69 | stop () { 70 | 71 | logsh "【$service】" "正在停止$appname服务... " 72 | service_stop $BIN 73 | ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 74 | # iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 75 | 76 | } 77 | 78 | restart () { 79 | 80 | stop 81 | sleep 1 82 | start 83 | 84 | } 85 | 86 | status() { 87 | 88 | result=$(pssh | grep $BIN | grep -v grep | wc -l) 89 | if [ "$result" == '0' ]; then 90 | echo "未运行" 91 | echo "0" 92 | else 93 | echo "运行服务器: $ser_host:$ser_port" 94 | echo "1" 95 | fi 96 | 97 | } 98 | 99 | backup() { 100 | 101 | mkdir -p $monlorbackup/$appname 102 | cp -rf $CONF $monlorbackup/$appname/$appname.conf 103 | 104 | } 105 | 106 | recover() { 107 | 108 | cp -rf $monlorbackup/$appname/$appname.conf $CONF 109 | 110 | } -------------------------------------------------------------------------------- /apps/qiandao/bin/qiandao: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/qiandao/bin/qiandao -------------------------------------------------------------------------------- /apps/qiandao/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【QianDao】-------------------- 2 | qiandao() { 3 | 4 | eval `ucish export qiandao` 5 | uciset="uci set monlor.$appname" 6 | echo "********* $service ***********" 7 | echo "[koolshare merlin 自动签到程序]" 8 | read -p "启动$appname服务?[1/0] " enable 9 | checkread $enable && $uciset.enable="$enable" 10 | if [ "$enable" == '1' ]; then 11 | # Scripts Here 12 | qiandaos="koolshare baidu v2ex hostloc acfun bilibili smzdm xiami 163music miui 52pojie kafan right mydigit" 13 | echo "支持签到的网站:" 14 | i=1 15 | echo "$qiandaos" | tr " " "\n" | while read line 16 | do 17 | tmp="" 18 | [ -n "$(uci -q get monlor.$appname.qiandao_"$line"_setting)" ] && tmp="[已设置]" 19 | [ "$(uci -q get monlor.$appname.qiandao_"$line")" == '1' ] && tmp="[已启用]" 20 | echo "$i) $line $tmp" 21 | let i=$i+1 22 | done 23 | while(true) 24 | do 25 | read -p "请选择要签到网站(回车结束):" res 26 | [ -z "$res" ] && break 27 | name="$(echo $qiandaos | tr " " "\n" | sed -n "$res"p)" 28 | [ -z "$(echo $qiandaos | grep $name)" ] && echo "输入有误!" && continue 29 | read -p "请输入$name的cookie(已设置时:0.关闭 1.启用):" res 30 | checkread $res && [ -z "$(uci -q get monlor.$appname.qiandao_"$name"_setting)" ] && echo "$name未设置cookie!" && continue 31 | if [ "$res" == '0' ]; then 32 | $uciset.qiandao_"$name"=0 33 | elif [ "$res" == '1' ]; then 34 | $uciset.qiandao_"$name"=1 35 | elif [ -n "$res" ]; then 36 | $uciset.qiandao_"$name"=1 37 | $uciset.qiandao_"$name"_setting="$res" 38 | else 39 | $uciset.qiandao_"$name"=0 40 | $uciset.qiandao_"$name"_setting="$res" 41 | fi 42 | done 43 | [ -z "$qiandao_time" ] && qiandao_time="8" 44 | read -p "每天执行签到的时间(每天$qiandao_time点)[0-23]:" res 45 | [ -n "$res" ] && $uciset.qiandao_time="$res" 46 | read -p "立即执行签到(否则仅保存设置)?[1/0] " res 47 | [ "$res" == '1' ] && $uciset.qiandao_action=2 || $uciset.qiandao_action=1 48 | 49 | $monlorpath/apps/$appname/script/$appname.sh restart 50 | else 51 | $monlorpath/apps/$appname/script/$appname.sh stop 52 | fi 53 | 54 | } 55 | #------------------【QianDao】-------------------- 56 | -------------------------------------------------------------------------------- /apps/qiandao/config/qiandao.uci: -------------------------------------------------------------------------------- 1 | uciset="uci set monlor.qiandao" 2 | $uciset=config 3 | $uciset.service="QianDao" 4 | $uciset.appname="qiandao" 5 | $uciset.tools="2.6.10" 6 | -------------------------------------------------------------------------------- /apps/qiandao/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.0.1 2 | -------------------------------------------------------------------------------- /apps/qiandao/script/qiandao.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | source "$(uci -q get monlor.tools.path)"/scripts/base.sh 3 | eval `ucish export qiandao` 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | EXTRA_COMMANDS=" status backup recover" 11 | EXTRA_HELP=" status Get $appname status" 12 | SETTING_FILE="/tmp/cookie.txt" 13 | [ -z "$qiandao_time" ] && qiandao_time="8" 14 | 15 | generate_cookie_conf() { 16 | 17 | rm -rf $SETTING_FILE 18 | rm -rf $BIN/cookie.txt 19 | [ "$qiandao_koolshare" == "1" ] && [ -n "$qiandao_koolshare_setting" ] && echo -e "\"koolshare\"=$qiandao_koolshare_setting" >> $SETTING_FILE 20 | [ "$qiandao_baidu" == "1" ] && [ -n "$qiandao_baidu_setting" ] && echo -e "\"baidu\"=$qiandao_baidu_setting" >> $SETTING_FILE 21 | [ "$qiandao_v2ex" == "1" ] && [ -n "$qiandao_v2ex_setting" ] && echo -e "\"v2ex\"=$qiandao_v2ex_setting" >> $SETTING_FILE 22 | [ "$qiandao_hostloc" == "1" ] && [ -n "$qiandao_hostloc_setting" ] && echo -e "\"hostloc\"=$qiandao_hostloc_setting" >> $SETTING_FILE 23 | [ "$qiandao_acfun" == "1" ] && [ -n "$qiandao_acfun_setting" ] && echo -e "\"acfun\"=$qiandao_acfun_setting" >> $SETTING_FILE 24 | [ "$qiandao_bilibili" == "1" ] && [ -n "$qiandao_bilibili_setting" ] && echo -e "\"bilibili\"=$qiandao_bilibili_setting" >> $SETTING_FILE 25 | [ "$qiandao_smzdm" == "1" ] && [ -n "$qiandao_smzdm_setting" ] && echo -e "\"smzdm\"=$qiandao_smzdm_setting" >> $SETTING_FILE 26 | [ "$qiandao_xiami" == "1" ] && [ -n "$qiandao_xiami_setting" ] && echo -e "\"xiami\"=$qiandao_xiami_setting" >> $SETTING_FILE 27 | [ "$qiandao_163music" == "1" ] && [ -n "$qiandao_163music_setting" ] && echo -e "\"163music\"=$qiandao_163music_setting" >> $SETTING_FILE 28 | [ "$qiandao_miui" == "1" ] && [ -n "$qiandao_miui_setting" ] && echo -e "\"miui\"=$qiandao_miui_setting" >> $SETTING_FILE 29 | [ "$qiandao_52pojie" == "1" ] && [ -n "$qiandao_52pojie_setting" ] && echo -e "\"52pojie\"=$qiandao_52pojie_setting" >> $SETTING_FILE 30 | [ "$qiandao_kafan" == "1" ] && [ -n "$qiandao_kafan_setting" ] && echo -e "\"kafan\"=$qiandao_kafan_setting" >> $SETTING_FILE 31 | [ "$qiandao_right" == "1" ] && [ -n "$qiandao_right_setting" ] && echo -e "\"right\"=$qiandao_right_setting" >> $SETTING_FILE 32 | [ "$qiandao_mydigit" == "1" ] && [ -n "$qiandao_mydigit_setting" ] && echo -e "\"mydigit\"=$qiandao_mydigit_setting" >> $SETTING_FILE 33 | if [ -f "$SETTING_FILE" ];then 34 | ln -sf $SETTING_FILE $BIN/cookie.txt 35 | else 36 | logsh "【$service】" "检测到你没有填写任何cookie配置!关闭插件!" 37 | uci set monlor.$appname.enable=0 38 | uci commit monlor 39 | exit 1 40 | fi 41 | 42 | } 43 | 44 | add_cron() { 45 | 46 | logsh "【$service】" "添加签到定时任务,每天$qiandao_time点自动签到..." 47 | cru a $appname "1 $qiandao_time * * * $monlorpath/apps/$appname/script/$appname.sh restart" 48 | 49 | } 50 | 51 | del_cron() { 52 | 53 | logsh "【$service】" "删除签到定时任务!" 54 | cru d $appname 55 | 56 | } 57 | 58 | start() { 59 | 60 | [ -n "$(pidof $appname)" ] && logsh "【$service】" "$appname已经在运行!" && exit 1 61 | logsh "【$service】" "正在启动$appname服务... " 62 | # Scripts Here 63 | generate_cookie_conf 64 | add_cron 65 | # iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 66 | if [ "$qiandao_action" == '2' ]; then 67 | i=4 68 | while(true) 69 | do 70 | echo "-------------------------------" 71 | cd $BIN && ./$appname 2>&1 | tee $LOG/$appname.log 72 | echo "-------------------------------" 73 | if [ -z "$(cat $LOG/$appname.log | grep panic)" ]; then 74 | break 75 | else 76 | logsh "【$service】" "出错了,1秒后尝试重新启动..." 77 | sleep 1 78 | fi 79 | let i=$i-1 80 | [ "$i" -eq 0 ] && logsh "【$service】" "启动$appname服务失败!" && exit 1 81 | done 82 | else 83 | uci set monlor.$appname.qiandao_action='2' 84 | uci commit monlor 85 | fi 86 | 87 | logsh "【$service】" "启动$appname服务完成!" 88 | 89 | } 90 | 91 | stop() { 92 | 93 | logsh "【$service】" "正在停止$appname服务... " 94 | rm -rf $SETTING_FILE 95 | rm -rf $BIN/cookie.txt 96 | # service_stop $BIN/$appname 97 | # kill -9 "$(pidof $appname)" 98 | # iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 99 | [ "$enable" == '0' ] && destroy 100 | 101 | } 102 | 103 | destroy() { 104 | 105 | # End app, Scripts here 106 | del_cron 107 | return 108 | 109 | } 110 | 111 | restart() { 112 | 113 | stop 114 | sleep 1 115 | start 116 | 117 | } 118 | 119 | status() { 120 | 121 | if [ -n "$(cru l | grep $appname)" -a -f $BIN/cookie.txt ]; then 122 | echo -e "运行中,每天$qiandao_time点自动签到\n1" 123 | else 124 | echo -e "未运行\n0" 125 | fi 126 | } 127 | 128 | backup() { 129 | 130 | mkdir -p $monlorbackup/$appname 131 | return 132 | 133 | } 134 | 135 | recover() { 136 | 137 | return 138 | 139 | } 140 | -------------------------------------------------------------------------------- /apps/shadowsocks/bin/dns2socks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/dns2socks -------------------------------------------------------------------------------- /apps/shadowsocks/bin/dns2socks_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/dns2socks_mips -------------------------------------------------------------------------------- /apps/shadowsocks/bin/ss-local: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/ss-local -------------------------------------------------------------------------------- /apps/shadowsocks/bin/ss-local_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/ss-local_mips -------------------------------------------------------------------------------- /apps/shadowsocks/bin/ss-redir: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/ss-redir -------------------------------------------------------------------------------- /apps/shadowsocks/bin/ss-redir_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/ss-redir_mips -------------------------------------------------------------------------------- /apps/shadowsocks/bin/ssr-local: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/ssr-local -------------------------------------------------------------------------------- /apps/shadowsocks/bin/ssr-local_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/ssr-local_mips -------------------------------------------------------------------------------- /apps/shadowsocks/bin/ssr-redir: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/ssr-redir -------------------------------------------------------------------------------- /apps/shadowsocks/bin/ssr-redir_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/bin/ssr-redir_mips -------------------------------------------------------------------------------- /apps/shadowsocks/config/customize_black.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/config/customize_black.conf -------------------------------------------------------------------------------- /apps/shadowsocks/config/customize_white.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/shadowsocks/config/customize_white.conf -------------------------------------------------------------------------------- /apps/shadowsocks/config/shadowsocks.uci: -------------------------------------------------------------------------------- 1 | appname=shadowsocks 2 | uci set monlor.$appname=config 3 | uci set monlor.$appname.service=ShadowSocks 4 | uci set monlor.$appname.appname="$appname" 5 | uci set monlor.$appname.tools="2.6.13" 6 | uci set monlor.$appname.newinfo="修复ss插件dns解析失败的问题!" -------------------------------------------------------------------------------- /apps/shadowsocks/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.8.2 2 | -------------------------------------------------------------------------------- /apps/shadowsocks/script/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | monlorpath=$(uci -q get monlor.tools.path) 4 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 5 | 6 | appname=shadowsocks 7 | checkuci $appname && rm -rf /tmp/$appname/config/customize*.conf 8 | if compare "$(uci -q get monlor.$appname.version)" "1.7.5"; then 9 | if checkuci $appname; then 10 | rm -rf /tmp/$appname/config/cdn.txt 11 | rm -rf /tmp/$appname/config/chnroute.txt 12 | rm -rf /tmp/$appname/config/gfwlist.conf 13 | fi 14 | fi 15 | [ -f $monlorpath/apps/$appname/config/chnroute.conf ] && rm -rf $monlorpath/apps/$appname/config/chnroute.conf -------------------------------------------------------------------------------- /apps/shadowsocks/script/ss_online_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | monlorpath=$(uci -q get monlor.tools.path) 4 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 5 | eval `ucish export shadowsocks` 6 | online_config=$monlorpath/apps/$appname/config/ssserver_online.conf 7 | local_config=$monlorpath/apps/$appname/config/ssserver.conf 8 | 9 | decode_url_link(){ 10 | link=$1 11 | num=$2 12 | len=$((${#link}-$num)) 13 | mod4=$(($len%4)) 14 | if [ "$mod4" -gt "0" ]; then 15 | var="====" 16 | newlink=${link}${var:$mod4} 17 | echo -n "$newlink" | sed 's/-/+/g; s/_/\//g' | base64 -d 2>/dev/null 18 | else 19 | echo -n "$link" | sed 's/-/+/g; s/_/\//g' | base64 -d 2>/dev/null 20 | fi 21 | } 22 | 23 | get_ss_config() { 24 | decode_link="$1" 25 | server=$(echo "$decode_link" |awk -F':' '{print $1}') 26 | server_port=$(echo "$decode_link" |awk -F':' '{print $2}') 27 | protocol=$(echo "$decode_link" |awk -F':' '{print $3}') 28 | encrypt_method=$(echo "$decode_link" |awk -F':' '{print $4}') 29 | obfs=$(echo "$decode_link" |awk -F':' '{print $5}'|sed 's/_compatible//g') 30 | #password=$(echo "$decode_link" |awk -F':' '{print $6}'|awk -F'/' '{print $1}') 31 | 32 | password=$(decode_url_link $(echo "$decode_link" |awk -F':' '{print $6}'|awk -F'/' '{print $1}') 0) 33 | 34 | obfsparam_temp=$(echo "$decode_link" |awk -F':' '{print $6}'|grep -Eo "obfsparam.+"|sed 's/obfsparam=//g'|awk -F'&' '{print $1}') 35 | [ -n "$obfsparam_temp" ] && obfsparam=$(decode_url_link $obfsparam_temp 0) || obfsparam='' 36 | 37 | protoparam_temp=$(echo "$decode_link" |awk -F':' '{print $6}'|grep -Eo "protoparam.+"|sed 's/protoparam=//g'|awk -F'&' '{print $1}') 38 | [ -n "$protoparam_temp" ] && protoparam=$(decode_url_link $protoparam_temp 0|sed 's/_compatible//g') || protoparam='' 39 | 40 | remarks_temp=$(echo "$decode_link" |awk -F':' '{print $6}'|grep -Eo "remarks.+"|sed 's/remarks=//g'|awk -F'&' '{print $1}') 41 | [ -n "$remarks_temp" ] && remarks=$(decode_url_link $remarks_temp 0 | tr "\n" " " | sed -e "s/ //g") || remarks="$server" 42 | 43 | group_temp=$(echo "$decode_link" |awk -F':' '{print $6}'|grep -Eo "group.+"|sed 's/group=//g'|awk -F'&' '{print $1}') 44 | [ -n "$group_temp" ] && group=$(decode_url_link $group_temp 0) || group='AutoSuBGroup' 45 | # [ -n "$group" ] && group_base64=`echo $group | base64_encode | sed 's/ -//g'` 46 | # [ -n "$server" ] && server_base64=`echo $server | base64_encode | sed 's/ -//g'` 47 | #把全部服务器节点写入文件 /usr/share/shadowsocks/serverconfig/all_onlineservers 48 | 49 | } 50 | 51 | local_update() { 52 | 53 | if [ -n "$ssuri" ]; then 54 | # 检测ss ssr 55 | NODE_FORMAT1=`echo $ssuri | grep -E "^ss://"` 56 | NODE_FORMAT2=`echo $ssuri | grep -E "^ssr://"` 57 | if [ -n "$NODE_FORMAT1" ];then 58 | logsh "【$service】" "暂不支持ss节点订阅..." && exit 59 | elif [ -n "$NODE_FORMAT2" ];then 60 | urllinks=$(echo $ssuri | sed 's/ssr:\/\///g') 61 | decode_link=$(decode_url_link $urllinks 0) 62 | get_ss_config $decode_link 63 | read -p "确定要添加节点:[$remarks,$server,$server_port,$password,$encrypt_method...][1/0]? " res 64 | if [ "$res" == '1' ]; then 65 | cat "$local_config" | grep -v "$remarks" > /tmp/server.conf 66 | mv -f /tmp/server.conf "$local_config" 67 | echo "$remarks,$server,$server_port,$password,$encrypt_method,$protocol,$obfs,$protoparam,$obfsparam" >> "$local_config" 68 | fi 69 | fi 70 | fi 71 | 72 | } 73 | 74 | online_update() { 75 | 76 | if [ -n "$ssr_subscribe_link" ]; then 77 | 78 | logsh "【$service】" "更新$appname订阅节点" 79 | wgetsh /tmp/ssr_subscribe_file.txt $ssr_subscribe_link 80 | [ $? -ne 0 ] && logsh "【$service】" "下载订阅节点失败!" && exit 81 | decode_url_link `cat /tmp/ssr_subscribe_file.txt` 0 > /tmp/ssr_subscribe_file_temp1.txt 82 | # 检测ss ssr 83 | NODE_FORMAT1=`cat /tmp/ssr_subscribe_file_temp1.txt | grep -E "^ss://"` 84 | NODE_FORMAT2=`cat /tmp/ssr_subscribe_file_temp1.txt | grep -E "^ssr://"` 85 | if [ -n "$NODE_FORMAT1" ];then 86 | logsh "【$service】" "暂不支持ss节点订阅..." && exit 87 | elif [ -n "$NODE_FORMAT2" ];then 88 | maxnum=$(decode_url_link `cat /tmp/ssr_subscribe_file.txt` 0 | grep "MAX=" | awk -F"=" '{print $2}' | grep -Eo "[0-9]+") 89 | if [ -n "$maxnum" ]; then 90 | urllinks=$(decode_url_link `cat /tmp/ssr_subscribe_file.txt` 0 | sed '/MAX=/d' | shuf -n $maxnum | sed 's/ssr:\/\// /g') 91 | else 92 | urllinks=$(decode_url_link `cat /tmp/ssr_subscribe_file.txt` 0 | sed 's/ssr:\/\// /g') 93 | fi 94 | [ -z "$urllinks" ] && logsh "【$service】" "订阅节点解析失败!" && exit 95 | echo -n > $online_config 96 | for link in $urllinks 97 | do 98 | decode_link=$(decode_url_link $link 0) 99 | get_ss_config $decode_link 100 | logsh "【$service】" "添加$appname订阅节点:$remarks[$server]" -s 101 | echo "$remarks,$server,$server_port,$password,$encrypt_method,$protocol,$obfs,$protoparam,$obfsparam" >> $online_config 102 | done 103 | logsh "【$service】" "ss订阅节点更新完成!" 104 | 105 | fi 106 | 107 | fi 108 | } 109 | 110 | if [ "$1" == "add" ]; then 111 | action="uri" 112 | ssuri="$2" 113 | local_update 114 | else 115 | online_update 116 | fi 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /apps/shadowsocks/script/ss_rule_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | monlorpath=$(uci -q get monlor.tools.path) 4 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 5 | eval `ucish export shadowsocks` 6 | chnroute=$CONF/chnroute.txt 7 | gfwlist=$CONF/gfwlist.conf 8 | cdnlist=$CONF/cdn.txt 9 | url="https://raw.githubusercontent.com/hq450/fancyss/master/rules" 10 | 11 | logsh "【$service】" "更新$appname分流规则" 12 | wgetsh $gfwlist $url/gfwlist.conf 13 | [ $? -ne 0 ] && logsh "【$service】" "更新gfw黑名单规则失败" 14 | wgetsh $chnroute $url/chnroute.txt 15 | [ $? -ne 0 ] && logsh "【$service】" "更新大陆白名单规则失败" 16 | wgetsh $cdnlist $url/cdn.txt 17 | [ $? -ne 0 ] && logsh "【$service】" "更新cdn加速列表失败" 18 | 19 | -------------------------------------------------------------------------------- /apps/tinyproxy/bin/tinyproxy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/tinyproxy/bin/tinyproxy -------------------------------------------------------------------------------- /apps/tinyproxy/bin/tinyproxy_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/tinyproxy/bin/tinyproxy_mips -------------------------------------------------------------------------------- /apps/tinyproxy/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【TinyProxy】-------------------- 2 | tinyproxy() { 3 | 4 | appname=tinyproxy 5 | service=Tinyproxy 6 | uciset="uci set monlor.$appname" 7 | $uciset=config && $uciset.service=$service 8 | echo "********* $service ***********" 9 | echo "[轻量级的Http代理工具]" 10 | read -p "启动$appname服务?[1/0] " enable 11 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 12 | if [ "$enable" == '1' ]; then 13 | read -p "修改$appname端口号(`uci -q get monlor.$appname.port || echo 8888`)?[1/0] " res 14 | if [ "$res" == '1' ]; then 15 | read -p "请输入$appname端口号(默认8888):" res 16 | $uciset.port="$res" 17 | fi 18 | fi 19 | 20 | if [ "$enable" == '1' ]; then 21 | $monlorpath/apps/$appname/script/$appname.sh restart 22 | else 23 | $monlorpath/apps/$appname/script/$appname.sh stop 24 | fi 25 | 26 | } 27 | #------------------【TinyProxy】-------------------- -------------------------------------------------------------------------------- /apps/tinyproxy/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.1.2 2 | -------------------------------------------------------------------------------- /apps/tinyproxy/script/tinyproxy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=TinyProxy 12 | appname=tinyproxy 13 | EXTRA_COMMANDS=" status backup recover" 14 | EXTRA_HELP=" status Get $appname status" 15 | port=8888 16 | BIN=$monlorpath/apps/$appname/bin/$appname 17 | CONF=$monlorpath/apps/$appname/config/$appname.conf 18 | LOG=/var/log/$appname.log 19 | port=$(uci -q get monlor.$appname.port) || port=8888 20 | 21 | start () { 22 | 23 | result=$(ps | grep $BIN | grep -v grep | wc -l) 24 | if [ "$result" != '0' ];then 25 | logsh "【$service】" "$appname已经在运行!" 26 | exit 1 27 | fi 28 | logsh "【$service】" "正在启动$appname服务... " 29 | cp -rf $CONF /tmp 30 | sed -i "s/Port 8888/Port $port/" /tmp/$appname.conf 31 | iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 32 | service_start $BIN -c /tmp/$appname.conf 33 | if [ $? -ne 0 ]; then 34 | logsh "【$service】" "启动$appname服务失败!" 35 | exit 36 | fi 37 | logsh "【$service】" "启动$appname服务完成!" 38 | 39 | } 40 | 41 | stop () { 42 | 43 | logsh "【$service】" "正在停止$appname服务... " 44 | service_stop $BIN 45 | ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 46 | iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 47 | 48 | } 49 | 50 | restart () { 51 | 52 | stop 53 | sleep 1 54 | start 55 | 56 | } 57 | 58 | status() { 59 | 60 | result=$(pssh | grep $BIN | grep -v grep | wc -l) 61 | if [ "$result" == '0' ]; then 62 | echo "未运行" 63 | echo "0" 64 | else 65 | echo "运行端口号: $port" 66 | echo "1" 67 | fi 68 | 69 | } 70 | 71 | backup() { 72 | 73 | mkdir -p $monlorbackup/$appname 74 | cp -rf $CONF $monlorbackup/$appname/$appname.conf 75 | 76 | } 77 | 78 | recover() { 79 | 80 | cp -rf $monlorbackup/$appname/$appname.conf $CONF 81 | 82 | } -------------------------------------------------------------------------------- /apps/verysync/bin/verysync: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/verysync/bin/verysync -------------------------------------------------------------------------------- /apps/verysync/bin/verysync_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/verysync/bin/verysync_mips -------------------------------------------------------------------------------- /apps/verysync/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【VerySync】-------------------- 2 | verysync() { 3 | 4 | appname=verysync 5 | service=VerySync 6 | uciset="uci set monlor.$appname" 7 | $uciset=config && $uciset.service=$service 8 | echo "********* $service ***********" 9 | echo "[基于p2p的文件同步工具,局域网同步速度快]" 10 | read -p "启动$appname服务?[1/0] " enable 11 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 12 | if [ "$enable" == '1' ]; then 13 | read -p "修改$appname端口号(`uci -q get monlor.$appname.port || echo 8886`)?[1/0] " res 14 | if [ "$res" == '1' ]; then 15 | read -p "请输入$appname端口号(默认8886):" res 16 | [ ! -z $res ] && $uciset.port="$res" || $uciset.port=8886 17 | fi 18 | fi 19 | if [ "$enable" == '1' ]; then 20 | $monlorpath/apps/$appname/script/$appname.sh restart 21 | else 22 | $monlorpath/apps/$appname/script/$appname.sh stop 23 | fi 24 | 25 | } 26 | #------------------【VerySync】-------------------- -------------------------------------------------------------------------------- /apps/verysync/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.1.0 -------------------------------------------------------------------------------- /apps/verysync/script/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | monlorpath=$(uci -q get monlor.tools.path) || exit 1 4 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 5 | 6 | appname=verysync 7 | # checkuci $appname && rm -rf /tmp/$appname/bin/$appname -------------------------------------------------------------------------------- /apps/verysync/script/verysync.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=VerySync 12 | appname=verysync 13 | EXTRA_COMMANDS=" status backup recover" 14 | EXTRA_HELP=" status Get $appname status" 15 | BIN=$monlorpath/apps/$appname/bin/$appname 16 | CONF="$userdisk"/."$appname" 17 | LOG=/var/log/$appname.log 18 | port=$(uci -q get monlor.$appname.port) || port=8886 19 | lanip=$(uci get network.lan.ipaddr) 20 | 21 | start () { 22 | 23 | result=$(ps | grep $BIN | grep -v grep | wc -l) 24 | if [ "$result" != '0' ];then 25 | logsh "【$service】" "$appname已经在运行!" 26 | exit 1 27 | fi 28 | logsh "【$service】" "正在启动$appname服务... " 29 | cru a "$appname" "0 6 * * * $monlorpath/apps/$appname/script/$appname.sh restart" 30 | [ -f "$BIN".old ] && rm -rf "$BIN".old 31 | # if [ ! -x "$BIN" ]; then 32 | # logsh "【$service】" "获取$appname二进制文件" 33 | # [ "$model" == "arm" ] && flag="verysync" 34 | # [ "$model" == "mips" ] && flag="verysync_mips" 35 | # wgetsh $monlorpath/apps/$appname/bin/$appname "$monlorurl"/temp/"$flag" 36 | # if [ $? -ne 0 ]; then 37 | # logsh "【$service】" "获取二进制文件失败!" 38 | # exit 39 | # fi 40 | # chmod +x $BIN 41 | # # $BIN -generate $userdisk > /tmp/messages 2>&1 42 | # fi 43 | [ ! -d "$CONF" ] && mkdir $CONF 44 | iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 45 | service_start $BIN -home "$CONF" -gui-address http://0.0.0.0:$port -no-browser -no-restart 46 | if [ $? -ne 0 ]; then 47 | logsh "【$service】" "启动$appname服务失败!" 48 | exit 49 | fi 50 | 51 | logsh "【$service】" "启动$appname服务完成!" 52 | logsh "【$service】" "请在浏览器中访问[http://$lanip:$port]" 53 | 54 | } 55 | 56 | stop () { 57 | 58 | logsh "【$service】" "正在停止$appname服务... " 59 | service_stop $BIN > /dev/null 2>&1 60 | ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 61 | iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 62 | logsh "【$service】" "卸载插件后可删除$CONF文件夹" 63 | [ "$enable" == '0' ] && destroy 64 | 65 | } 66 | 67 | destroy() { 68 | 69 | cru d "$appname" 70 | 71 | } 72 | 73 | restart () { 74 | 75 | stop 76 | sleep 1 77 | start 78 | 79 | } 80 | 81 | status() { 82 | 83 | result=$(pssh | grep $BIN | grep -v grep | wc -l) 84 | if [ "$result" -ne '0' ]; then 85 | echo "运行端口号: $port" 86 | echo "1" 87 | else 88 | echo "未运行" 89 | echo "0" 90 | fi 91 | 92 | } 93 | 94 | backup() { 95 | mkdir -p $monlorbackup/$appname 96 | cp -rf $CONF/*.pem $monlorbackup/$appname 97 | cp -rf $CONF/csrftokens.txt $monlorbackup/$appname 98 | cp -rf $CONF/setting.dat $monlorbackup/$appname 99 | } 100 | 101 | recover() { 102 | [ ! -d "$CONF" ] && mkdir -p $CONF 103 | cp -rf $monlorbackup/$appname/*.pem $CONF 104 | cp -rf $monlorbackup/$appname/csrftokens.txt $CONF 105 | cp -rf $monlorbackup/$appname/setting.dat $CONF 106 | } -------------------------------------------------------------------------------- /apps/vsftpd/bin/vsftpd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/vsftpd/bin/vsftpd -------------------------------------------------------------------------------- /apps/vsftpd/bin/vsftpd_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/vsftpd/bin/vsftpd_mips -------------------------------------------------------------------------------- /apps/vsftpd/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【VsFtpd】------------------- 2 | vsftpdAdd() { 3 | read -p "请输入$appname用户名:" user 4 | read -p "请输入$appname密码:" passwd 5 | read -p "请输入$user访问目录:" path 6 | if [ ! -z $user -a ! -z $passwd -a ! -z $path ]; then 7 | sed -i "/$user/d" $FTPUSER 8 | echo "$user,$passwd,$path" >> $FTPUSER 9 | fi 10 | read -p "添加完成,再添加一个?[1/0] " res 11 | if checkread $res; then 12 | [ "$res" == '1' ] && vsftpdAdd 13 | fi 14 | } 15 | 16 | vsftpdDel() { 17 | userlist=$(cat $FTPUSER | cut -d, -f1) 18 | echo "$appname用户[`echo $userlist`]" 19 | read -p "请输入要删除的用户名:" res 20 | [ ! -z "$res" ] && sed -i "/^$res,/d" $FTPUSER 21 | read -p "删除完成,继续删除?[1/0] " res 22 | if checkread $res; then 23 | [ "$res" == '1' ] && vsftpdDel 24 | fi 25 | } 26 | 27 | vsftpd() { 28 | appname=vsftpd 29 | service=VsFtpd 30 | FTPUSER=$monlorpath/apps/vsftpd/config/ftpuser.conf 31 | [ ! -f $FTPUSER ] && touch $FTPUSER 32 | uciset="uci set monlor.$appname" 33 | $uciset=config && $uciset.service=$service 34 | echo "********* $service ***********" 35 | echo "[快速搭建Ftp服务器,局域网文件共享]" 36 | read -p "启动$appname服务?[1/0] " enable 37 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 38 | if [ "$enable" == '1' ]; then 39 | read -p "是否开启匿名用户访问?[1/0] " res 40 | checkread $res && $uciset.anon_enable="$res" 41 | if [ "$res" == '1' ]; then 42 | anon_root=$(uci -q get monlor.$appname.anon_root) 43 | [ -z $anon_root ] && anon_root="空" 44 | read -p "更改匿名用户访问目录($anon_root)?[1/0] " res 45 | if [ "$res" == '1' ]; then 46 | read -p "请输入匿名用户访问目录:" res 47 | $uciset.anon_root="$res" 48 | fi 49 | fi 50 | $uciset.ftp_port="21" 51 | userlist=$(cat $FTPUSER | cut -d, -f1) 52 | [ -z $userlist ] && userlist="空" 53 | echo "$appname用户[`echo $userlist`]" 54 | read -p "添加$appname用户?[1/0] " res 55 | [ "$res" == '1' ] && vsftpdAdd 56 | read -p "删除$appname用户?[1/0] " res 57 | [ "$res" == '1' ] && vsftpdDel 58 | fi 59 | if [ "$enable" == '1' ]; then 60 | $monlorpath/apps/$appname/script/$appname.sh restart 61 | else 62 | $monlorpath/apps/$appname/script/$appname.sh stop 63 | fi 64 | 65 | } 66 | #------------------【VsFtpd】------------------- -------------------------------------------------------------------------------- /apps/vsftpd/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.1.3 2 | -------------------------------------------------------------------------------- /apps/vsftpd/config/vsftpd.conf: -------------------------------------------------------------------------------- 1 | background=YES 2 | listen=YES 3 | #anon_other_write_enable=YES 4 | anon_mkdir_write_enable=YES 5 | anon_upload_enable=YES 6 | local_enable=YES 7 | local_umask=022 8 | anon_umask=022 9 | check_shell=NO 10 | allow_writeable_chroot=YES 11 | session_support=NO 12 | userlist_file=/etc/vsftpd.users 13 | xferlog_file=/var/log/vsftpd.log 14 | deny_file={*.scr} 15 | write_enable=YES 16 | chroot_local_user=YES 17 | xferlog_enable=YES 18 | #monlor-vsftpd 19 | -------------------------------------------------------------------------------- /apps/vsftpd/script/vsftpd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=VsFtpd 12 | appname=vsftpd 13 | EXTRA_COMMANDS=" status backup recover" 14 | EXTRA_HELP=" status Get $appname status" 15 | port=21 16 | BIN=$monlorpath/apps/$appname/bin/$appname 17 | CONF=$monlorpath/apps/$appname/config/$appname.conf 18 | FTPUSER=$monlorpath/apps/$appname/config/ftpuser.conf 19 | LOG=/var/log/$appname.log 20 | 21 | add(){ 22 | sed -i "/$1/"d /etc/passwd 23 | sed -i "/$1/"d /etc/shadow 24 | #if [ "$4" == '0' ]; then 25 | sshlogin=/bin/false; 26 | #else 27 | # sshlogin=/bin/ash; 28 | #fi 29 | if [ ! -d "$3" ]; then 30 | mkdir -p $3 31 | fi 32 | echo "$1:*:10086:10086:$1:$3:$sshlogin" >> /etc/passwd 33 | echo "$1:*:0:0:99999:7:::" >> /etc/shadow 34 | echo -e "$2\n$2" | passwd $1 > /dev/null 2>&1 35 | 36 | } 37 | del(){ 38 | sed -i "/^$1/"d /etc/passwd 39 | sed -i "/^$1/"d /etc/shadow 40 | sed -i "/^$1/"d /etc/vsftpd.users 41 | } 42 | 43 | set_config() { 44 | 45 | logsh "【$service】" "加载$appname设置... " 46 | 47 | [ ! -f $FTPUSER ] && logsh "【$service】" "未配置ftp用户!" && exit 48 | [ ! -f /etc/vsftpd.users ] && touch /etc/vsftpd.users 49 | cat /etc/vsftpd.users | while read line 50 | do 51 | [ ! -z "$line" ] && del $line 52 | done 53 | cat $FTPUSER | while read line 54 | do 55 | username=`cutsh $line 1` 56 | passwd=`cutsh $line 2` 57 | ftppath=`cutsh $line 3` 58 | echo $username >> /etc/vsftpd.users 59 | [ ! -z $username ] && add $username $passwd $ftppath 60 | done 61 | 62 | if [ `uci get monlor.$appname.anon_enable` = "1" ]; then 63 | anon_enable=YES 64 | anon_root=`uci get monlor.$appname.anon_root` || anon_root=/var/ftp 65 | [ ! -d $anon_root ] && mkdir -p $anon_root 66 | [ ! -d $anon_root/Share ] && mkdir -p $anon_root/Share 67 | chmod 755 $anon_root 68 | dirmod=$(ls -ld $anon_root | cut -d' ' -f1) 69 | [ "$dirmod" == "drwxrwxrwx" ] && logsh "【$service】" "匿名访问开启失败,此目录不支持!" 70 | chmod 777 $anon_root/Share 71 | del ftp && add ftp 123 $anon_root 72 | else 73 | anon_enable=NO 74 | fi 75 | port=`uci get monlor.$appname.ftp_port` || port=21 76 | cp -rf $CONF /etc/vsftpd.conf 77 | [ ! -d /var/run/vsftpd ] && mkdir -p /var/run/vsftpd 78 | echo -e "anonymous_enable=$anon_enable\nanon_root=$anon_root\nlisten_port=$port" >> /etc/vsftpd.conf 79 | 80 | } 81 | 82 | start () { 83 | 84 | result=$(ps | grep $BIN | grep -v grep | wc -l) 85 | if [ "$result" != '0' ];then 86 | logsh "【$service】" "$appname已经在运行!" 87 | exit 1 88 | fi 89 | logsh "【$service】" "正在启动$appname服务... " 90 | 91 | set_config 92 | 93 | iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 94 | service_start $BIN 95 | if [ $? -ne 0 ]; then 96 | logsh "【$service】" "启动$appname服务失败!" 97 | exit 98 | fi 99 | logsh "【$service】" "启动$appname服务完成!" 100 | 101 | } 102 | 103 | stop () { 104 | 105 | logsh "【$service】" "正在停止$appname服务... " 106 | service_stop $BIN 107 | rm -rf /etc/vsftpd.conf 108 | ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 109 | iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 110 | 111 | } 112 | 113 | restart () { 114 | 115 | stop 116 | sleep 1 117 | start 118 | 119 | } 120 | 121 | status() { 122 | 123 | result=$(pssh | grep $BIN | grep -v grep | wc -l) 124 | if [ "$result" == '0' ]; then 125 | echo "未运行" 126 | echo "0" 127 | else 128 | echo "运行端口号: $port" 129 | echo "1" 130 | fi 131 | 132 | } 133 | 134 | backup() { 135 | 136 | mkdir -p $monlorbackup/$appname 137 | cp -rf $FTPUSER $monlorbackup/$appname/$appname.conf 138 | 139 | } 140 | 141 | recover() { 142 | 143 | cp -rf $monlorbackup/$appname/$appname.conf $FTPUSER 144 | 145 | } -------------------------------------------------------------------------------- /apps/webshell/bin/webshell: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/webshell/bin/webshell -------------------------------------------------------------------------------- /apps/webshell/bin/webshell_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/apps/webshell/bin/webshell_mips -------------------------------------------------------------------------------- /apps/webshell/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【WebShell】-------------------- 2 | webshell() { 3 | 4 | appname=webshell 5 | service=WebShell 6 | uciset="uci set monlor.$appname" 7 | $uciset=config && $uciset.service=$service 8 | echo "********* $service ***********" 9 | echo "[网页ssh工具,可在网页上管理路由器]" 10 | read -p "启动$appname服务?[1/0] " enable 11 | checkread $enable && $uciset.enable="$enable" || $uciset.enable="0" 12 | if [ "$enable" == '1' ]; then 13 | read -p "修改$appname端口号(`uci -q get monlor.$appname.port || echo 4200`)?[1/0] " res 14 | if [ "$res" == '1' ]; then 15 | read -p "请输入$appname端口号(默认4200):" res 16 | $uciset.port="$res" 17 | fi 18 | fi 19 | 20 | if [ "$enable" == '1' ]; then 21 | $monlorpath/apps/$appname/script/$appname.sh restart 22 | else 23 | $monlorpath/apps/$appname/script/$appname.sh stop 24 | fi 25 | 26 | } 27 | #------------------【WebShell】-------------------- -------------------------------------------------------------------------------- /apps/webshell/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.1.3 2 | -------------------------------------------------------------------------------- /apps/webshell/script/webshell.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | monlorpath=$(uci -q get monlor.tools.path) 3 | [ $? -eq 0 ] && source "$monlorpath"/scripts/base.sh || exit 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | 11 | service=WebShell 12 | appname=webshell 13 | EXTRA_COMMANDS=" status backup recover" 14 | EXTRA_HELP=" status Get $appname status" 15 | # port=4200 16 | BIN=$monlorpath/apps/$appname/bin/$appname 17 | CONF=$monlorpath/apps/$appname/config/$appname.conf 18 | LOG=/var/log/$appname.log 19 | port=$(uci -q get monlor.$appname.port) || port=4200 20 | 21 | start () { 22 | 23 | result=$(ps | grep $BIN | grep -v grep | wc -l) 24 | if [ "$result" != '0' ];then 25 | logsh "【$service】" "$appname已经在运行!" 26 | exit 1 27 | fi 28 | logsh "【$service】" "正在启动$appname服务... " 29 | 30 | #iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 31 | service_start $BIN -p $port -s /:LOGIN -u root 32 | if [ $? -ne 0 ]; then 33 | logsh "【$service】" "启动$appname服务失败!" 34 | exit 35 | fi 36 | logsh "【$service】" "启动$appname服务完成!" 37 | logsh "【$service】" "请在浏览器访问http://192.168.31.1:4200" 38 | 39 | } 40 | 41 | stop () { 42 | 43 | logsh "【$service】" "正在停止$appname服务... " 44 | service_stop $BIN 45 | ps | grep $BIN | grep -v grep | awk '{print$1}' | xargs kill -9 > /dev/null 2>&1 46 | #iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 47 | 48 | } 49 | 50 | restart () { 51 | 52 | stop 53 | sleep 1 54 | start 55 | 56 | } 57 | 58 | status() { 59 | 60 | result=$(pssh | grep $BIN | grep -v grep | wc -l) 61 | if [ "$result" == '0' ]; then 62 | echo "未运行" 63 | echo "0" 64 | else 65 | echo "运行端口号: $port" 66 | echo "1" 67 | fi 68 | 69 | } 70 | 71 | backup() { 72 | 73 | mkdir -p $monlorbackup/$appname 74 | echo -n 75 | } 76 | 77 | recover() { 78 | 79 | echo -n 80 | } 81 | -------------------------------------------------------------------------------- /apps/zerotier/config/monlor.conf: -------------------------------------------------------------------------------- 1 | #------------------【ZeroTier】-------------------- 2 | zerotier() { 3 | 4 | eval `ucish export zerotier` 5 | uciset="uci set monlor.$appname" 6 | echo "********* $service ***********" 7 | echo "[$appinfo][需要Entware环境]" 8 | read -p "启动$appname服务?[1/0] " enable 9 | checkread $enable && $uciset.enable="$enable" 10 | if [ "$enable" == '1' ]; then 11 | # Scripts Here 12 | echo "请在这里注册并获取网络ID[https://my.zerotier.com]" 13 | echo "参考教程[http://www.right.com.cn/forum/thread-249161-1-1.html]" 14 | [ -z "$networkid" ] && networkid="空" 15 | read -p "修改$appname网络ID($networkid)?" res 16 | if [ "$res" == '1' ]; then 17 | read -p "请输入网络ID:" res 18 | [ -n "$res" ] && $uciset.networkid="$res" 19 | fi 20 | $monlorpath/apps/$appname/script/$appname.sh restart 21 | else 22 | $monlorpath/apps/$appname/script/$appname.sh stop 23 | fi 24 | 25 | } 26 | #------------------【ZeroTier】-------------------- 27 | -------------------------------------------------------------------------------- /apps/zerotier/config/version.txt: -------------------------------------------------------------------------------- 1 | 1.0.0 2 | -------------------------------------------------------------------------------- /apps/zerotier/config/zerotier.uci: -------------------------------------------------------------------------------- 1 | uciset="uci set monlor.zerotier" 2 | $uciset=config 3 | $uciset.service="ZeroTier" 4 | $uciset.appname="zerotier" 5 | $uciset.tools="2.6.16" 6 | $uciset.appinfo="一款非常简单易用的内网穿透工具" 7 | -------------------------------------------------------------------------------- /apps/zerotier/script/zerotier.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash /etc/rc.common 2 | source "$(uci -q get monlor.tools.path)"/scripts/base.sh 3 | eval `ucish export zerotier` 4 | 5 | START=95 6 | STOP=95 7 | SERVICE_USE_PID=1 8 | SERVICE_WRITE_PID=1 9 | SERVICE_DAEMONIZE=1 10 | EXTRA_COMMANDS=" status backup recover" 11 | EXTRA_HELP=" status Get $appname status" 12 | OPKG="/opt/bin/opkg" 13 | ZTO="/opt/bin/zerotier-one" 14 | ZTC="/opt/bin/zerotier-cli" 15 | 16 | start() { 17 | 18 | [ -n "$(pidof "$appname"-one)" ] && logsh "【$service】" "$appname已经在运行!" && exit 1 19 | logsh "【$service】" "正在启动$appname服务... " 20 | cru a "$appname" "0 6 * * * $monlorpath/apps/$appname/script/$appname.sh restart" 21 | # Scripts Here 22 | [ -z "$networkid" ] && logsh "【$service】" "检测到未设置网络ID!关闭插件!" && end 23 | if [ "$(uci -q get monlor.entware.enable)" == '0' ]; then 24 | logsh "【$service】" "检测到Entware服务未启用或未安装!关闭插件!" 25 | end 26 | fi 27 | if [ -z "$($OPKG list-installed | grep $appname)" ]; then 28 | logsh "【$service】" "正在opkg安装$appname程序..." 29 | $OPKG install $appname 30 | [ $? -ne 0 ] && logsh "【$service】" "安装失败!请检查Entware环境!" && exit 1 31 | fi 32 | #添加entware识别 33 | sed -i "/$appname/d" $monlorpath/apps/entware/config/relyon.txt &> /dev/null 34 | echo "$appname" >> $monlorpath/apps/entware/config/relyon.txt 35 | # iptables -I INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT 36 | service_start $ZTO -d && sleep 1 && $ZTC join $networkid &> /dev/null 37 | [ $? -ne 0 ] && logsh "【$service】" "启动$appname服务失败!" && exit 1 38 | logsh "【$service】" "启动$appname服务完成!" 39 | 40 | } 41 | 42 | stop() { 43 | 44 | logsh "【$service】" "正在停止$appname服务... " 45 | service_stop $ZTO &> /dev/null 46 | kill -9 "$(pidof "$appname"-one)" 47 | # iptables -D INPUT -p tcp --dport $port -m comment --comment "monlor-$appname" -j ACCEPT > /dev/null 2>&1 48 | [ "$enable" == '0' ] && destroy 49 | 50 | } 51 | 52 | destroy() { 53 | 54 | # End app, Scripts here 55 | cru d "$appname" 56 | #清除entware识别 57 | sed -i "/$appname/d" $monlorpath/apps/entware/config/relyon.txt 58 | return 59 | 60 | } 61 | 62 | end() { 63 | 64 | uci set monlor.$appname.enable=0 65 | uci commit monlor 66 | stop 67 | exit 1 68 | 69 | } 70 | 71 | restart() { 72 | 73 | stop 74 | sleep 1 75 | start 76 | 77 | } 78 | 79 | status() { 80 | 81 | ipaddr=$(ifconfig | grep -A8 ^zt | grep "inet addr" | awk '{print$2}' | cut -d':' -f2) 82 | if [ -n "$(pidof "$appname"-one)" ]; then 83 | port="$(cat /opt/var/lib/zerotier-one/zerotier-one.port)" &> /dev/null 84 | [ -n "$(echo $ipaddr | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}")" ] && iptext=",内网IP地址:$ipaddr" || iptext=",获取内网IP地址中" 85 | echo -e "运行端口号:$port$iptext\n1" 86 | else 87 | echo -e "未运行\n0" 88 | fi 89 | } 90 | 91 | backup() { 92 | 93 | mkdir -p $monlorbackup/$appname 94 | # Backup scripts here 95 | return 96 | 97 | } 98 | 99 | recover() { 100 | 101 | # Recover scripts here 102 | return 103 | 104 | } 105 | -------------------------------------------------------------------------------- /appstore/aria2.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/aria2.tar.gz -------------------------------------------------------------------------------- /appstore/easyexplorer.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/easyexplorer.tar.gz -------------------------------------------------------------------------------- /appstore/entware.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/entware.tar.gz -------------------------------------------------------------------------------- /appstore/fastdick.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/fastdick.tar.gz -------------------------------------------------------------------------------- /appstore/filebrowser.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/filebrowser.tar.gz -------------------------------------------------------------------------------- /appstore/firewall.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/firewall.tar.gz -------------------------------------------------------------------------------- /appstore/frpc.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/frpc.tar.gz -------------------------------------------------------------------------------- /appstore/httpfile.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/httpfile.tar.gz -------------------------------------------------------------------------------- /appstore/jetbrains.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/jetbrains.tar.gz -------------------------------------------------------------------------------- /appstore/kms.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/kms.tar.gz -------------------------------------------------------------------------------- /appstore/kodexplorer.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/kodexplorer.tar.gz -------------------------------------------------------------------------------- /appstore/koolproxy.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/koolproxy.tar.gz -------------------------------------------------------------------------------- /appstore/monlor.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/monlor.tar.gz -------------------------------------------------------------------------------- /appstore/ngrok.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/ngrok.tar.gz -------------------------------------------------------------------------------- /appstore/qiandao.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/qiandao.tar.gz -------------------------------------------------------------------------------- /appstore/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/shadowsocks.tar.gz -------------------------------------------------------------------------------- /appstore/tinyproxy.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/tinyproxy.tar.gz -------------------------------------------------------------------------------- /appstore/verysync.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/verysync.tar.gz -------------------------------------------------------------------------------- /appstore/vsftpd.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/vsftpd.tar.gz -------------------------------------------------------------------------------- /appstore/webshell.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/webshell.tar.gz -------------------------------------------------------------------------------- /appstore/zerotier.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/appstore/zerotier.tar.gz -------------------------------------------------------------------------------- /config/hosts.txt: -------------------------------------------------------------------------------- 1 | 192.30.253.112 github.com #monlor-hosts 2 | 192.30.253.119 gist.github.com #monlor-hosts 3 | 151.101.100.133 assets-cdn.github.com #monlor-hosts 4 | 151.101.100.133 raw.githubusercontent.com #monlor-hosts 5 | 151.101.100.133 gist.githubusercontent.com #monlor-hosts 6 | 151.101.100.133 cloud.githubusercontent.com #monlor-hosts 7 | 151.101.100.133 camo.githubusercontent.com #monlor-hosts 8 | 151.101.100.133 collector.githubapp.com #monlor-hosts 9 | 151.101.100.133 avatars0.githubusercontent.com #monlor-hosts 10 | 151.101.100.133 avatars1.githubusercontent.com #monlor-hosts 11 | 151.101.100.133 avatars2.githubusercontent.com #monlor-hosts 12 | 151.101.100.133 avatars3.githubusercontent.com #monlor-hosts 13 | 151.101.100.133 avatars4.githubusercontent.com #monlor-hosts 14 | 151.101.100.133 avatars5.githubusercontent.com #monlor-hosts 15 | 151.101.100.133 avatars6.githubusercontent.com #monlor-hosts 16 | 151.101.100.133 avatars7.githubusercontent.com #monlor-hosts -------------------------------------------------------------------------------- /config/monlor.uci: -------------------------------------------------------------------------------- 1 | 2 | config config 'tools' -------------------------------------------------------------------------------- /config/profile: -------------------------------------------------------------------------------- 1 | monlorpath=$(uci -q get monlor.tools.path) 2 | profilepath=$(uci -q get monlor.tools.profilepath) || profilepath="$monlorpath/scripts" 3 | libpath=$(uci -q get monlor.tools.libpath) || libpath="/usr/lib:/lib" 4 | 5 | export PATH=$PATH:$profilepath 6 | export LD_LIBRARY_PATH=$libpath 7 | export TERM=xterm 8 | #下面留空行 9 | -------------------------------------------------------------------------------- /config/version.txt: -------------------------------------------------------------------------------- 1 | 2.9.4 2 | -------------------------------------------------------------------------------- /gitsync.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #path=~/Monlor-Tools 3 | #cd $path 4 | [ $? -ne 0 ] && echo "Change directory failed!" && exit 5 | #find . -name '._*' -type f -print -exec rm -rf {} \; 6 | find . -name '.DS_Store' | xargs rm -rf 7 | find . -name '._*' | xargs rm -rf 8 | if [ "`uname -s`" == "Darwin" ]; then 9 | md5=md5 10 | else 11 | md5=md5sum 12 | fi 13 | 14 | vtools() { 15 | version=$(cat config/version.txt) 16 | num1=$(echo "$version" | cut -d'.' -f1) 17 | num2=$(echo "$version" | cut -d'.' -f2) 18 | num3=$(echo "$version" | cut -d'.' -f3) 19 | num4=$(echo "$version" | cut -d'.' -f4) 20 | oldver="$num1"."$num2"."$num3" 21 | newver="$num1"."`date +%-m.%-d`" 22 | if [ "$newver" == "$oldver" ]; then 23 | [ -z "$num4" ] && num4=1 || let num4=$num4+1 24 | echo "$newver"."$num4" > config/version.txt 25 | else 26 | echo "$newver" > config/version.txt 27 | fi 28 | } 29 | 30 | vapp() { 31 | local appname="$1" 32 | version=$(cat $appname/config/version.txt) 33 | num1=$(echo "$version" | cut -d'.' -f1) 34 | num2=$(echo "$version" | cut -d'.' -f2) 35 | num3=$(echo "$version" | cut -d'.' -f3) 36 | let num3=$num3+1 37 | echo "$num1.$num2.$num3" > $appname/config/version.txt 38 | } 39 | 40 | pack() { 41 | local name="$1" 42 | if [ -z "$name" -o "$name" == "-v" -o "$name" == "all" ]; then 43 | [ "$name" == "-v" -o "$2" == "-v" ] && vtools 44 | rm -rf monlor/ 45 | rm -rf monlor.tar.gz 46 | mkdir -p monlor/apps/ 47 | cp -rf config/ monlor/config 48 | cp -rf scripts/ monlor/scripts 49 | cp -rf web/ monlor/web 50 | if [ -f newinfo.txt ] && [ ! -z "$(cat newinfo.txt)" ]; then 51 | cp -rf newinfo.txt monlor/ 52 | fi 53 | #test 54 | # cp install.sh install_test.sh 55 | # if [ "`uname -s`" == "Darwin" ]; then 56 | # sed -i "" 's/Monlor-Tools/Monlor-Test/' install_test.sh 57 | # else 58 | # sed -i 's/Monlor-Tools/Monlor-Test/' install_test.sh 59 | # fi 60 | tar -zcvf monlor.tar.gz monlor/ 61 | mv -f monlor.tar.gz appstore/ 62 | rm -rf monlor/ 63 | fi 64 | if [ ! -z "$name" -a "$name" != "-v" ]; then 65 | #pack app 66 | cd apps/ 67 | if [ "$name" == "all" ]; then 68 | ls | while read line 69 | do 70 | [ "$2" == "-v" ] && vapp $line 71 | tar -zcvf $line.tar.gz $line/ 72 | done 73 | $md5 ./*.tar.gz > ../md5.txt 74 | else 75 | [ "$2" == "-v" ] && vapp $name 76 | tar -zcvf $name.tar.gz $name/ 77 | if [ "`uname -s`" == "Darwin" ]; then 78 | sed -i "" "/$name/d" ../md5.txt 79 | else 80 | sed -i "/$name/d" ../md5.txt 81 | fi 82 | $md5 ./$name.tar.gz >> ../md5.txt 83 | fi 84 | mv -f ./*.tar.gz ../appstore 85 | cd ../ 86 | fi 87 | rm -rf version/ 88 | rm -rf version.tar.gz 89 | mkdir version 90 | ls apps/ | while read line 91 | do 92 | cp apps/$line/config/version.txt version/$line.txt 93 | done 94 | cp config/version.txt version/tools.txt 95 | tar -zcvf version.tar.gz version/ 96 | rm -rf version/ 97 | } 98 | 99 | localgit() { 100 | git add . 101 | git commit -m "`date +%Y-%m-%d`" 102 | } 103 | 104 | github() { 105 | git remote rm origin 106 | git remote add origin https://github.com/monlor/Monlor-Tools.git 107 | git push origin master -f 108 | } 109 | 110 | coding() { 111 | git remote rm origin 112 | git remote add origin https://git.coding.net/monlor/Monlor-Tools.git 113 | git push origin master -f 114 | } 115 | 116 | testing() { 117 | git remote rm origin 118 | git remote add origin https://git.coding.net/monlor/Monlor-Test.git 119 | git push origin master -f 120 | } 121 | 122 | reset() { 123 | 124 | git checkout --orphan latest_branch 125 | git add -A 126 | git commit -am "`date +%Y-%m-%d`" 127 | git branch -D master 128 | git branch -m master 129 | # git push -f origin master 130 | # github 131 | # coding 132 | 133 | } 134 | 135 | case $1 in 136 | all) 137 | localgit 138 | github 139 | coding 140 | testing 141 | ;; 142 | github) 143 | localgit 144 | github 145 | ;; 146 | coding) 147 | localgit 148 | coding 149 | ;; 150 | push) 151 | localgit 152 | github 153 | coding 154 | ;; 155 | pack) 156 | pack $2 $3 157 | ;; 158 | test) 159 | localgit 160 | testing 161 | ;; 162 | reset) 163 | reset 164 | ;; 165 | esac 166 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | 4 | clear 5 | logsh() { 6 | # 输出信息到/tmp/messages和标准输出 7 | logger -s -p 1 -t "$1" "$2" 8 | return 0 9 | 10 | } 11 | echo "***********************************************" 12 | echo "** **" 13 | echo "** Welcome to Monlor Tools! **" 14 | echo "** **" 15 | echo "***********************************************" 16 | logsh "【Tools】" "请按任意键安装工具箱(Ctrl + C 退出)." 17 | read answer 18 | monlorurl="https://coding.net/u/monlor/p/Monlor-Tools/git/raw/master" 19 | model=$(cat /proc/xiaoqiang/model) 20 | ins_method="1" 21 | if [ "$model" == "R1D" -o "$model" == "R2D" -o "$model" == "R3D" ]; then 22 | userdisk="/userdisk/data" 23 | monlorpath="/etc/monlor" 24 | CPU=arm 25 | elif [ "$model" == "R3" -o "$model" == "R3P" -o "$model" == "R3G" -o "$model" == "R1CM" ]; then 26 | userdisk=$(df|awk '/\/extdisks\/sd[a-z][0-9]?$/{print $6;exit}') 27 | logsh "【Tools】" "请选择安装方式(1.内置储存 2.外置储存 3.内存安装) " 28 | read res 29 | case "$res" in 30 | 1) 31 | monlorpath="/etc/monlor" 32 | [ -z "$userdisk" ] && userdisk="$monlorpath" 33 | ins_method=1 34 | ;; 35 | 2) 36 | [ -z "$userdisk" ] && logsh "【Tools】" "未找到外置储存!" && exit 37 | monlorpath="$userdisk"/.monlor 38 | ins_method=2 39 | ;; 40 | 3) 41 | logsh "【Tools】" "内存安装占用内存多,重启会自动更新工具箱和插件(回车继续)." 42 | read answer 43 | monlorpath="/etc/monlor" 44 | [ -z "$userdisk" ] && userdisk="$monlorpath" 45 | ins_method=3 46 | ;; 47 | *) 48 | monlorpath="/etc/monlor" 49 | [ -z "$userdisk" ] && userdisk="$monlorpath" 50 | ;; 51 | esac 52 | CPU=mips 53 | else 54 | logsh "【Tools】" "不支持你的路由器!" 55 | exit 56 | fi 57 | 58 | if [ -d "$monlorpath" ]; then 59 | logsh "【Tools】" "工具箱已安装,是否覆盖?[1/0] " 60 | read res 61 | if [ "$res" == '1' ]; then 62 | rm -rf $monlorpath 63 | rm -rf /etc/config/monlor 64 | else 65 | exit 66 | fi 67 | fi 68 | mount -o remount,rw / 69 | logsh "【Tools】" "下载工具箱文件..." 70 | rm -rf /tmp/monlor.tar.gz > /dev/null 2>&1 71 | curl -skLo /tmp/monlor.tar.gz "$monlorurl"/appstore/monlor.tar.gz 72 | [ $? -ne 0 ] && logsh "【Tools】" "文件下载失败!" && exit 73 | logsh "【Tools】" "解压工具箱文件" 74 | tar -zxvf /tmp/monlor.tar.gz -C /tmp > /dev/null 2>&1 75 | [ $? -ne 0 ] && logsh "【Tools】" "文件解压失败!" && exit 76 | cp -rf /tmp/monlor $monlorpath 77 | chmod -R +x $monlorpath/* 78 | #初始化插件列表 79 | touch $monlorpath/config/applist.txt 80 | logsh "【Tools】" "初始化工具箱..." 81 | [ ! -f "/etc/config/monlor" ] && touch /etc/config/monlor 82 | uci set monlor.tools=config 83 | uci set monlor.tools.userdisk="$userdisk" 84 | uci set monlor.tools.path="$monlorpath" 85 | uci set monlor.tools.url="$monlorurl" 86 | uci set monlor.tools.ins_method="$ins_method" 87 | uci set monlor.tools.version="$(cat /tmp/monlor/config/version.txt)" 88 | uci commit monlor 89 | 90 | # if [ -f "$userdisk/.monlor.conf.bak" ]; then 91 | # echo -n "检测到备份的配置,是否要恢复?[y/n] " 92 | # read answer 93 | # if [ "$answer" == 'y' ]; then 94 | # mv $userdisk/.monlor.conf.bak $userdisk/.monlor.conf 95 | # else 96 | # [ ! -f $userdisk/.monlor.conf ] && cp /etc/monlor/config/monlor.conf $userdisk/.monlor.conf 97 | # fi 98 | # fi 99 | kill -9 $(echo $(ps | grep monlor/scripts | grep -v grep | awk '{print$1}')) > /dev/null 2>&1 100 | $monlorpath/scripts/init.sh 101 | rm -rf /tmp/monlor.tar.gz 102 | rm -rf /tmp/monlor 103 | logsh "【Tools】" "工具箱安装完成!" 104 | 105 | logsh "【Tools】" "运行monlor命令即可配置工具箱" 106 | rm -rf /tmp/install.sh 107 | -------------------------------------------------------------------------------- /md5.txt: -------------------------------------------------------------------------------- 1 | MD5 (./kms.tar.gz) = c031f5c2771123a02fa71b4efdd428af 2 | MD5 (./ngrok.tar.gz) = 2006be7f271aa9bed43f29a607ec3e45 3 | MD5 (./tinyproxy.tar.gz) = 9567284f9f507549538bf31cc10bebd7 4 | MD5 (./vsftpd.tar.gz) = b09e00e8eee2bfb2df63c09124b57360 5 | MD5 (./firewall.tar.gz) = 64babead10ceb52326704ed353f4f42e 6 | 138915fa50d282c6babe1e649dec6447 ./webshell.tar.gz 7 | MD5 (./jetbrains.tar.gz) = f5cb34e26473204dbbf66540883ee501 8 | 3a9dddb34f3b120d689e8479bea0c0f4 ./monlor.tar.gz 9 | MD5 (./filebrowser.tar.gz) = d137f6797409e161af4d55c3c95cca6f 10 | MD5 (./koolproxy.tar.gz) = 775914cc18bf8bd46fec1fbf05d98644 11 | MD5 (./easyexplorer.tar.gz) = dfc980f35a49aef736656c1898e5b2d3 12 | MD5 (./qiandao.tar.gz) = 40865d760a5d51a02f47a815b67f727c 13 | MD5 (./httpfile.tar.gz) = 0df977c749a97bc5101f770f6ede4077 14 | MD5 (./kodexplorer.tar.gz) = 3d65ee202e2321ccbc38c04b531c8922 15 | MD5 (./zerotier.tar.gz) = a057c671ba4627ea8d3da91ff51a2210 16 | MD5 (./entware.tar.gz) = a99dae6c7ff2e66da5db82e1c784419d 17 | MD5 (./frpc.tar.gz) = 56107d0c31284a04a1cbccbc1be2d631 18 | MD5 (./verysync.tar.gz) = 5561c998c1bd11cfb8820a6b1f326b70 19 | fefecdfd69239d68086c8bce4b33f4a4 ./aria2.tar.gz 20 | MD5 (./shadowsocks.tar.gz) = 89c5e3e922cd4bbc962c1f6dd0c9f4b5 21 | 7906f08b1c5c4c82eeac3c336985aaf6 ./fastdick.tar.gz 22 | -------------------------------------------------------------------------------- /newapp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 快速生成新app 3 | dir=./apps 4 | appname="$1" 5 | service="$2" 6 | appinfo="$3" 7 | tools="$(cat config/version.txt)" 8 | [ -z "$appname" -o -z "$service" -o -z "$appinfo" ] && echo "信息为空(插件名,服务名,介绍)!" && exit 9 | [ -d $dir/$appname ] && echo "插件已存在!" && exit 10 | cd $dir || (mkdir -p $dir && cd $dir) 11 | mkdir -p $appname 12 | mkdir -p $appname/bin 13 | mkdir -p $appname/config 14 | mkdir -p $appname/script 15 | echo "生成插件版本号文件..." 16 | echo 1.0.0 > $appname/config/version.txt 17 | echo "生成插件uci配置文件..." 18 | cat > $appname/config/$appname.uci <<-EOF 19 | uciset="uci set monlor.$appname" 20 | \$uciset=config 21 | \$uciset.service="$service" 22 | \$uciset.appname="$appname" 23 | \$uciset.tools="$tools" 24 | \$uciset.appinfo="$appinfo" 25 | \$uciset.newinfo="" 26 | EOF 27 | echo "生成工具箱配置文件..." 28 | cat > $appname/config/monlor.conf < $appname/script/$appname.sh <<-EOF 51 | #!/bin/ash /etc/rc.common 52 | source "\$(uci -q get monlor.tools.path)"/scripts/base.sh 53 | eval \`ucish export $appname\` 54 | 55 | START=95 56 | STOP=95 57 | SERVICE_USE_PID=1 58 | SERVICE_WRITE_PID=1 59 | SERVICE_DAEMONIZE=1 60 | EXTRA_COMMANDS=" status backup recover" 61 | EXTRA_HELP=" status Get \$appname status" 62 | 63 | start() { 64 | 65 | [ -n "\$(pidof \$appname)" ] && logsh "【\$service】" "\$appname已经在运行!" && exit 1 66 | logsh "【\$service】" "正在启动\$appname服务... " 67 | # cru a "\$appname" "0 6 * * * \$monlorpath/apps/\$appname/script/\$appname.sh restart" 68 | # Scripts Here 69 | # iptables -I INPUT -p tcp --dport \$port -m comment --comment "monlor-\$appname" -j ACCEPT 70 | service_start \$BIN/\$appname 71 | [ \$? -ne 0 ] && logsh "【\$service】" "启动\$appname服务失败!" && end 72 | logsh "【\$service】" "启动\$appname服务完成!" 73 | 74 | } 75 | 76 | stop() { 77 | 78 | logsh "【\$service】" "正在停止\$appname服务... " 79 | [ "\$enable" == '0' ] && destroy 80 | service_stop \$BIN/\$appname 81 | kill -9 "\$(pidof \$appname)" 82 | # iptables -D INPUT -p tcp --dport \$port -m comment --comment "monlor-\$appname" -j ACCEPT > /dev/null 2>&1 83 | 84 | } 85 | 86 | destroy() { 87 | 88 | # End app, Scripts here 89 | # cru d "\$appname" 90 | return 91 | 92 | } 93 | 94 | end() { 95 | 96 | uci set monlor.\$appname.enable=0 97 | uci commit monlor 98 | stop 99 | exit 1 100 | 101 | } 102 | 103 | restart() { 104 | 105 | stop 106 | sleep 1 107 | start 108 | 109 | } 110 | 111 | status() { 112 | 113 | if [ -n "\$(pidof \$appname)" ]; then 114 | echo -e "运行中\n1" 115 | else 116 | echo -e "未运行\n0" 117 | fi 118 | } 119 | 120 | backup() { 121 | 122 | mkdir -p \$monlorbackup/\$appname 123 | # Backup scripts here 124 | return 125 | 126 | } 127 | 128 | recover() { 129 | 130 | # Recover scripts here 131 | return 132 | 133 | } 134 | EOF 135 | -------------------------------------------------------------------------------- /newinfo.txt: -------------------------------------------------------------------------------- 1 | 1. 工具箱新增web界面,暂时只有ss和kp两个插件,支持最新版固件 2 | 2. 新增插件“自动签到”,arm平台aria2程序更新到1.34 3 | 3. 插件Entware可以启动ONMP安装程序,安装前请勿安装HttpFile和KodExplorer 4 | 4. 插件Frpc现在支持版本号选择,并默认安装版本更新到0.20.0 5 | 5. 更新ss规则地址,ss的web页面支持订阅节点 -------------------------------------------------------------------------------- /scripts/addweb: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | monlorpath=$(uci -q get monlor.tools.path) || exit 4 | 5 | miluci="/usr/lib/lua/luci" 6 | monlorweb="$monlorpath/web" 7 | staticdir="/tmp/syslogbackup" 8 | tmpluci="/tmp/mountfiles" 9 | 10 | mkdir -p $staticdir &> /dev/null 11 | mkdir -p $tmpluci &> /dev/null 12 | umount -lf $miluci &> /dev/null 13 | rm -rf $staticdir/css 14 | rm -rf $staticdir/img 15 | rm -rf $tmpluci/luci 16 | 17 | cp -rf $miluci $tmpluci 18 | mkdir -p $tmpluci/luci/view/web/monlor/ 19 | mkdir -p $staticdir/css/ 20 | mkdir -p $staticdir/img 21 | ln -sf $monlorweb/lua/api/* $tmpluci/luci/controller/api/ 22 | ln -sf $monlorweb/lua/web/* $tmpluci/luci/controller/web/ 23 | ln -sf $monlorweb/htm/* $tmpluci/luci/view/web/monlor/ 24 | ln -sf $monlorweb/css/* $staticdir/css/ 25 | ln -sf $monlorweb/img/* $staticdir/img/ 26 | 27 | cat $tmpluci/luci/view/web/inc/header.htm | grep monlor > /dev/null 2>&1 28 | if [ $? -ne 0 ] ; then 29 | sed -i '/高级设置/a\
  • class="active"<%end%>>"><%:插件中心%>
  • ' $tmpluci/luci/view/web/inc/header.htm 30 | fi 31 | 32 | #model photo 33 | sed -i 's/#admin-mob/#admin-PC/' $tmpluci/luci/view/web/sysauth.htm 34 | sed -i 's/"detail"/"detail" style="display:none;"/' $tmpluci/luci/view/web/sysauth.htm 35 | sed -i 's/"download"/"download" style="display:none;"/' $tmpluci/luci/view/web/sysauth.htm 36 | sed -i 's/"tip"/"tip" style="display:none;"/' $tmpluci/luci/view/web/sysauth.htm 37 | sed -i 's///' $tmpluci/luci/view/web/sysauth.htm 39 | sed -i 's/minValue="2"//' $tmpluci/luci/view/web/setting/nat_dmz.htm 40 | 41 | mount --bind $tmpluci/luci $miluci 42 | 43 | rm -rf /tmp/luci-modulecache 44 | rm -rf /tmp/luci-indexcache 45 | -------------------------------------------------------------------------------- /scripts/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | logger -p 1 -t "【Tools】" "工具箱初始化脚本启动..." 4 | initpath() { 5 | monlorpath=$(uci -q get monlor.tools.path) 6 | userdisk=$(uci -q get monlor.tools.userdisk) 7 | if [ -z "$monlorpath" ] || [ -z "$userdisk" ]; then 8 | model=$(cat /proc/xiaoqiang/model) 9 | if [ "$model" == "R1D" -o "$model" == "R2D" -o "$model" == "R3D" ]; then 10 | userdisk="/userdisk/data" 11 | monlorpath="/etc/monlor" 12 | elif [ "$model" == "R3" -o "$model" == "R3P" -o "$model" == "R3G" -o "$model" == "R1CM" ]; then 13 | if [ $(df|grep -Ec '\/extdisks\/sd[a-z][0-9]?$') -ne 0 ]; then 14 | userdisk=$(df|awk '/\/extdisks\/sd[a-z][0-9]?$/{print $6;exit}') 15 | if [ -d "/etc/monlor" ]; then 16 | monlorpath="/etc/monlor" 17 | else 18 | monlorpath=$userdisk/.monlor 19 | fi 20 | else 21 | userdisk="/etc/monlor" 22 | monlorpath="/etc/monlor" 23 | fi 24 | fi 25 | if [ ! -f /etc/config/monlor ]; then 26 | cp -rf "$monlorpath"/config/monlor.uci /etc/config/monlor 27 | fi 28 | uci set monlor.tools.userdisk="$userdisk" 29 | uci set monlor.tools.path="$monlorpath" 30 | uci commit monlor 31 | fi 32 | } 33 | initpath 34 | [ ! -d "$monlorpath" ] && logger -s -p 1 -t "【Tools】" "未找到工具箱文件!" && exit 35 | 36 | source "$monlorpath"/scripts/base.sh || exit 37 | 38 | # mount -o remount,rw / 39 | 40 | result=`ps | grep {init.sh} | grep -v grep | wc -l` 41 | if [ "$result" -gt '2' ]; then 42 | logsh "【Tools】" "检测到初始化脚本已在运行" 43 | exit 44 | fi 45 | 46 | if [ "$(uci -q get monlor.tools.webui)" != '0' ]; then 47 | logsh "【Tools】" "添加工具箱Web页面" 48 | $monlorpath/scripts/addweb 49 | fi 50 | 51 | logsh "【Tools】" "检查环境变量配置" 52 | result=$(cat /etc/profile | grep -c monlor/config) 53 | if [ "$result" == 0 ]; then 54 | echo "source $monlorpath/config/profile" >> /etc/profile 55 | fi 56 | 57 | logsh "【Tools】" "检查定时任务配置" 58 | cru a monitor "*/6 * * * * $monlorpath/scripts/monitor.sh" 59 | 60 | logsh "【Tools】" "检查工具箱开机启动配置" 61 | result=$(cat /etc/firewall.user | grep init.sh | wc -l) > /dev/null 2>&1 62 | if [ "$result" == '0' ]; then 63 | echo "$monlorpath/scripts/init.sh" > /etc/firewall.user 64 | fi 65 | 66 | result1=$(uci -q get monlor.tools.hosts) 67 | if [ "$result1" == '1' ]; then 68 | logsh "【Tools】" "检查GitHub的hosts配置" 69 | result2=$(cat /etc/hosts | grep -c "monlor-hosts") 70 | if [ "$result2" == '0' ]; then 71 | cat $monlorpath/config/hosts.txt >> /etc/hosts 72 | fi 73 | fi 74 | 75 | 76 | logsh "【Tools】" "运行工具箱监控脚本" 77 | $monlorpath/scripts/monitor.sh -f 78 | 79 | # ssh登录界面 80 | # [ -z "`mount | grep banner`" ] && mount --bind /tmp/banner /etc/banner 81 | 82 | # 防止系统升级导致迅雷禁用失效 83 | xunlei_disable=$(uci -q get monlor.tools.xunlei) 84 | if [ "$xunlei_disable" == '1' ]; then 85 | logsh "【Tools】" "检查迅雷配置" 86 | xunlei_enabled=$(ps | grep -E 'etm|xunlei' | grep -v grep | wc -l) 87 | if [ "$xunlei_enabled" != '0' ]; then 88 | killall etm 2>/dev/null 89 | /etc/init.d/xunlei disable 2>/dev/null 90 | sed -i 's@/etc/config/thunder@/etc/thunder@g' /etc/init.d/xunlei 91 | if [ -d /etc/config/thunder ]; then 92 | cp -a /etc/config/thunder /etc 93 | rm -rf /etc/config/thunder 94 | fi 95 | fi 96 | fi 97 | 98 | # logsh "【Tools】" "检查ssh外网访问配置" 99 | # ssh_enabled=$(iptables -S | grep -c "monlor-ssh") 100 | # if [ "$ssh_enabled" == '0' ]; then 101 | # iptables -I INPUT -p tcp --dport 22 -m comment --comment "monlor-ssh" -j ACCEPT > /dev/null 2>&1 102 | # fi 103 | 104 | # 禁止更新 105 | no_update=$(uci -q get monlor.tools.no_update) 106 | if [ "$no_update" == '1' ]; then 107 | sed -i "/otapredownload/d" /etc/crontabs/root 108 | else 109 | sed -i "/otapredownload/d" /etc/crontabs/root 110 | echo "15 3,4,5 * * * /usr/sbin/otapredownload >/dev/null 2>&1" >> /etc/crontabs/root 111 | fi 112 | 113 | # 检查内存安装方式 114 | ins_method=$(uci -q get monlor.tools.ins_method) 115 | if [ "$ins_method" == '3' ]; then 116 | if [ ! -d /tmp/monlorapps ]; then 117 | mkdir -p /tmp/monlorapps > /dev/null 2>&1 118 | mount --bind /tmp/monlorapps $monlorpath/apps 119 | while(true) 120 | do 121 | if pingsh; then 122 | $monlorpath/scripts/update.sh > /dev/null 2>&1 123 | $monlorpath/scripts/monlor recover > /dev/null 2>&1 124 | break 125 | else 126 | logsh "【Tools】" "网络问题,无法恢复工具箱,5秒后重试!" 127 | sleep 5 128 | fi 129 | done 130 | 131 | uci -q set monlor.tools.ins_method=3 132 | [ $? -eq 0 ] && initpath 133 | fi 134 | fi 135 | 136 | logsh "【Tools】" "运行用户自定义脚本" 137 | $monlorpath/scripts/userscript.sh 138 | 139 | -------------------------------------------------------------------------------- /scripts/monitor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | source "$(uci -q get monlor.tools.path)"/scripts/base.sh 4 | logsh "【Tools】" "工具箱监测脚本启动..." -p 5 | [ ! -d "$monlorpath" ] && logsh "【Tools】" "工具箱文件未找到,请确认是否拔出外接设备!" && exit 6 | result=$(ps | grep {monitor.sh} | grep -v grep | wc -l) 7 | [ "$result" -gt '3' ] && logsh "【Tools】" "检测到monitor.sh已在运行" && exit 8 | [ -n "$(pidof monlor)" -a "$1" != '-f' ] && logsh "【Tools】" "检测到正在配置工具箱!" && exit 9 | [ -n "$(pidof update.sh)" ] && logsh "【Tools】" "检测到工具箱正在更新!" && exit 10 | 11 | #检查samba共享目录 12 | samba_path=$(uci -q get monlor.tools.samba_path) 13 | if [ ! -z "$samba_path" ]; then 14 | logsh "【Tools】" "检查samba共享目录配置" -s 15 | if [ ! -f /etc/samba/smb.conf ]; then 16 | logsh "【Tools】" "未找到samba配置文件!" 17 | else 18 | result=$(cat /etc/samba/smb.conf | grep path | head -1 | awk '{print$3}') 19 | if [ "$result" != "$samba_path" ]; then 20 | logsh "【Tools】" "检测到samba路径变更, 正在设置..." 21 | sed -i "1,/path/ s#\(path\).*#\1 = $samba_path#" /etc/samba/smb.conf 22 | killall smbd && /usr/sbin/smbd -D &> /dev/null 23 | killall nmbd && /usr/sbin/nmbd -D &> /dev/null 24 | fi 25 | fi 26 | fi 27 | 28 | #检查外接盘变化 29 | if [ "$model" == "mips" -a "$(uci -q get monlor.tools.ins_method)" == '2' ]; then 30 | logsh "【Tools】" "检查外置储存状态..." -s 31 | userdisk2=$(df|awk '/\/extdisks\/sd[a-z][0-9]?$/{print $6;exit}') 32 | if [ ! -z "$userdisk2" ]; then 33 | if [ "$userdisk" != "$userdisk2" ]; then 34 | userdisk="$userdisk2" 35 | uci set monlor.tools.userdisk="$userdisk" 36 | uci commit monlor 37 | fi 38 | else 39 | userdisk="$monlorpath" 40 | uci set monlor.tools.userdisk="$userdisk" 41 | uci commit monlor 42 | fi 43 | fi 44 | 45 | # 检查CPU占用100%问题 46 | logsh "【Tools】" "检查系统进程CPU占用" -s 47 | top -n1 -b > /tmp/toptmp.txt 48 | toptext=$(cat /tmp/toptmp.txt | grep ustackd | grep -v grep | head -1) 49 | if [ ! -z "$toptext" ]; then 50 | result=$(echo $toptext | awk '{print$9}') 51 | [ -z $(echo $result | grep "^[0-9][0-9]*$") ] && result=$(echo $toptext | awk '{print$8}') 52 | if [ ! -z "$result" ]; then 53 | result=$(echo $result | cut -d. -f1) 54 | [ "$result" -gt "20" ] && killall ustackd > /dev/null 2>&1 55 | fi 56 | fi 57 | 58 | toptext=$(cat /tmp/toptmp.txt | grep himan | grep -v grep | head -1) 59 | if [ ! -z "$toptext" ]; then 60 | result=$(echo $toptext | awk '{print$9}') 61 | [ -z $(echo $result | grep "^[0-9][0-9]*$") ] && result=$(echo $toptext | awk '{print$8}') 62 | if [ ! -z "$result" ]; then 63 | result=$(echo $result | cut -d. -f1) 64 | [ "$result" -gt "20" ] && killall himan > /dev/null 2>&1 65 | fi 66 | fi 67 | 68 | monitor() { 69 | appname=$1 70 | checkuci $appname || return 71 | service=`uci -q get monlor.$1.service` || service="$appname" 72 | if [ -z $appname ] || [ -z $service ]; then 73 | logsh "【Tools】" "未传入插件名!" 74 | return 75 | fi 76 | App_enable=$(uci -q get monlor.$appname.enable) 77 | result=$($monlorpath/apps/$appname/script/$appname.sh status | tail -1) 78 | 79 | #检查插件运行异常情况 80 | if [ -z "$(pidof $appname.sh)" ]; then 81 | if [ "$App_enable" == '1' -a "$result" == '0' ]; then 82 | logsh "【$service】" "$appname运行异常,正在重启..." 83 | $monlorpath/apps/$appname/script/$appname.sh restart 84 | # elif [ "$App_enable" == '0' -a "$result" == '1' ]; then 85 | # logsh "【$service】" "$appname配置已修改,正在停止$appname服务..." 86 | # $monlorpath/apps/$appname/script/$appname.sh stop 87 | fi 88 | fi 89 | 90 | } 91 | 92 | #监控运行状态 93 | logsh "【Tools】" "检查插件运行状态" -s 94 | cat $monlorpath/config/applist.txt | while read line 95 | do 96 | monitor $line 97 | done 98 | 99 | # logger -s -t "【Tools】" "获取更新插件列表" 100 | # rm -rf /tmp/applist.txt 101 | # wgetsh /tmp/applist.txt $monlorurl/temp/applist_"$xq".txt 102 | # if [ $? -ne 0 ]; then 103 | # [ "$model" == "arm" ] && applist="applist.txt" 104 | # [ "$model" == "mips" ] && applist="applist_mips.txt" 105 | # wgetsh /tmp/applist.txt $monlorurl/temp/"$applist" 106 | # [ $? -ne 0 ] && logsh "【Tools】" "获取失败,检查网络问题!" 107 | # fi 108 | # logger -s -t "【Tools】" "获取工具箱版本信息" 109 | # rm -rf /tmp/version 110 | # rm -rf /tmp/version.tar.gz 111 | # wgetsh /tmp/version.tar.gz $monlorurl/version.tar.gz 112 | # [ $? -ne 0 ] && logsh "【Tools】" "获取版本号信息失败!请稍后再试" 113 | # tar -zxvf /tmp/version.tar.gz -C /tmp > /dev/null 2>&1 114 | # rm -rf /tmp/version.tar.gz 115 | 116 | # ssh登陆界面 117 | # $monlorpath/scripts/monlor menulist > /tmp/banner -------------------------------------------------------------------------------- /scripts/uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | source "$(uci -q get monlor.tools.path)"/scripts/base.sh 4 | 5 | clear 6 | logsh "【Tools】" "即将卸载工具箱,按任意键继续(Ctrl + C 退出)." 7 | read answer 8 | 9 | logsh "【Tools】" "正在卸载工具箱..." 10 | 11 | logsh "【Tools】" "停止所有插件" 12 | 13 | ls $monlorpath/apps | while read line 14 | do 15 | result=$(uci -q get monlor.$line.enable) 16 | [ "$result" == '1' ] && $monlorpath/apps/$line/script/$line.sh stop 17 | done 18 | 19 | logsh "【Tools】" "关闭工具箱web页面" 20 | umount -lf /usr/lib/lua/luci 21 | rm -rf /tmp/mountfiles 22 | rm -rf /tmp/syslogbackup 23 | 24 | logsh "【Tools】" "删除所有工具箱配置信息" 25 | 26 | result=$(cat /etc/profile | grep -c monlor/config) 27 | if [ "$result" != 0 ]; then 28 | sed -i "/monlor\/config/d" /etc/profile 29 | fi 30 | 31 | logsh "【Tools】" "删除定时任务" 32 | cru c 33 | 34 | result=$(cat /etc/firewall.user | grep init.sh | wc -l) > /dev/null 2>&1 35 | if [ "$result" != '0' ]; then 36 | sed -i "/init.sh/d" /etc/firewall.user 37 | fi 38 | 39 | # if [ -f "$monlorconf" ]; then 40 | # mv $monlorconf $userdisk/.monlor.conf.bak 41 | # fi 42 | 43 | xunlei_enable=$(uci -q get monlor.tools.xunlei) 44 | if [ "$xunlei_enable" == '1' ]; then 45 | logsh "【Tools】" "检测到迅雷被关闭,正在恢复..." 46 | sed -i 's@/etc/thunder@/etc/config/thunder@g' /etc/init.d/xunlei 47 | if [ ! -d /etc/config/thunder ]; then 48 | cp -a /etc/thunder /etc/config 49 | rm -rf /etc/thunder 50 | fi 51 | /etc/init.d/xunlei start & 52 | fi 53 | # 内存安装方式 取消挂载 54 | ins_method=$(uci -q get monlor.tools.ins_method) 55 | [ "$ins_method" == '0' ] && umount -lf $monlorpath/apps && rm -rf /tmp/monlorapps 56 | 57 | if [ -f "/etc/config/monlor" ]; then 58 | rm -rf /etc/config/monlor 59 | fi 60 | 61 | logsh "【Tools】" "See You!" 62 | 63 | rm -rf $monlorpath 64 | rm -rf /tmp/version 65 | -------------------------------------------------------------------------------- /scripts/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | #copyright by monlor 3 | source "$(uci -q get monlor.tools.path)"/scripts/base.sh 4 | 5 | logsh "【Tools】" "正在更新工具箱程序... " 6 | command -v wgetsh > /dev/null 2>&1 7 | wgetenable="$?" 8 | if [ "$1" != "-f" ]; then 9 | #检查更新 10 | if [ "$wgetenable" -ne 0 ]; then 11 | logsh "【Tools】" "使用临时的下载方式" 12 | result=$(curl -skL -w %{http_code} -o /tmp/tools.txt $monlorurl/config/version.txt) 13 | [ "$result" != "200" ] && logsh "【Tools】" "检查更新失败!" && exit 14 | else 15 | wgetsh /tmp/version/tools.txt $monlorurl/config/version.txt > /dev/null 2>&1 16 | [ $? -ne 0 ] && logsh "【Tools】" "检查更新失败!" && exit 17 | fi 18 | newver=$(cat /tmp/version/tools.txt) 19 | logsh "【Tools】" "当前版本$oldver,最新版本$monlorver" 20 | command -v compare > /dev/null 2>&1 21 | if [ $? -eq 0 ]; then 22 | !(compare $newver $oldver) && logsh "【Tools】" "工具箱已经是最新版!" && exit 23 | else 24 | [ "$newver" == "$oldver" ] && logsh "【Tools】" "工具箱已经是最新版!" && exit 25 | fi 26 | logsh "【Tools】" "版本不一致,正在更新工具箱..." 27 | fi 28 | rm -rf /tmp/monlor.tar.gz 29 | rm -rf /tmp/monlor 30 | if [ "$wgetenable" -ne 0 ]; then 31 | logsh "【Tools】" "使用临时的下载方式" 32 | result=$(curl -skL -w %{http_code} -o "/tmp/monlor.tar.gz" "$monlorurl/appstore/monlor.tar.gz") 33 | [ "$result" != "200" ] && logsh "【Tools】" "工具箱文件下载失败!" && exit 34 | else 35 | wgetsh "/tmp/monlor.tar.gz" "$monlorurl/appstore/monlor.tar.gz" > /dev/null 2>&1 36 | [ $? -ne 0 ] && logsh "【Tools】" "工具箱文件下载失败!" && exit 37 | fi 38 | logsh "【Tools】" "解压工具箱文件" 39 | tar -zxvf /tmp/monlor.tar.gz -C /tmp > /dev/null 2>&1 40 | [ $? -ne 0 ] && logsh "【Tools】" "文件解压失败!" && exit 41 | logsh "【Tools】" "更新工具箱配置脚本" 42 | # 清除更新时不需要的文件 43 | rm -rf /tmp/monlor/apps 44 | rm -rf /tmp/monlor/scripts/dayjob.sh 45 | rm -rf /tmp/monlor/config/monlor.uci 46 | rm -rf /tmp/monlor/scripts/userscript.sh 47 | # if [ "$model" == "mips" ]; then 48 | # if [ -f /tmp/monlor/config/applist_"$xq".txt ]; then 49 | # mv -f /tmp/monlor/config/applist_"$xq".txt /tmp/monlor/config/applist.txt 50 | # else 51 | # mv -f /tmp/monlor/config/applist_mips.txt /tmp/monlor/config/applist.txt 52 | # fi 53 | # fi 54 | # rm -rf /tmp/monlor/config/applist_*.txt 55 | # 更新版本号(因为强制更新跳过版本号检查不会更新版本号) 56 | [ "$1" == "-f" ] && cp -rf /tmp/monlor/config/version.txt /tmp/version/tools.txt 57 | uci set monlor.tools.version="$(cat /tmp/monlor/config/version.txt)" 58 | uci commit monlor 59 | logsh "【Tools】" "更新工具箱文件" 60 | cp -rf /tmp/monlor/config $monlorpath/ 61 | cp -rf /tmp/monlor/scripts $monlorpath/ 62 | cp -rf /tmp/monlor/web $monlorpath/ 63 | logsh "【Tools】" "赋予可执行权限" 64 | chmod -R +x $monlorpath/scripts/* 65 | chmod -R +x $monlorpath/config/* 66 | 67 | # 更新web页面 68 | [ "$(uci -q get monlor.tools.webui)" != '0' ] && $monlorpath/scripts/addweb 69 | 70 | #旧版本处理 71 | result=$(cat /etc/crontabs/root | grep -c "#monlor-cru") 72 | if [ "$result" == '0' ]; then 73 | sed -i "/monlor/d" /etc/crontabs/root 74 | $monlorpath/scripts/init.sh 75 | fi 76 | [ -f $monlorpath/scripts/crontab.sh ] && rm -rf $monlorpath/scripts/crontab.sh 77 | [ -f $monlorpath/scripts/wget.sh ] && rm -rf $monlorpath/scripts/wget.sh 78 | [ -f $monlorpath/scripts/cru ] && rm -rf $monlorpath/scripts/cru 79 | [ -f $monlorpath/scripts/dayjob.sh ] && rm -rf $monlorpath/scripts/dayjob.sh 80 | [ -f $monlorpath/config/cru.conf ] && rm -rf $monlorpath/config/cru.conf 81 | 82 | cat $monlorpath/config/applist.txt | while read line 83 | do 84 | checkuci $line || continue 85 | [ -f $monlorpath/apps/$line/config/monlor.conf ] && break 86 | wgetsh $monlorpath/apps/$line/config/monlor.conf $monlorurl/apps/$line/config/monlor.conf 87 | done 88 | sed -i "/#monlor-tools/d" /etc/profile 89 | sed -i "/LD_LIBRARY_PATH/d" /etc/profile 90 | sed -i "s#:$monlorpath/scripts##" /etc/profile 91 | cru d getver 92 | cru d dayjob 93 | [ ! -z "`mount | grep banner`" ] && umount -lf /etc/banner 94 | [ "$(uci -q get monlor.tools.ins_method)" == '0' ] && uci set monlor.tools.ins_method=3 && uci commit monlor 95 | #新增加功能设置 96 | result=$(cat /etc/profile | grep -c monlor/config) 97 | if [ "$result" == 0 ]; then 98 | echo "source $monlorpath/config/profile" >> /etc/profile 99 | fi 100 | cru a monitor "*/6 * * * * $monlorpath/scripts/monitor.sh" 101 | 102 | logsh "【Tools】" "工具箱更新完成!更新内容如下:" 103 | echo "-----------------------------------------" 104 | cat /tmp/monlor/newinfo.txt 105 | echo 106 | echo "-----------------------------------------" 107 | echo 108 | # 旧版本没有已经安装的插件列表 109 | compare "$(cat /tmp/monlor/config/version.txt)" 2.6.11 110 | if [ $? -eq 1 ]; then 111 | rm -rf $monlorpath/config/applist.txt 112 | curl -skL $monlorurl/temp/applist.txt | while read line 113 | do 114 | checkuci $line && echo $line >> $monlorpath/config/applist.txt 115 | done 116 | rm -rf /tmp/applist.txt 117 | wgetsh /tmp/applist.txt $monlorurl/temp/applist_"$xq".txt 118 | if [ $? -ne 0 ]; then 119 | [ "$model" == "arm" ] && applist="applist.txt" 120 | [ "$model" == "mips" ] && applist="applist_mips.txt" 121 | wgetsh /tmp/applist.txt $monlorurl/temp/"$applist" 122 | [ $? -ne 0 ] && logsh "【Tools】" "获取失败,检查网络问题!" 123 | fi 124 | fi 125 | 126 | #删除临时文件 127 | rm -rf /tmp/monlor.tar.gz 128 | rm -rf /tmp/monlor -------------------------------------------------------------------------------- /scripts/userscript.sh: -------------------------------------------------------------------------------- 1 | #!/bin/ash 2 | source "$(uci -q get monlor.tools.path)"/scripts/base.sh 3 | #Start line 4 | -------------------------------------------------------------------------------- /temp/applist.txt: -------------------------------------------------------------------------------- 1 | shadowsocks 2 | koolproxy 3 | aria2 4 | vsftpd 5 | kms 6 | frpc 7 | ngrok 8 | webshell 9 | tinyproxy 10 | entware 11 | kodexplorer 12 | easyexplorer 13 | httpfile 14 | verysync 15 | fastdick 16 | firewall 17 | jetbrains 18 | qiandao 19 | filebrowser 20 | zerotier 21 | -------------------------------------------------------------------------------- /temp/applist_R3G.txt: -------------------------------------------------------------------------------- 1 | shadowsocks 2 | koolproxy 3 | aria2 4 | vsftpd 5 | kms 6 | frpc 7 | ngrok 8 | webshell 9 | tinyproxy 10 | verysync 11 | fastdick 12 | firewall 13 | jetbrains 14 | filebrowser 15 | entware 16 | kodexplorer 17 | httpfile 18 | zerotier 19 | -------------------------------------------------------------------------------- /temp/applist_R3P.txt: -------------------------------------------------------------------------------- 1 | shadowsocks 2 | koolproxy 3 | aria2 4 | vsftpd 5 | kms 6 | frpc 7 | ngrok 8 | webshell 9 | tinyproxy 10 | verysync 11 | fastdick 12 | firewall 13 | jetbrains 14 | filebrowser 15 | entware 16 | kodexplorer 17 | httpfile 18 | zerotier 19 | -------------------------------------------------------------------------------- /temp/applist_mips.txt: -------------------------------------------------------------------------------- 1 | shadowsocks 2 | koolproxy 3 | aria2 4 | vsftpd 5 | kms 6 | frpc 7 | ngrok 8 | webshell 9 | tinyproxy 10 | verysync 11 | fastdick 12 | firewall 13 | jetbrains 14 | filebrowser 15 | -------------------------------------------------------------------------------- /temp/dnsmasq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/dnsmasq -------------------------------------------------------------------------------- /temp/frp-bin/0.17.0/frpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.17.0/frpc -------------------------------------------------------------------------------- /temp/frp-bin/0.17.0/frpc_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.17.0/frpc_mips -------------------------------------------------------------------------------- /temp/frp-bin/0.17.0/frps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.17.0/frps -------------------------------------------------------------------------------- /temp/frp-bin/0.17.0/frps_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.17.0/frps_mips -------------------------------------------------------------------------------- /temp/frp-bin/0.20.0/frpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.20.0/frpc -------------------------------------------------------------------------------- /temp/frp-bin/0.20.0/frpc_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.20.0/frpc_mips -------------------------------------------------------------------------------- /temp/frp-bin/0.20.0/frps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.20.0/frps -------------------------------------------------------------------------------- /temp/frp-bin/0.20.0/frps_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.20.0/frps_mips -------------------------------------------------------------------------------- /temp/frp-bin/0.9.3/frpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.9.3/frpc -------------------------------------------------------------------------------- /temp/frp-bin/0.9.3/frpc_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.9.3/frpc_mips -------------------------------------------------------------------------------- /temp/frp-bin/0.9.3/frps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.9.3/frps -------------------------------------------------------------------------------- /temp/frp-bin/0.9.3/frps_mips: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/frp-bin/0.9.3/frps_mips -------------------------------------------------------------------------------- /temp/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/img.png -------------------------------------------------------------------------------- /temp/img_old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/img_old.png -------------------------------------------------------------------------------- /temp/kodexplorer.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/kodexplorer.tar.gz -------------------------------------------------------------------------------- /temp/wget: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/temp/wget -------------------------------------------------------------------------------- /version.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/version.tar.gz -------------------------------------------------------------------------------- /web/htm/aria2.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小米路由器插件中心 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 |

    小米路由器插件中心

    16 |
    17 |
    18 |
    19 |
    20 |
    21 | Aria2 22 | 23 |
    24 |
    25 | 启动服务 26 | 27 |
    28 |
    29 | 运行状态 30 | 未运行 31 |
    32 |
    33 | 34 |
    35 | 36 | 37 |
    38 |
    39 |
    40 | 41 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /web/htm/fastdick.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小米路由器插件中心 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 |

    小米路由器插件中心

    16 |
    17 |
    18 |
    19 |
    20 |
    21 | Fastdick 22 | 23 |
    24 |
    25 | 启动服务 26 | 27 |
    28 |
    29 | 运行状态 30 | 未运行 31 |
    32 |
    33 | 34 |
    35 | 36 | 37 |
    38 |
    39 |
    40 | 41 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /web/htm/frp.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小米路由器插件中心 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 |

    小米路由器插件中心

    16 |
    17 |
    18 |
    19 |
    20 |
    21 | Frp 22 | 23 |
    24 |
    25 | 启动服务 26 | 27 |
    28 |
    29 | 运行状态 30 | 未运行 31 |
    32 |
    33 | 34 |
    35 | 36 | 37 |
    38 |
    39 |
    40 | 41 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /web/htm/index.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info Index 4 | ]]-- 5 | local ver = require("xiaoqiang.XQVersion").webVersion 6 | local uci = require("luci.model.uci").cursor() 7 | local hardwareModel = tostring(uci:get("misc", "hardware", "model")) 8 | %> 9 | <%include("web/inc/head")%> 10 | 11 | 小米路由器插件中心 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 | <%include("web/inc/header")%> 20 | 21 |
    22 |
    23 |

    Monlor Tools工具箱

    24 |
    25 | ">
      26 |
    • 27 |
    • Shadowsocks

      到墙外看看
    • 28 |
    29 | ">
      30 |
    • 31 |
    • Koolproxy

      过滤广告
    • 32 |
    33 | 61 |
    62 | <%include("web/inc/footer")%> 63 |
    64 | <%include("web/inc/g.js")%> 65 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /web/htm/kms.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小米路由器插件中心 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 |

    小米路由器插件中心

    16 |
    17 |
    18 |
    19 |
    20 |
    21 | Kms 22 | 23 |
    24 |
    25 | 启动服务 26 | 27 |
    28 |
    29 | 运行状态 30 | 未运行 31 |
    32 |
    33 | 34 |
    35 | 36 | 37 |
    38 |
    39 |
    40 | 41 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /web/htm/koolproxy.htm: -------------------------------------------------------------------------------- 1 | <% 2 | --[[ 3 | Info KoolProxy 4 | ]]-- 5 | local ver = require("xiaoqiang.XQVersion").webVersion 6 | local uci = require("luci.model.uci").cursor() 7 | local version = tostring(uci:get("monlor", "koolproxy", "version")) 8 | %> 9 | <%include("web/inc/head")%> 10 | 小米路由器插件中心 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 | <%include("web/inc/header")%> 20 | 21 |
    22 |
    23 |
    24 |
    25 | KoolProxy 26 | 27 |
    28 |
    29 | 启动服务: 30 | 31 |
    32 |
    33 | 运行状态: 34 | 35 | 获取中... 36 |  VER:<%=version%> 37 | 38 |
    39 |
    40 | 运行模式: 41 | 47 |
    48 |
    49 | 自动更新自定义规则: 50 | 51 |
    52 |
    53 | 证书下载: 54 | 55 |
    56 |
    57 | 58 |
    59 | 60 | 61 |
    62 |
    63 |
    64 | <%include("web/inc/footer")%> 65 | <%include("web/inc/g.js")%> 66 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /web/htm/nginx.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小米路由器插件中心 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 |

    小米路由器插件中心

    16 |
    17 |
    18 |
    19 |
    20 |
    21 | Nginx 22 | 23 |
    24 |
    25 | 启动服务 26 | 27 |
    28 |
    29 | 运行状态 30 | 未运行 31 |
    32 |
    33 | 34 |
    35 | 36 | 37 |
    38 |
    39 |
    40 | 41 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /web/htm/tinyproxy.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小米路由器插件中心 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 |

    小米路由器插件中心

    16 |
    17 |
    18 |
    19 |
    20 |
    21 | Tinyproxy 22 | 23 |
    24 |
    25 | 启动服务 26 | 27 |
    28 |
    29 | 运行状态 30 | 未运行 31 |
    32 |
    33 | 34 |
    35 | 36 | 37 |
    38 |
    39 |
    40 | 41 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /web/htm/webshell.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 小米路由器插件中心 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 |

    小米路由器插件中心

    16 |
    17 |
    18 |
    19 |
    20 |
    21 | Webshell 22 | 23 |
    24 |
    25 | 启动服务 26 | 27 |
    28 |
    29 | 运行状态 30 | 未运行 31 |
    32 |
    33 | 34 |
    35 | 36 | 37 |
    38 |
    39 |
    40 | 41 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /web/img/ico_dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/web/img/ico_dropdown.png -------------------------------------------------------------------------------- /web/img/ico_dropup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/web/img/ico_dropup.png -------------------------------------------------------------------------------- /web/img/ico_notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/web/img/ico_notice.png -------------------------------------------------------------------------------- /web/img/icon-koolproxy-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/web/img/icon-koolproxy-bg.png -------------------------------------------------------------------------------- /web/img/icon-koolproxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/web/img/icon-koolproxy.png -------------------------------------------------------------------------------- /web/img/icon-shadowsocks-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/web/img/icon-shadowsocks-bg.png -------------------------------------------------------------------------------- /web/img/icon-shadowsocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/web/img/icon-shadowsocks.png -------------------------------------------------------------------------------- /web/img/monlor-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monlor/Monlor-Tools/1fc0daf6467d355ac76795784f5e7f18aa7652f4/web/img/monlor-background.jpg -------------------------------------------------------------------------------- /web/lua/web/monlor.lua: -------------------------------------------------------------------------------- 1 | module("luci.controller.web.monlor", package.seeall) 2 | 3 | function index() 4 | entry({"web", "monlor"}, alias("web", "monlor", "index"), _("index"), 70) 5 | entry({"web", "monlor", "index"}, template("web/monlor/index"), _("index"), 71) 6 | entry({"web", "monlor", "ss"}, template("web/monlor/ss"), _("ss"), 72) 7 | entry({"web", "monlor", "koolproxy"}, template("web/monlor/koolproxy"), _("koolproxy"), 73) 8 | entry({"web", "monlor", "frp"}, template("web/monlor/frp"), _("frp"), 74) 9 | entry({"web", "monlor", "tinyproxy"}, template("web/monlor/tinyproxy"), _("tinyproxy"), 75) 10 | entry({"web", "monlor", "kms"}, template("web/monlor/kms"), _("kms"), 76) 11 | entry({"web", "monlor", "aria2"}, template("web/monlor/aria2"), _("aria2"), 77) 12 | entry({"web", "monlor", "webshell"}, template("web/monlor/webshell"), _("webshell"), 78) 13 | entry({"web", "monlor", "nginx"}, template("web/monlor/nginx"), _("nginx"), 79) 14 | entry({"web", "monlor", "fastdick"}, template("web/monlor/fastdick"), _("fastdick"), 80) 15 | end 16 | --------------------------------------------------------------------------------