<%:客户端名%>
<%:MAC%>
<%:IP%>
<%:总计流量%>
<%: 在线时间%>
+
<%:在线设备列表%>
<%:主机名%>
<%:MAC%>
<%:IP%>
<%:总计流量%>
<%: 在线时间%>
$js_str
EOF
@@ -709,7 +709,7 @@ function ip_changes(){
echo IPv4 $IPv4 > ${dir}ip && echo -e IPv6 $IPv6 >> ${dir}ip
[ -z "$title" ] && title="IPv6 地址变化"
[ ! -z "$title" ] && title="IP 地址变化"
- content="${content}${str_splitline}${str_title_start} IPv6 地址变化${str_title_end}${str_linefeed}${str_tab}当前 IPv6:${IPv6}"
+ content="${content}${str_splitline}${str_title_start} IPv6 地址变化${str_title_end}${str_linefeed}${str_tab}当前 IPv6:${IPv6}"
elif [ ! -z "$serverchan_ipv6" ] && [ "$serverchan_ipv6" -ne "0" ] && [ -z "$IPv6" ]; then
echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】获取 IPv6 地址失败" >> ${logfile}
fi
@@ -718,7 +718,7 @@ function ip_changes(){
echo "`date "+%Y-%m-%d %H:%M:%S"` ${disturb_text}路由器已经重启!" >> ${logfile}
[ ! -z "$serverchan_ipv4" ] && [ "$serverchan_ipv4" -ne "0" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 当前IP: ${IPv4}" >> ${logfile}
[ ! -z "$serverchan_ipv6" ] && [ "$serverchan_ipv6" -ne "0" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 当前IPv6: ${IPv6}" >> ${logfile}
- echo IPv4 $IPv4 > ${dir}ip && echo -e IPv6 $IPv6 >> ${dir}ip
+ echo IPv4 $IPv4 > ${dir}ip && echo -e IPv6 $IPv6 >> ${dir}ip
title="路由器重新启动"
content="${content}${str_splitline}${str_title_start} 路由器重新启动${str_title_end}"
[ ! -z "$serverchan_ipv4" ] && [ "$serverchan_ipv4" -ne "0" ] && content="${content}${str_linefeed}${str_tab}当前IP:${IPv4}"
@@ -967,7 +967,7 @@ function login_send(){
cat ${dir}login_monitor|grep -i "Bad password attempt\|Login attempt for nonexistent user from"|grep -Eo "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" >> ${dir}ssh_failed
echo "" > ${dir}login_monitor
add_ip_black
-
+
local login_ip_list=`cat ${dir}web_login|awk '{print $2}'|grep -v "^$"|sort -u|head -n1`
for login_ip in $login_ip_list; do
[ -z "$login_ip" ] && continue
@@ -1073,13 +1073,13 @@ function add_ip_black(){
[ ! -f "${ip_blacklist_path}" ] && local logrow="0"
[ ! -z "$web_login_black" ] && [ "$web_login_black" -eq "0" ] || [ -z "$web_login_black" ] && local logrow="0"
ipset flush ip_blacklist >/dev/null 2>&1
-
+
if [ $logrow -le "0" ]; then
iptables -D INPUT -m set --match-set ip_blacklist src -j DROP >/dev/null 2>&1
ipset destroy ip_blacklist >/dev/null 2>&1
return
fi
-
+
ipset list ip_blacklist >/dev/null 2>&1 || ipset create ip_blacklist hash:ip timeout ${ip_black_timeout} >/dev/null 2>&1
iptables -C INPUT -m set --match-set ip_blacklist src -j DROP >/dev/null 2>&1 || iptables -I INPUT -m set --match-set ip_blacklist src -j DROP >/dev/null 2>&1
echo "$1" >> ${ip_blacklist_path}
@@ -1128,14 +1128,14 @@ function send(){
if [ -z "$1" ] && [ ! -z "$router_wan" ] && [ "$router_wan" -eq "1" ]; then
local send_wanIP=`getip wanipv4`;local send_hostIP=`getip hostipv4`
- local send_content="${send_content}${str_splitline}${str_title_start} WAN 口信息${str_title_end}${str_linefeed}${str_tab}接口ip:${send_wanIP}"
- local send_content="${send_content}${str_linefeed}${str_tab}外网ip:${send_hostIP}"
+ local send_content="${send_content}${str_splitline}${str_title_start} WAN 口信息${str_title_end}${str_linefeed}${str_tab}接口 IPv4:${send_wanIP}"
+ local send_content="${send_content}${str_linefeed}${str_tab}外网 IPv4:${send_hostIP}"
if [ ! -z "$serverchan_ipv6" ] && [ "$serverchan_ipv6" -ne "0" ]; then
local send_wanIPv6=`getip wanipv6`;local send_hostIPv6=`getip hostipv6`
- local send_content="${send_content}${str_linefeed}${str_tab}ipv6 :${send_wanIPv6}"
- local send_content="${send_content}${str_linefeed}${str_tab}外网v6:${send_hostIPv6}"
+ local send_content="${send_content}${str_linefeed}${str_tab}接口 IPv6:${send_wanIPv6}"
+ local send_content="${send_content}${str_linefeed}${str_tab}外网 IPv6:${send_hostIPv6}"
fi
- ( ! echo "$send_wanIP"|grep -q -w ${send_hostIP} ) && local send_content="${send_content}${str_linefeed}${str_tab}外网 ip 与接口 ip 不一致,你的 ip 不是公网 ip"
+ ( ! echo "$send_wanIP"|grep -q -w ${send_hostIP} ) && local send_content="${send_content}${str_linefeed}${str_tab}外网 IP 与接口 IP 不一致,你的 IP 可能不是公网 IP"
local interfaceuptime=`getinterfaceuptime`
[ ! -z "$interfaceuptime" ] && local wanstatustime=`getinterfaceuptime|awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("在线时间:%d天%d时%d分%d秒",run_days,run_hour,run_minute,run_second)}'` && unset run_days run_hour run_minute run_second
local send_content="${send_content}${str_linefeed}${str_tab}${wanstatustime}"
@@ -1200,7 +1200,7 @@ while [ "$serverchan_enable" -eq "1" ]; do
deltemp
usage update
serverchan_disturb;disturb=$?
-
+
[ -f ${dir}ipAddress ] && ipAddress_logrow=$(grep -c "" ${dir}ipAddress) || ipAddress_logrow="0";
if [ $ipAddress_logrow -ne "0" ]; then
online_list=`cat ${dir}ipAddress|awk '{print $2}'|grep -v "^$"|sort -u`
@@ -1237,9 +1237,9 @@ while [ "$serverchan_enable" -eq "1" ]; do
# 异常流量检测
[ ! -f "${dir}send_enable.lock" ] && get_client_usage
-
+
# 登陆提醒通知
- [ ! -f "${dir}send_enable.lock" ] && login_send
+ [ ! -f "${dir}send_enable.lock" ] && login_send
if [ ! -f "${dir}send_enable.lock" ] && [ ! -z "$title" ] && [ ! -z "$content" ]; then
[ ! -z "$device_name" ] && title="【$device_name】$title"
@@ -1247,7 +1247,7 @@ while [ "$serverchan_enable" -eq "1" ]; do
[ "$disturb" -eq "0" ] && diy_send "${title}" "${content}" "${jsonpath}" >/dev/null 2>&1
[ $? -eq 1 ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】推送失败,请检查网络或设置信息 " >> ${logfile}
fi
-
+
while [ -f "${dir}send_enable.lock" ]; do
sleep $sleeptime
done
diff --git a/luci-app-socatg/Makefile b/luci-app-socatg/Makefile
index 8b81270475a..ff5a2206ecf 100644
--- a/luci-app-socatg/Makefile
+++ b/luci-app-socatg/Makefile
@@ -1,13 +1,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-socatg
-PKG_VERSION=1.2
+
PKG_LICENSE:=MIT
PKG_MAINTAINER:=drophair
+
LUCI_TITLE:=LuCI Support for socatg
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+socat
-# PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
-include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/luci/luci.mk
+
+# call BuildPackage - OpenWrt buildroot signature
diff --git a/luci-app-socatg/README-Chinese.md b/luci-app-socatg/README-Chinese.md
deleted file mode 100644
index d289a7b613a..00000000000
--- a/luci-app-socatg/README-Chinese.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# luci-app-socatg
-
-**SocatG**
-Socat GUI,Socat可视化插件,支持所有架构,需要提前安装`socat`:
-```Bash opkg install socat```
-- 插件位置:网络->SocatG
-- 使用教程(正在审核):[什么值得买](https://post.smzdm.com/detail_preview/anxr0w00/)
-- 安装:
-已向lean提交合并申请(待合并),[GitHub Releases](https://github.com/big-tooth/luci-app-socatg/releases) 中有预编译的 ipk 文件,安装命令:
- ```bash
- wget -P /tmp https://github.com/big-tooth/luci-app-socatg/releases/download/v1.1/luci-app-socatg_1.1-1_all.ipk
- opkg install /tmp/luci-app-socatg_1.1-1_all.ipk
- ```
-![OpenWrt 配置界面](./doc/openwrt)
-
-***
-感谢
-[Beginner-Go](https://github.com/Beginner-Go)
\ No newline at end of file
diff --git a/luci-app-socatg/README.md b/luci-app-socatg/README.md
deleted file mode 100644
index 936f2ab1b32..00000000000
--- a/luci-app-socatg/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# luci-app-socatg/ [中文文档](./README-Chinese.md)
-
-**SocatG** (Socat GUI),about IPv6 port forwarding IPv4,SocatG supports all architectures(x86,Arm,MIPS),SocatG needs the support of `socat`👇
-```opkg install socat```
-- Localtion:Network->SocatG
-- How to use(reviewing):[smzdm/什么值得买](https://post.smzdm.com/detail_preview/anxr0w00/)
-- Install:
-1.We already commit a Pull Request to lean(Wait Merge)
-2.[GitHub Releases](https://github.com/big-tooth/luci-app-socatg/releases) has uploaded precompiled file with ipk suffix,Command:
- ```bash
- wget -P /tmp https://github.com/big-tooth/luci-app-socatg/releases/download/v1.1/luci-app-socatg_1.1-1_all.ipk
- opkg install /tmp/luci-app-socatg_1.1-1_all.ipk
- ```
-![OpenWrt Configuration interface](./doc/openwrt)
-
-***
-Thanks
-[Beginner-Go](https://github.com/Beginner-Go)
\ No newline at end of file
diff --git a/luci-app-socatg/doc/openwrt b/luci-app-socatg/doc/openwrt
deleted file mode 100644
index d5c0e8bf4cb..00000000000
Binary files a/luci-app-socatg/doc/openwrt and /dev/null differ
diff --git a/luci-app-socatg/luasrc/model/cbi/socatg.lua b/luci-app-socatg/luasrc/model/cbi/socatg.lua
index 21e0ca3b062..da5fb84029c 100644
--- a/luci-app-socatg/luasrc/model/cbi/socatg.lua
+++ b/luci-app-socatg/luasrc/model/cbi/socatg.lua
@@ -6,9 +6,9 @@ s = m:section(TypedSection, "socatg")
s.addremove = false
s.anonymous = true
-v6port = s:option(Value, "v6port", translate("v6port"))
-v4host = s:option(Value, "v4host", translate("v4host"))
-v4port = s:option(Value, "v4port", translate("v4port"))
+v6port = s:option(Value, "v6port", translate("IPv6 Port"))
+v4host = s:option(Value, "v4host", translate("IPv4 Host"))
+v4port = s:option(Value, "v4port", translate("IPv4 Port"))
local apply = luci.http.formvalue("cbi.apply")
if apply then
diff --git a/luci-app-socatg/root/etc/init.d/socatg b/luci-app-socatg/root/etc/init.d/socatg
old mode 100644
new mode 100755
diff --git a/luci-app-socatg/root/etc/uci-defaults/luci-socatg b/luci-app-socatg/root/etc/uci-defaults/luci-socatg
old mode 100644
new mode 100755
diff --git a/luci-app-verysync/root/etc/init.d/verysync b/luci-app-verysync/root/etc/init.d/verysync
index 146ddc35068..1ebffe97253 100755
--- a/luci-app-verysync/root/etc/init.d/verysync
+++ b/luci-app-verysync/root/etc/init.d/verysync
@@ -3,6 +3,8 @@
START=50
STOP=10
+VERYSYNC="/usr/bin/verysync"
+
start() {
local enabled="$(uci get verysync.config.enabled)"
local port="$(uci get verysync.config.port)"
@@ -10,9 +12,9 @@ start() {
stop
[ "${enabled}" == "1" ] || exit 0
export HOME="/root/"
- verysync -gui-address="0.0.0.0:${port}" -logfile="/var/log/verysync.log" -home="${profile}" -no-browser >/dev/null 2>&1 &
+ "${VERYSYNC}" -gui-address="0.0.0.0:${port}" -logfile="/var/log/verysync.log" -home="${profile}" -no-browser >/dev/null 2>&1 &
}
stop() {
- kill -9 `pgrep verysync` >/dev/null 2>&1
+ kill -9 `pgrep "${VERYSYNC}"` >/dev/null 2>&1
}