update-02.08

This commit is contained in:
github-actions[bot] 2022-02-08 20:30:01 +08:00
parent cee2202839
commit 21c2a7e4fc
9 changed files with 8743 additions and 21019 deletions

View File

@ -6,11 +6,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=adguardhome
PKG_VERSION:=0.107.3
PKG_VERSION:=0.108.0-b.3
PKG_RELEASE:=
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=1bc2186c2deaddb1a7c70f0d4fad0d0d03433cbc
PKG_SOURCE_VERSION:=6d0a43aad66239b462204f5386d495acd571c96a
PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome
PKG_MIRROR_HASH:=skip

View File

@ -19,7 +19,7 @@ if [ $A = Y ];then
fi
if [ "$C" = router ];then
if [ $A = Y ];then
while ! B=$(curl -kLfsm 5 https://cdn.jsdelivr.net/gh/17mon/china_ip_list@master/china_ip_list.txt || curl -kLfsm 5 https://op.supes.top/all_cn.txt);do
while ! B=$(curl -kLfsm 5 https://cdn.jsdelivr.net/gh/kiddin9/china_ip_list@main/china_ip_list.txt || curl -kLfsm 5 https://cdn.staticaly.com/gh/kiddin9/china_ip_list/main/china_ip_list.txt);do
sleep 2
done
fi

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,8 @@ IPSET_BLOCKLIST6="blocklist6"
FORCE_INDEX=2
. /lib/functions/network.sh
ipt_n="iptables -t nat -w"
ipt_m="iptables -t mangle -w"
ip6t_n="ip6tables -t nat -w"
@ -155,6 +157,28 @@ gen_laniplist_6() {
cat $RULES_PATH/lanlist_ipv6 | tr -s '\n' | grep -v "^#"
}
get_wan_ip() {
local NET_IF
local NET_ADDR
network_flush_cache
network_find_wan NET_IF
network_get_ipaddr NET_ADDR "${NET_IF}"
echo $NET_ADDR
}
get_wan6_ip() {
local NET_IF
local NET_ADDR
network_flush_cache
network_find_wan6 NET_IF
network_get_ipaddr6 NET_ADDR "${NET_IF}"
echo $NET_ADDR
}
load_acl() {
local items=$(uci show ${CONFIG} | grep "=acl_rule" | cut -d '.' -sf 2 | cut -d '=' -sf 1)
[ -n "$items" ] && {
@ -771,6 +795,10 @@ add_firewall_rule() {
$ipt_m -A PSW -m mark --mark 0xff -j RETURN
$ipt_m -A PSW $(dst $IPSET_BLOCKLIST) -j DROP
WAN_IP=$(get_wan_ip)
[ ! -z "${WAN_IP}" ] && $ipt_m -A PSW $(comment "WAN_IP_RETURN") -d "${WAN_IP}" -j RETURN
unset WAN_IP
PR_INDEX=$((PR_INDEX + 1))
$ipt_m -I PREROUTING $PR_INDEX -j PSW
unset PR_INDEX
@ -813,6 +841,10 @@ add_firewall_rule() {
$ip6t_m -A PSW $(dst $IPSET_WHITELIST6) -j RETURN
$ip6t_m -A PSW -m mark --mark 0xff -j RETURN
$ip6t_m -A PSW $(dst $IPSET_BLOCKLIST6) -j DROP
WAN6_IP=$(get_wan6_ip)
[ ! -z "${WAN6_IP}" ] && $ip6t_m -A PSW $(comment "WAN6_IP_RETURN") -d ${WAN6_IP} -j RETURN
unset WAN6_IP
PR_INDEX=$((PR_INDEX + 1))
$ip6t_m -I PREROUTING $PR_INDEX -j PSW
@ -1088,6 +1120,12 @@ gen_include() {
PR_INDEX=\$((PR_INDEX + 1))
$ipt_m -I PREROUTING \$PR_INDEX -j PSW
PR_INDEX=\$(/usr/share/passwall/iptables.sh RULE_LAST_INDEX "$ipt_m" PSW WAN_IP_RETURN -1)
if [ \$PR_INDEX -ge 0 ]; then
WAN_IP=\$(/usr/share/passwall/iptables.sh get_wan_ip)
[ ! -z "\${WAN_IP}" ] && $ipt_m -R PSW \$PR_INDEX $(comment "WAN_IP_RETURN") -d "\${WAN_IP}" -j RETURN
fi
[ "$accept_icmpv6" = "1" ] && $ip6t_n -A PREROUTING -p ipv6-icmp -j PSW
PR_INDEX=\$(/usr/share/passwall/iptables.sh RULE_LAST_INDEX "$ip6t_m" PREROUTING mwan3 1)
@ -1095,6 +1133,12 @@ gen_include() {
PR_INDEX=\$((PR_INDEX + 1))
$ip6t_m -I PREROUTING \$PR_INDEX -j PSW
PR_INDEX=\$(/usr/share/passwall/iptables.sh RULE_LAST_INDEX "$ip6t_m" PSW WAN6_IP_RETURN -1)
if [ \$PR_INDEX -ge 0 ]; then
WAN6_IP=\$(/usr/share/passwall/iptables.sh get_wan6_ip)
[ ! -z "\${WAN6_IP}" ] && $ip6t_m -R PSW \$PR_INDEX $(comment "WAN6_IP_RETURN") -d "\${WAN6_IP}" -j RETURN
fi
EOF
return 0
}
@ -1117,6 +1161,12 @@ RULE_LAST_INDEX)
flush_ipset)
flush_ipset
;;
get_wan_ip)
get_wan_ip
;;
get_wan6_ip)
get_wan6_ip
;;
stop)
stop
;;

View File

@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-pushbot
PKG_VERSION:=3.55
PKG_RELEASE:=21
PKG_VERSION:=3.60
PKG_RELEASE:=1
PKG_MAINTAINER:=tty228 <tty228@yeah.net> zzsj0928

View File

@ -46,6 +46,7 @@ a:value("/usr/bin/pushbot/api/ent_wechat.json",translate("企业微信"))
a:value("/usr/bin/pushbot/api/feishu.json",translate("飞书"))
a:value("/usr/bin/pushbot/api/bark.json",translate("Bark"))
a:value("/usr/bin/pushbot/api/pushplus.json",translate("PushPlus"))
a:value("/usr/bin/pushbot/api/pushdeer.json",translate("PushDeer"))
a:value("/usr/bin/pushbot/api/diy.json",translate("自定义推送"))
a=s:taboption("basic", Value,"dd_webhook",translate('Webhook'), translate("钉钉机器人 Webhook").."只输入access_token=后面的即可<br>调用代码获取<a href='https://developers.dingtalk.com/document/robots/custom-robot-access' target='_blank'>点击这里</a><br><br>")
@ -84,6 +85,19 @@ a=s:taboption("basic", Value,"pp_topic",translate('PushPlus Topic'), translate("
a.rmempty = true
a:depends("pp_topic_enable","1")
a=s:taboption("basic", Value,"pushdeer_key",translate('PushDeer Key'), translate("PushDeer Key").."<br>调用代码获取<a href='http://www.pushdeer.com/' target='_blank'>点击这里</a><br><br>")
a.rmempty = true
a:depends("jsonpath","/usr/bin/pushbot/api/pushdeer.json")
a=s:taboption("basic", Flag,"pushdeer_srv_enable",translate("自建 PushDeer 服务器"))
a.default=0
a.rmempty = true
a:depends("jsonpath","/usr/bin/pushbot/api/pushdeer.json")
a=s:taboption("basic", Value,"pushdeer_srv",translate('PushDeer Server'), translate("PushDeer 自建服务器地址").."<br>如https://your.domain:port<br>具体自建服务器设定参见:<a href='http://www.pushdeer.com/selfhosted.html' target='_blank'>点击这里</a><br><br>")
a.rmempty = true
a:depends("pushdeer_srv_enable","1")
a=s:taboption("basic", Value,"fs_webhook",translate('WebHook'), translate("飞书 WebHook").."<br>调用代码获取<a href='https://www.feishu.cn/hc/zh-CN/articles/360024984973' target='_blank'>点击这里</a><br><br>")
a.rmempty = true
a:depends("jsonpath","/usr/bin/pushbot/api/feishu.json")

View File

@ -0,0 +1,31 @@
{
"_api": "这是 PushDeer推送 api 文件",
"_api": "【PushDeer推送】",
"url": "${pushdeer_srv}/message/push",
"data": "@${tempjsonpath}",
"content_type": "Content-Type:application/json",
"str_title_start": "**【",
"str_title_end": "】**",
"str_linefeed": "\\n\\n",
"str_splitline": "\\n\\n---\\n\\n",
"str_space": " ",
"str_tab": " ",
"table_tab": "┋",
"font_green": "",
"font_green2": "",
"font_red": "",
"font_blue": "",
"font_purple": "",
"font_end": "",
"font_end2": "",
"percentsym": "",
"boldstar": "**",
"type":
{
"pushkey": "\"${pushdeer_key}\"",
"type": "\"markdown\"",
"text": "\"${1}\"",
"desp": "\"${nowtime}${str_linefeed}${2}\""
}
}

View File

@ -18,7 +18,7 @@ function read_config(){
"pushbot_sheep" "starttime" "endtime" "pushbot_whitelist" "pushbot_blacklist" "pushbot_interface" "MAC_online_list" "MAC_offline_list" \
"up_timeout" "down_timeout" "timeout_retry_count" "thread_num" "soc_code" "pve_host" "pve_port"\
"err_enable" "err_sheep_enable" "err_device_aliases" "network_err_event" "system_time_event" "autoreboot_time" "network_restart_time" "public_ip_event" "public_ip_retry_count" \
"jsonpath" "dd_webhook" "we_webhook" "pp_token" "pp_channel" "pp_webhook" "pp_topic_enable" "pp_topic" "fs_webhook" "bark_srv_enable" "bark_srv" "bark_token" "bark_sound" "bark_icon" "bark_icon_enable" "bark_level"
"jsonpath" "dd_webhook" "we_webhook" "pp_token" "pp_channel" "pp_webhook" "pp_topic_enable" "pp_topic" "fs_webhook" "pushdeer_key" "pushdeer_srv_enable" "pushdeer_srv" "bark_srv_enable" "bark_srv" "bark_token" "bark_sound" "bark_icon" "bark_icon_enable" "bark_level"
for str_version in "wrtbwmon" "iputils-arping" "curl" "iw"; do
eval `echo ${str_version:0:2}"_version"`=`opkg list-installed|grep -w ^${str_version}|awk '{print $3}'` 2>/dev/null
@ -45,6 +45,7 @@ function read_config(){
[ -z "$down_timeout" ] || [ "$down_timeout" -eq "0" ] && down_timeout="20";down_timeout=`expr ${down_timeout} / 2 + 1`
[ -z "$timeout_retry_count" ] && timeout_retry_count="2";[ "$timeout_retry_count" -eq "0" ] && timeout_retry_count="1"
[ ! -z "$bark_token" ] && [ -z "$bark_srv" ] && bark_srv="https://api.day.app"
[ ! -z "$pushdeer_key" ] && [ -z "$pushdeer_srv" ] && pushdeer_srv="https://api2.pushdeer.com"
# 字符串读取
str_title_start=`/usr/bin/jq -r '.str_title_start' ${jsonpath}`
@ -85,7 +86,7 @@ function pushbot_init(){
[ ! -f "/usr/sbin/wrtbwmon" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】未安装 wrtbwmon ,流量统计不可用" >> ${logfile}
[ -z "$ip_version" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】无法获取依赖项 iputils-arping 版本号,请确认插件是否正常运行" >> ${logfile}
[ -z "$cu_version" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】无法获取依赖项 curl 版本号,请确认插件是否正常运行" >> ${logfile}
[ -z "${dd_webhook}${pp_token}${we_webhook}${fs_webhook}${bark_token}" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【】请填写正确的Token/Webhook " >> ${logfile} && return 1
[ -z "${dd_webhook}${pp_token}${we_webhook}${fs_webhook}${bark_token}${pushdeer_key}" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【】请填写正确的Token/Webhook " >> ${logfile} && return 1
local interfacelist=`getinterfacelist` && [ -z "$interfacelist" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】无法正确获取接口信息,请确认插件是否正常运行" >> ${logfile}
return 0
}