From 3d13f242d081b9672989d7ad5b725ec9127d0b04 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 13 Nov 2021 08:59:03 +0800 Subject: [PATCH] update-11.13 --- .../luasrc/model/cbi/koolproxy/add_rule.lua | 55 ++---------- .../luasrc/model/cbi/koolproxy/cert.lua | 67 ++++++++++++--- .../luasrc/model/cbi/koolproxy/control.lua | 12 ++- luci-app-godproxy/rulesupdate.log | 86 ++++++++++--------- .../root/usr/share/passwall/rules/direct_host | 1 + my-default-settings/po/zh_Hans/default.po | 6 ++ v2ray-plugin/Makefile | 45 +++++----- xray-plugin/Makefile | 34 +++----- 8 files changed, 153 insertions(+), 153 deletions(-) diff --git a/luci-app-godproxy/luasrc/model/cbi/koolproxy/add_rule.lua b/luci-app-godproxy/luasrc/model/cbi/koolproxy/add_rule.lua index 35453c39a..0f01f3b05 100644 --- a/luci-app-godproxy/luasrc/model/cbi/koolproxy/add_rule.lua +++ b/luci-app-godproxy/luasrc/model/cbi/koolproxy/add_rule.lua @@ -8,6 +8,14 @@ t.sortable = true t.template = "cbi/tblsection" t.extedit = luci.dispatcher.build_url("admin/services/koolproxy/rss_rule/%s") +t.create = function(...) + local sid = TypedSection.create(...) + if sid then + luci.http.redirect(t.extedit % sid) + return + end +end + e = t:option(Flag, "load", translate("启用")) e.rmempty = false e.default = 0 @@ -22,53 +30,6 @@ function e.cfgvalue(...) return Value.cfgvalue(...) or translate("None") end -t.create = function(...) - local sid = TypedSection.create(...) - if sid then - luci.http.redirect(t.extedit % sid) - return - end -end - e = t:option(DummyValue, "time", translate("更新时间")) -function Download() - local t,e - t = nixio.open("/tmp/upload/koolproxyca.tar.gz","r") - luci.http.header('Content-Disposition','attachment; filename="koolproxyCA.tar.gz"') - luci.http.prepare_content("application/octet-stream") - while true do - e = t:read(nixio.const.buffersize) - if(not e)or(#e==0)then - break - else - luci.http.write(e) - end - end - t:close() - luci.http.close() -end - -local t,e -t = "/tmp/upload/" -nixio.fs.mkdir(t) -luci.http.setfilehandler( -function(o,a,i) - if not e then - if not o then return end - e = nixio.open(t..o.file,"w") - if not e then - return - end - end - if a and e then - e:write(a) - end - if i and e then - e:close() - e = nil - luci.sys.call("/usr/share/koolproxy/camanagement restore 2>&1 >/dev/null") - end -end) - return o diff --git a/luci-app-godproxy/luasrc/model/cbi/koolproxy/cert.lua b/luci-app-godproxy/luasrc/model/cbi/koolproxy/cert.lua index d644d7e38..ca2192584 100644 --- a/luci-app-godproxy/luasrc/model/cbi/koolproxy/cert.lua +++ b/luci-app-godproxy/luasrc/model/cbi/koolproxy/cert.lua @@ -1,31 +1,70 @@ o = Map("koolproxy") -t = o:section(TypedSection, "global") -t.title = translate("证书恢复") +t = o:section(TypedSection, "global",translate("证书恢复")) t.description = translate("上传恢复已备份的证书,文件名必须为koolproxyCA.tar.gz") t.anonymous = true -e = t:option(DummyValue,"c1status") -e = t:option(FileUpload,"") +e = t:option(DummyValue, "c1status") +e = t:option(FileUpload, "") e.template = "koolproxy/caupload" +e = t:option(DummyValue,"",nil) +e.template = "koolproxy/cadvalue" -t = o:section(TypedSection, "global") -t.title = translate("证书备份") +if nixio.fs.access("/usr/share/koolproxy/data/certs/ca.crt") then + +t = o:section(TypedSection, "global",translate("证书备份")) t.description = translate("下载备份的证书") t.anonymous = true -e = t:option(DummyValue,"",nil) -e.template = "koolproxy/cadvalue" -if nixio.fs.access("/usr/share/koolproxy/data/certs/ca.crt") then - e = t:option(DummyValue,"c2status") - e = t:option(Button,"certificate") - e.inputtitle = translate("下载证书备份") - e.inputstyle = "reload" - e.write=function() +e = t:option(DummyValue,"c2status") +e = t:option(Button,"certificate") +e.inputtitle = translate("下载证书备份") +e.inputstyle = "reload" +e.write = function() luci.sys.call("/usr/share/koolproxy/camanagement backup 2>&1 >/dev/null") Download() luci.http.redirect(luci.dispatcher.build_url("admin","services","koolproxy")) end end +function Download() + local t,e + t = nixio.open("/tmp/upload/koolproxyca.tar.gz","r") + luci.http.header('Content-Disposition', 'attachment; filename="koolproxyCA.tar.gz"') + luci.http.prepare_content("application/octet-stream") + while true do + e = t:read(nixio.const.buffersize) + if (not e) or (#e==0) then + break + else + luci.http.write(e) + end + end + t:close() + luci.http.close() +end + +local t,e +t = "/tmp/upload/" +nixio.fs.mkdir(t) +luci.http.setfilehandler( +function(o,a,i) + if not e then + if not o then return end + e = nixio.open(t..o.file,"w") + if not e then + return + end + end + if a and e then + e:write(a) + end + if i and e then + e:close() + e = nil + luci.sys.call("/usr/share/koolproxy/camanagement restore 2>&1 >/dev/null") + end +end +) + return o diff --git a/luci-app-godproxy/luasrc/model/cbi/koolproxy/control.lua b/luci-app-godproxy/luasrc/model/cbi/koolproxy/control.lua index 179dca8c0..58ecf0a69 100644 --- a/luci-app-godproxy/luasrc/model/cbi/koolproxy/control.lua +++ b/luci-app-godproxy/luasrc/model/cbi/koolproxy/control.lua @@ -12,7 +12,7 @@ e = t:option(Value, "remarks", translate("客户端备注")) e.rmempty = true e.width = "30%" -e = t:option(Value, "ipaddr", translate("内部IP地址")) +e = t:option(Value, "ipaddr", translate("内部 IP 地址")) e.width = "20%" e.datatype = "ip4addr" luci.ip.neighbors({family = 4}, function(neighbor) @@ -21,6 +21,16 @@ luci.ip.neighbors({family = 4}, function(neighbor) end end) +e = t:option(Value,"mac",translate("MAC 地址")) +e.width = "20%" +e.rmempty = true +e.datatype = "macaddr" +luci.ip.neighbors({family = 4}, function(neighbor) + if neighbor.reachable then + e:value(neighbor.mac, "%s (%s)" %{neighbor.mac, neighbor.dest:string()}) + end +end) + e = t:option(ListValue, "proxy_mode", translate("访问控制")) e.rmempty = false e.width = "20%" diff --git a/luci-app-godproxy/rulesupdate.log b/luci-app-godproxy/rulesupdate.log index c25e1383e..d89743372 100644 --- a/luci-app-godproxy/rulesupdate.log +++ b/luci-app-godproxy/rulesupdate.log @@ -1,42 +1,44 @@ -2021-11-12 05:22:13: ------------------- 规则更新 ----------------------- -2021-11-12 05:22:13: ==================================================== -2021-11-12 05:22:13: 开始更新koolproxy的规则,请等待... -2021-11-12 05:22:13: --------------------------------------------------------------------------------------- -2021-11-12 05:22:15: --------------------------------------------------------------------------------------- -2021-11-12 05:22:16: ABP规则的本地版本号: 202111120511 -2021-11-12 05:22:16: ABP规则的在线版本号: 202111120511 -2021-11-12 05:22:16: 检测到 ABP规则本地版本号和在线版本号相同,那还更新个毛啊! -2021-11-12 05:22:17: yhosts规则本地版本号: 202111082343 -2021-11-12 05:22:17: yhosts规则在线版本号: 202111082343 -2021-11-12 05:22:17: 检测到yhosts本地版本号和在线版本号相同,那还更新个毛啊! -2021-11-12 05:22:18: fanboy规则本地版本号: 202111120500 -2021-11-12 05:22:18: fanboy规则在线版本号: 202111120500 -2021-11-12 05:22:18: 检测到 fanboy规则 本地版本号和在线版本号相同,那还更新个毛啊! -2021-11-12 05:22:18: antiad规则本地版本号: 20211111023927 -2021-11-12 05:22:18: antiad规则在线版本号: 20211111023927 -2021-11-12 05:22:18: 检测到 antiad规则 本地版本号和在线版本号相同,那还更新个毛啊! -2021-11-12 05:22:18: StevenBlack规则本地版本号: 12 November 2021 -2021-11-12 05:22:18: StevenBlack规则在线版本号: 12 November 2021 -2021-11-12 05:22:18: 检测到 StevenBlack规则 本地版本号和在线版本号相同,那还更新个毛啊! -2021-11-12 05:22:18: AdAway规则本地版本号: mobile ad -2021-11-12 05:22:18: AdAway规则在线版本号: -2021-11-12 05:22:18: 检测到新版本 AdAway规则 列表,开始更新... -2021-11-12 05:22:18: 将临时文件覆盖到原始 AdAway规则 文件 -2021-11-12 05:22:18: 跳过优化 fanboy规则。。。。。 -2021-11-12 05:22:18: 跳过优化 ABP规则。。。。。 -2021-11-12 05:22:18: 跳过优化 补充规则yhosts。。。。。 -2021-11-12 05:22:18: 跳过优化 补充规则antiad。。。。。 -2021-11-12 05:22:18: 跳过优化 补充规则StevenBlack。。。。。 -2021-11-12 05:22:18: 正在优化 补充规则Adwars。。。。。 -2021-11-12 05:22:18: 正在优化 补充规则AdAway。。。。。 -2021-11-12 05:22:19: 所有规则更新并优化完毕! -2021-11-12 05:22:19: ==================================================== -2021-11-12 05:22:20: -------------------ABP规则 version 202111120511 -2021-11-12 05:22:20: -------------------Fanboy规则 version 202111120500 -2021-11-12 05:22:20: -------------------Yhosts规则 version 202111082343 -2021-11-12 05:22:20: -------------------Antiad规则 version 20211111023927 -2021-11-12 05:22:20: -------------------StevenBlack规则 version 12 November 2021 -2021-11-12 05:22:20: -------------------静态规则 version 2021-10-07 18:00 -2021-11-12 05:22:20: -------------------乘风视频 version 202111051 -2021-11-12 05:22:20: ------------------- 内置规则更新成功! ------------------- -2021-11-12 05:22:20: ------------------- 规则更新成功! ------------------- +2021-11-13 00:32:21: ------------------- 规则更新 ----------------------- +2021-11-13 00:32:21: ==================================================== +2021-11-13 00:32:21: 开始更新koolproxy的规则,请等待... +2021-11-13 00:32:21: --------------------------------------------------------------------------------------- +2021-11-13 00:32:23: --------------------------------------------------------------------------------------- +2021-11-13 00:32:24: ABP规则的本地版本号: 202111120511 +2021-11-13 00:32:24: ABP规则的在线版本号: 202111130022 +2021-11-13 00:32:24: 检测到 ABP规则 已更新,现在开始更新... +2021-11-13 00:32:24: 将临时的ABP规则文件移动到指定位置 +2021-11-13 00:32:25: yhosts规则本地版本号: 202111082343 +2021-11-13 00:32:25: yhosts规则在线版本号: 202111082343 +2021-11-13 00:32:25: 检测到yhosts本地版本号和在线版本号相同,那还更新个毛啊! +2021-11-13 00:32:27: fanboy规则本地版本号: 202111120500 +2021-11-13 00:32:27: fanboy规则在线版本号: 202111130000 +2021-11-13 00:32:27: 检测到新版本 fanboy规则 列表,开始更新... +2021-11-13 00:32:27: 将临时文件覆盖到原始 fanboy规则 文件 +2021-11-13 00:32:27: antiad规则本地版本号: 20211111023927 +2021-11-13 00:32:27: antiad规则在线版本号: 20211111023927 +2021-11-13 00:32:27: 检测到 antiad规则 本地版本号和在线版本号相同,那还更新个毛啊! +2021-11-13 00:32:27: StevenBlack规则本地版本号: 12 November 2021 +2021-11-13 00:32:27: StevenBlack规则在线版本号: 12 November 2021 +2021-11-13 00:32:27: 检测到 StevenBlack规则 本地版本号和在线版本号相同,那还更新个毛啊! +2021-11-13 00:32:27: AdAway规则本地版本号: mobile ad +2021-11-13 00:32:27: AdAway规则在线版本号: +2021-11-13 00:32:27: 检测到新版本 AdAway规则 列表,开始更新... +2021-11-13 00:32:27: 将临时文件覆盖到原始 AdAway规则 文件 +2021-11-13 00:32:27: 正在优化 fanboy规则。。。。。 +2021-11-13 00:32:28: 正在优化 ABP规则。。。。。 +2021-11-13 00:32:33: 跳过优化 补充规则yhosts。。。。。 +2021-11-13 00:32:33: 跳过优化 补充规则antiad。。。。。 +2021-11-13 00:32:33: 跳过优化 补充规则StevenBlack。。。。。 +2021-11-13 00:32:33: 正在优化 补充规则Adwars。。。。。 +2021-11-13 00:32:33: 正在优化 补充规则AdAway。。。。。 +2021-11-13 00:32:33: 所有规则更新并优化完毕! +2021-11-13 00:32:33: ==================================================== +2021-11-13 00:32:35: -------------------ABP规则 version 202111130022 +2021-11-13 00:32:35: -------------------Fanboy规则 version 202111130000 +2021-11-13 00:32:35: -------------------Yhosts规则 version 202111082343 +2021-11-13 00:32:35: -------------------Antiad规则 version 20211111023927 +2021-11-13 00:32:35: -------------------StevenBlack规则 version 12 November 2021 +2021-11-13 00:32:35: -------------------静态规则 version 2021-10-07 18:00 +2021-11-13 00:32:35: -------------------乘风视频 version 202111051 +2021-11-13 00:32:35: ------------------- 内置规则更新成功! ------------------- +2021-11-13 00:32:35: ------------------- 规则更新成功! ------------------- diff --git a/luci-app-passwall/root/usr/share/passwall/rules/direct_host b/luci-app-passwall/root/usr/share/passwall/rules/direct_host index d132d2814..1e9f0c08a 100644 --- a/luci-app-passwall/root/usr/share/passwall/rules/direct_host +++ b/luci-app-passwall/root/usr/share/passwall/rules/direct_host @@ -4,6 +4,7 @@ dyndns.com douyucdn.cn douyucdn2.cn +steamcontent.com dl.steam.clngaa.com dl.steam.ksyna.com st.dl.bscstorage.net diff --git a/my-default-settings/po/zh_Hans/default.po b/my-default-settings/po/zh_Hans/default.po index 51c2afc46..6bae38002 100644 --- a/my-default-settings/po/zh_Hans/default.po +++ b/my-default-settings/po/zh_Hans/default.po @@ -167,3 +167,9 @@ msgstr "软件包自动更新" msgid "Firmware Upgrade Notice" msgstr "固件更新提醒" + +msgid "Enable IPv6" +msgstr "启用IPv6" + +msgid "Enable/Disable IPv6" +msgstr "一键开启/关闭 IPv6" diff --git a/v2ray-plugin/Makefile b/v2ray-plugin/Makefile index 23c105cd2..68e933206 100644 --- a/v2ray-plugin/Makefile +++ b/v2ray-plugin/Makefile @@ -1,16 +1,13 @@ +# SPDX-License-Identifier: GPL-3.0-only # # Copyright (C) 2020 SharerMax -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2021 ImmortalWrt.org include $(TOPDIR)/rules.mk PKG_NAME:=v2ray-plugin PKG_VERSION:=4.43.0 PKG_RELEASE:=$(AUTORELEASE) -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/teddysun/v2ray-plugin/tar.gz/v$(PKG_VERSION)? @@ -29,51 +26,49 @@ GO_PKG_LDFLAGS:=-s -w GO_PKG_LDFLAGS_X:=main.VERSION=v$(PKG_VERSION) PKG_CONFIG_DEPENDS := \ - CONFIG_$(PKG_NAME)_INCLUDE_GOPROXY \ - CONFIG_$(PKG_NAME)_COMPRESS_UPX + CONFIG_V2RAY_PLUGIN_INCLUDE_GOPROXY \ + CONFIG_V2RAY_PLUGIN_COMPRESS_UPX include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk -define Package/$(PKG_NAME)/config -config $(PKG_NAME)_INCLUDE_GOPROXY +define Package/v2ray-plugin/config +config V2RAY_PLUGIN_INCLUDE_GOPROXY bool "Compiling with GOPROXY proxy" default n -config $(PKG_NAME)_COMPRESS_UPX +config V2RAY_PLUGIN_COMPRESS_UPX bool "Compress executable files with UPX" depends on !mips64 default y endef -ifeq ($(CONFIG_$(PKG_NAME)_INCLUDE_GOPROXY),y) +ifeq ($(CONFIG_V2RAY_PLUGIN_INCLUDE_GOPROXY),y) export GO111MODULE=on export GOPROXY=https://goproxy.io #export GOPROXY=https://mirrors.aliyun.com/goproxy/ endif -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=Network - TITLE:=SIP003 plugin for shadowsocks, based on v2ray - URL:=https://github.com/teddysun/v2ray-plugin - DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle -endef - -define Package/$(PKG_NAME)/description - Yet another SIP003 plugin for shadowsocks, based on v2ray +define Package/v2ray-plugin + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=SIP003 plugin for shadowsocks, based on v2ray + URL:=https://github.com/teddysun/v2ray-plugin + DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle endef define Build/Compile $(call GoPackage/Build/Compile) -ifneq ($(CONFIG_$(PKG_NAME)_COMPRESS_UPX),) +ifneq ($(CONFIG_V2RAY_PLUGIN_COMPRESS_UPX),) $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin endif endef -define Package/$(PKG_NAME)/install +define Package/v2ray-plugin/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin $(1)/usr/bin/v2ray-plugin endef -$(eval $(call GoBinPackage,$(PKG_NAME))) -$(eval $(call BuildPackage,$(PKG_NAME))) + +$(eval $(call GoBinPackage,v2ray-plugin)) +$(eval $(call BuildPackage,v2ray-plugin)) diff --git a/xray-plugin/Makefile b/xray-plugin/Makefile index 128c2fc9e..f8d0facb8 100644 --- a/xray-plugin/Makefile +++ b/xray-plugin/Makefile @@ -1,10 +1,6 @@ +# SPDX-License-Identifier: GPL-3.0-only # -# Copyright (C) 2021 ImmortalWrt -# -# -# This is free software, licensed under the GNU General Public License v3. -# See /LICENSE for more information. -# +# Copyright (C) 2021 ImmortalWrt.org include $(TOPDIR)/rules.mk @@ -21,7 +17,6 @@ PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Tianling Shen PKG_CONFIG_DEPENDS:= \ - CONFIG_XRAY_PLUGIN_PROVIDE_V2RAY_PLUGIN \ CONFIG_XRAY_PLUGIN_COMPRESS_GOPROXY \ CONFIG_XRAY_PLUGIN_COMPRESS_UPX @@ -36,10 +31,6 @@ include $(INCLUDE_DIR)/package.mk include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk define Package/xray-plugin/config -config XRAY_PLUGIN_PROVIDE_V2RAY_PLUGIN - bool "Provide v2ray-plugin binary using xray-plugin" - default n - config XRAY_PLUGIN_COMPRESS_GOPROXY bool "Compiling with GOPROXY proxy" default n @@ -56,15 +47,12 @@ ifneq ($(CONFIG_XRAY_PLUGIN_COMPRESS_GOPROXY),) endif define Package/xray-plugin - SECTION:=net - CATEGORY:=Network - TITLE:=SIP003 plugin for Shadowsocks, based on Xray - URL:=https://github.com/teddysun/xray-plugin - DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle -endef - -define Package/xray-plugin/description - Yet another SIP003 plugin for Shadowsocks, based on Xray. + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=SIP003 plugin for Shadowsocks, based on Xray + URL:=https://github.com/teddysun/xray-plugin + DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle endef define Build/Compile @@ -75,10 +63,8 @@ endif endef define Package/xray-plugin/install - $(call GoPackage/Package/Install/Bin,$(1)) -ifneq ($(CONFIG_XRAY_PLUGIN_PROVIDE_V2RAY_PLUGIN),) - $(LN) xray-plugin $(1)/usr/bin/v2ray-plugin -endif + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/xray-plugin $(1)/usr/bin/xray-plugin endef $(eval $(call GoBinPackage,xray-plugin))