update-09.18
This commit is contained in:
parent
6019d59118
commit
07bb771f7e
|
@ -1033,17 +1033,17 @@ stop(){
|
|||
kill -9 $(ps -w | grep $VAR | grep -v grep | awk '{print$1}') 2>/dev/null
|
||||
killall -q -9 smartdns-le chinadns-ng kcptun-client microsocks
|
||||
if [[ $adguardhome == 1 && ! "$GLOBAL_SERVER" ]]; then
|
||||
if [ -f /etc/init.d/AdGuardHome ]; then
|
||||
uci -q set AdGuardHome.AdGuardHome.enabled='0'
|
||||
if [ "redirect" ]; then
|
||||
uci -q set AdGuardHome.AdGuardHome.redirect="$redirect"
|
||||
else
|
||||
if [[ -f /etc/init.d/AdGuardHome && "$(uci -q get AdGuardHome.AdGuardHome.redirect)" == "exchange" ]]; then
|
||||
redirect="$(uci -q get AdGuardHome.AdGuardHome.old_redirect)"
|
||||
if [[ ! "redirect" || "redirect" == "exchange" ]]; then
|
||||
uci -q del AdGuardHome.AdGuardHome.redirect
|
||||
else
|
||||
uci -q set AdGuardHome.AdGuardHome.redirect="$redirect"
|
||||
fi
|
||||
uci commit AdGuardHome
|
||||
/etc/init.d/AdGuardHome stop
|
||||
fi
|
||||
if [ "$(netstat -tunlp | grep 53 | grep -i AdGuardHome)" || "$(uci -q get dhcp.@dnsmasq[0].port)" != "53" ]; then
|
||||
if [[ "$(netstat -tunlp | grep 53 | grep -i AdGuardHome)" || "$(uci -q get dhcp.@dnsmasq[0].port)" != "53" ]]; then
|
||||
uci -q set dhcp.@dnsmasq[0].port='53'
|
||||
uci commit dhcp
|
||||
fi
|
||||
|
|
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=luci-app-godproxy
|
||||
PKG_VERSION:=3.8.5
|
||||
PKG_RELEASE:=3-20210421
|
||||
PKG_RELEASE:=3-20210917
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -31,33 +31,24 @@ define Package/luci-app-godproxy/install
|
|||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
||||
po2lmo ./po/zh-cn/koolproxy.po $(1)/usr/lib/lua/luci/i18n/koolproxy.zh-cn.lmo
|
||||
|
||||
ifeq ($(ARCH),mipsel)
|
||||
$(INSTALL_BIN) ./bin/mipsel $(1)/usr/share/koolproxy/koolproxy
|
||||
endif
|
||||
ifeq ($(ARCH),mips)
|
||||
$(INSTALL_BIN) ./bin/mips $(1)/usr/share/koolproxy/koolproxy
|
||||
endif
|
||||
ifeq ($(ARCH),x86)
|
||||
$(INSTALL_BIN) ./bin/x86 $(1)/usr/share/koolproxy/koolproxy
|
||||
endif
|
||||
ifeq ($(ARCH),x86_64)
|
||||
$(INSTALL_BIN) ./bin/x86_64 $(1)/usr/share/koolproxy/koolproxy
|
||||
endif
|
||||
ifeq ($(ARCH),arm)
|
||||
$(INSTALL_BIN) ./bin/arm $(1)/usr/share/koolproxy/koolproxy
|
||||
endif
|
||||
ifeq ($(ARCH),aarch64)
|
||||
$(INSTALL_BIN) ./bin/aarch64 $(1)/usr/share/koolproxy/koolproxy
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/luci-app-godproxy/postinst
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
( . /etc/uci-defaults/luci-koolproxy ) && rm -f /etc/uci-defaults/luci-koolproxy
|
||||
rm -f /tmp/luci-indexcache
|
||||
fi
|
||||
exit 0
|
||||
else ifeq ($(ARCH),arm)
|
||||
$(INSTALL_BIN) ./bin/arm $(1)/usr/share/koolproxy/koolproxy
|
||||
|
||||
else ifeq ($(ARCH),i386)
|
||||
$(INSTALL_BIN) ./bin/i386 $(1)/usr/share/koolproxy/koolproxy
|
||||
|
||||
else ifeq ($(ARCH),mips)
|
||||
$(INSTALL_BIN) ./bin/mips $(1)/usr/share/koolproxy/koolproxy
|
||||
|
||||
else ifeq ($(ARCH),mipsel)
|
||||
$(INSTALL_BIN) ./bin/mipsel $(1)/usr/share/koolproxy/koolproxy
|
||||
|
||||
else ($(ARCH),x86_64)
|
||||
$(INSTALL_BIN) ./bin/x86_64 $(1)/usr/share/koolproxy/koolproxy
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,luci-app-godproxy))
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
module("luci.controller.koolproxy",package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/koolproxy")then
|
||||
if not nixio.fs.access("/etc/config/koolproxy") then
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin","services","koolproxy"},cbi("koolproxy/global"),_("KoolproxyR Plus+"),1).dependent=true
|
||||
entry({"admin","services","koolproxy","rss_rule"},cbi("koolproxy/rss_rule"), nil).leaf=true
|
||||
entry({"admin","services","koolproxy","status"},call("act_status")).leaf=true
|
||||
|
@ -10,7 +12,7 @@ end
|
|||
|
||||
function act_status()
|
||||
local e={}
|
||||
e.running=luci.sys.call("pidof %s >/dev/null"%"koolproxy")==0
|
||||
e.running=luci.sys.call("pidof koolproxy >/dev/null")==0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,6 @@ local fs = require "nixio.fs"
|
|||
local sys = require "luci.sys"
|
||||
local http = require "luci.http"
|
||||
|
||||
|
||||
local o,t,e
|
||||
local v=luci.sys.exec("/usr/share/koolproxy/koolproxy -v")
|
||||
local a=luci.sys.exec("head -3 /usr/share/koolproxy/data/rules/koolproxy.txt | grep rules | awk -F' ' '{print $3,$4}'")
|
||||
|
@ -25,19 +24,11 @@ local q=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/daily.txt | wc
|
|||
local f=luci.sys.exec("grep -v !x /usr/share/koolproxy/data/rules/anti-ad.txt | wc -l")
|
||||
local i=luci.sys.exec("cat /usr/share/koolproxy/dnsmasq.adblock | wc -l")
|
||||
|
||||
o = Map("koolproxy", translate("GodProxy 滤广告 "), translate("GodProxy是基于KoolProxyR Plus重新整理的能识别adblock规则的免费开源软件,追求体验更快、更清洁的网络,屏蔽烦人的广告!"))
|
||||
o:section(SimpleSection).template = "koolproxy/koolproxy_status"
|
||||
|
||||
if luci.sys.call("pidof koolproxy >/dev/null") == 0 then
|
||||
status = translate("<strong class=\"koolproxy_status\"><font color=\"green\">GodProxy滤广告 运行中</font></strong>")
|
||||
else
|
||||
status = translate("<strong class=\"koolproxy_status\"><font color=\"red\">GodProxy滤广告 未运行</font></strong>")
|
||||
end
|
||||
|
||||
o = Map("koolproxy", translate("GodProxy滤广告 "), translate("GodProxy是基于KoolProxyR Plus重新整理的能识别adblock规则的免费开源软件,追求体验更快、更清洁的网络,屏蔽烦人的广告!"))
|
||||
|
||||
o.template="koolproxy/koolproxy_status"
|
||||
t = o:section(TypedSection, "global")
|
||||
t.anonymous = true
|
||||
t.description = translate(string.format("%s<br /><br />", status))
|
||||
|
||||
t:tab("base",translate("Basic Settings"))
|
||||
|
||||
|
@ -45,9 +36,6 @@ e = t:taboption("base", Flag, "enabled", translate("Enable"))
|
|||
e.default = 0
|
||||
e.rmempty = false
|
||||
|
||||
e = t:taboption("base", DummyValue, "koolproxy_status", translate("程序版本"))
|
||||
e.value = string.format("[ %s ]", v)
|
||||
|
||||
e = t:taboption("base", Value, "startup_delay", translate("启动延迟"))
|
||||
e:value(0, translate("不启用"))
|
||||
for _, v in ipairs({5, 10, 15, 25, 40, 60}) do
|
||||
|
@ -81,7 +69,6 @@ e:value("yhosts.txt", translate("Yhosts规则"))
|
|||
e:value("anti-ad.txt", translate("Anti-AD规则"))
|
||||
e:value("mv.txt", translate("乘风视频"))
|
||||
|
||||
|
||||
e = t:taboption("base", ListValue, "koolproxy_port", translate("端口控制"))
|
||||
e.default = 0
|
||||
e.rmempty = false
|
||||
|
@ -120,7 +107,7 @@ for t = 0,23 do
|
|||
e:value(t,translate("每天"..t.."点"))
|
||||
end
|
||||
e:value(nil, translate("关闭"))
|
||||
e.default = 0
|
||||
e.default = nil
|
||||
e.rmempty = false
|
||||
e.description = translate(string.format("<font color=\"red\"><strong>定时更新规则。请把时间修改掉,默认时间使用人数多会更新失败</strong></font>"))
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
<%+cbi/valueheader%>
|
||||
<span class="koolproxy_status"><%=pcdata(self:cfgvalue(section) or self.default or "")%></span>
|
||||
<%+cbi/valuefooter%>
|
|
@ -1,16 +1,21 @@
|
|||
<%#
|
||||
Copyright 2016 Chen RuiWei <crwbak@gmail.com>
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<% include("cbi/map") %>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
XHR.poll(2, '<%=luci.dispatcher.build_url("admin", "services", "koolproxy", "status")%>', null,
|
||||
function(x, result)
|
||||
{
|
||||
var status = document.getElementsByClassName('koolproxy_status');
|
||||
status[0].innerHTML = result.running?'<font color=green><%=translate("GodProxy滤广告 运行中")%></font>':'<font color=red><%=translate("<font color=\"red\">GodProxy滤广告 未运行</font></strong>")%></font>';
|
||||
XHR.poll(3, '<%=url([[admin]], [[services]], [[koolproxy]], [[status]])%>', null,
|
||||
function(x, data) {
|
||||
var tb = document.getElementById('koolproxy_status');
|
||||
if (data && tb) {
|
||||
if (data.running) {
|
||||
tb.innerHTML = '<em><b><font color=green><%:KoolproxyR Plus+%> <%:RUNNING%></font></b></em>';
|
||||
} else {
|
||||
tb.innerHTML = '<em><b><font color=red><%:KoolproxyR Plus+%> <%:NOT RUNNING%></font></b></em>';
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
//]]>
|
||||
</script>
|
||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<p id="koolproxy_status">
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
msgid "RUNNING"
|
||||
msgstr "运行中"
|
||||
|
||||
msgid "NOT RUNNING"
|
||||
msgstr "未运行"
|
||||
|
||||
msgid "Filter Mode"
|
||||
msgstr "过滤模式"
|
||||
|
||||
msgid "Collecting data..."
|
||||
msgstr "收集数据..."
|
||||
|
||||
msgid "Basic Settings"
|
||||
msgstr "基础设置"
|
||||
|
||||
|
@ -29,7 +38,7 @@ msgid "Set Backlist Of Websites"
|
|||
msgstr "网站黑名单设置"
|
||||
|
||||
msgid "KoolproxyR Plus+"
|
||||
msgstr "GodProxy滤广告"
|
||||
msgstr "GodProxy 滤广告"
|
||||
|
||||
msgid "Koolproxy Logs"
|
||||
msgstr "查看最近的更新日志"
|
||||
|
@ -42,5 +51,3 @@ msgstr "上传恢复已备份的证书,文件名必须为koolproxyCA.tar.gz"
|
|||
|
||||
msgid "ACLs is a tools which used to designate specific IP filter mode,The MAC addresses added to the list will be filtered using https"
|
||||
msgstr "访问控制列表是用于指定特殊IP过滤模式的工具,如为已安装证书的客户端开启https广告过滤等,MAC或者IP必须填写其中一项。"
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
config global
|
||||
option time_update '4'
|
||||
option enabled '0'
|
||||
option koolproxy_port '0'
|
||||
option startup_delay '0'
|
||||
option koolproxy_acl_default '1'
|
||||
|
@ -7,8 +7,8 @@ config global
|
|||
option koolproxy_host '1'
|
||||
option koolproxy_rules 'koolproxy.txt daily.txt kp.dat user.txt'
|
||||
option thirdparty_rules 'anti-ad.txt'
|
||||
option enabled '0'
|
||||
option koolproxy_ipv6 '0'
|
||||
option time_update 'nil'
|
||||
|
||||
config acl_rule
|
||||
option proxy_mode '2'
|
||||
|
|
|
@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=luci-app-pushbot
|
||||
PKG_VERSION:=3.55
|
||||
PKG_RELEASE:=16
|
||||
PKG_RELEASE:=20
|
||||
|
||||
PKG_MAINTAINER:=tty228 <tty228@yeah.net> zzsj0928
|
||||
|
||||
|
|
|
@ -31,8 +31,21 @@ a.datatype="uinteger"
|
|||
a=s:option(Value, "soc_code", "自定义温度读取命令")
|
||||
a.rmempty = true
|
||||
a:value("",translate("默认"))
|
||||
a:value("pve",translate("PVE 虚拟机"))
|
||||
a.description = translate("请尽量避免使用特殊符号,如双引号、$、!等,执行结果需为数字,用于温度对比")
|
||||
|
||||
a=s:option(Value,"pve_host",translate("宿主机地址"))
|
||||
a.rmempty=true
|
||||
a.default="10.0.0.2"
|
||||
a.description = translate("请确认已经设置好密钥登陆,否则会引起脚本无法运行等错误!<br/>PVE 安装 sensors 命令自行百度<br/>密钥登陆例:<br/>opkg update #更新列表<br/>opkg install openssh-client openssh-keygen #安装openssh客户端<br/>ssh-keygen -t rsa # 生成密钥文件(自行设定密码等信息)<br/>ssh root@10.0.0.2 \"tee -a ~/.ssh/id_rsa.pub\" < ~/.ssh/id_rsa.pub # 传送公钥到 PVE<br/>ssh root@10.0.0.2 \"cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys\" # 写入公钥到 PVE<br/>ssh -i ~/.ssh/id_rsa root@10.0.0.2 sensors # 测试温度命令")
|
||||
a:depends({soc_code="pve"})
|
||||
|
||||
a=s:option(Value,"pve_port",translate("SSH端口"))
|
||||
a.rmempty=true
|
||||
a.default="22"
|
||||
a.description = translate("默认为22,如有自定义,请填写自定义SSH端口")
|
||||
a:depends({soc_code="pve"})
|
||||
|
||||
a=s:option(Button,"soc",translate("测试温度命令"))
|
||||
a.inputtitle = translate("输出信息")
|
||||
a.write = function()
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"font_purple": "",
|
||||
"font_end": "",
|
||||
"font_end2": "",
|
||||
"percentsym": "25",
|
||||
"percentsym": "",
|
||||
"boldstar": "",
|
||||
"type":
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ function read_config(){
|
|||
"client_usage" "client_usage_max" "client_usage_disturb" "client_usage_whitelist" \
|
||||
"web_logged" "ssh_logged" "web_login_failed" "ssh_login_failed" "login_max_num" "web_login_black" "ip_white_list" "ip_black_timeout" \
|
||||
"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" \
|
||||
"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"
|
||||
|
||||
|
@ -264,8 +264,9 @@ function getcpu(){
|
|||
function soc_temp(){
|
||||
[ -z "$soc_code" ] && local soctemp=`sensors 2>/dev/null|grep °C|sed -nr 's#^.*:.*\+(.*)°C .*#\1#gp'|sort -nr|head -n1`
|
||||
[ -z "$soc_code" ] && [ -z "$soctemp" ] && local soctemp=`cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null|sort -nr|head -n1|cut -c-2`
|
||||
[ "$soc_code" == "pve" ] && [ ! -z "$pve_host" ] && local soctemp=`ssh -i ~/.ssh/id_rsa root@${pve_host} -p ${pve_port} sensors 2>/dev/null|grep °C|sed -nr 's#^.*:.*\+(.*)°C .*#\1#gp'|sort -nr|head -n1`
|
||||
[ ! -z "$soctemp" ] && echo "$soctemp" && return
|
||||
[ ! -z "$soc_code" ] && echo "$soc_code"|awk '{run=$0;system(run)}' 2>/dev/null
|
||||
[ ! -z "$soc_code" ] && eval `echo "$soc_code"` 2>/dev/null
|
||||
}
|
||||
|
||||
# 流量数据
|
||||
|
@ -898,7 +899,7 @@ function cpu_load(){
|
|||
local cpu_wendu=`soc_temp`;
|
||||
[ -z "$cpu_wendu" ] && echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!!】无法读取设备温度,请检查命令" >> ${logfile}
|
||||
|
||||
if [ "$cpu_wendu" -gt "$temperature" ]; then
|
||||
if [ `expr $cpu_wendu \> $temperature` -eq "1" ]; then
|
||||
echo "`date "+%Y-%m-%d %H:%M:%S"` 【!!警报!!】 CPU 温度过高: ${cpu_wendu}" >> ${logfile}
|
||||
else
|
||||
temperature_time=`date +%s`
|
||||
|
@ -1118,11 +1119,18 @@ function send(){
|
|||
local systemload=`cat /proc/loadavg|awk '{print $1" "$2" "$3}'`
|
||||
local cpuload=`getcpu`
|
||||
local ramload=`free -m|sed -n '2p'|awk '{printf "%.2f%%\n",($3/$2)*100}'`
|
||||
local Qwai=`curl -o /dev/null --connect-timeout 5 -s -w %{http_code} www.google.com`
|
||||
if [[ "$Qwai" -eq "200" ]] || [[ "$Qwai" -eq "301" ]] || [[ "$Qwai" -eq "301" ]]; then
|
||||
local Qwai_status="已连通!"
|
||||
else
|
||||
local Qwai_status="已断开!"
|
||||
fi
|
||||
local systemstatustime=`cat /proc/uptime|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_splitline}${str_title_start}${font_blue} 系统运行状态${font_end}${str_title_end}"
|
||||
local send_content="${send_content}${str_linefeed}${str_tab}平均负载:${systemload}"
|
||||
local send_content="${send_content}${str_linefeed}${str_tab}CPU占用:${cpuload}${percentsym}"
|
||||
local send_content="${send_content}${str_linefeed}${str_tab}内存占用:${ramload}${percentsym}"
|
||||
local send_content="${send_content}${str_linefeed}${str_tab}全球互联:${Qwai_status}"
|
||||
local send_content="${send_content}${str_linefeed}${str_tab}${systemstatustime}"
|
||||
fi
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray-core
|
||||
PKG_VERSION:=4.42.1
|
||||
PKG_VERSION:=4.42.2
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=bd01331c057da9f515933ab718c59c23372a483de74fe73dcd6053c41bdd6058
|
||||
PKG_HASH:=70ffcb2719dd4d692266de75d40009d94a1374ced72546fbd9b0dba33b9bb3ea
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
|
Loading…
Reference in New Issue