From 34e1949617e3f9dd007c8316f7904c53573b2953 Mon Sep 17 00:00:00 2001 From: kenzok8 Date: Fri, 16 May 2025 20:44:33 +0800 Subject: [PATCH] update 2025-05-16 20:44:33 --- .../luasrc/model/cbi/passwall/client/global.lua | 15 +++++++++++++++ luci-app-passwall/po/zh-cn/passwall.po | 3 +++ .../usr/share/passwall/helper_smartdns_add.lua | 17 +++++++++++++++++ luci-app-wxedge/Makefile | 2 +- luci-app-wxedge/luasrc/model/cbi/wxedge.lua | 4 ++-- nikki/Makefile | 8 ++++---- xray-core/Makefile | 4 ++-- 7 files changed, 44 insertions(+), 9 deletions(-) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index 927a9fd19..1c9b2e5a1 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -453,6 +453,21 @@ if api.is_finded("smartdns") then end return DynamicList.write(self, section, t) end + function o.validate(self, value) --禁止私有IP + if type(value) == "table" then + for _, v in ipairs(value) do + if v:match("127%.0%.0%.") or + v:match("192%.168%.") or + v:match("10%.") or + v:match("172%.1[6-9]%.") or + v:match("172%.2[0-9]%.") or + v:match("172%.3[0-1]%.") then + return nil, translatef("Private IPs are not allowed: %s", v) + end + end + end + return value + end end o = s:taboption("DNS", ListValue, "xray_dns_mode", translate("Request protocol")) diff --git a/luci-app-passwall/po/zh-cn/passwall.po b/luci-app-passwall/po/zh-cn/passwall.po index 482b63dc2..21c35cf2e 100644 --- a/luci-app-passwall/po/zh-cn/passwall.po +++ b/luci-app-passwall/po/zh-cn/passwall.po @@ -118,6 +118,9 @@ msgstr "国内分组名" msgid "You only need to configure domestic DNS packets in SmartDNS and set it redirect or as Dnsmasq upstream, and fill in the domestic DNS group name here." msgstr "您只需要在SmartDNS配置好国内DNS分组,并设置重定向或作为Dnsmasq上游,此处填入国内DNS分组名。" +msgid "Private IPs are not allowed: %s" +msgstr "不允许使用私有 IP 地址:%s" + msgid "Filter Mode" msgstr "过滤模式" diff --git a/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua b/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua index be5f385a8..7aa21a938 100644 --- a/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua +++ b/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua @@ -168,6 +168,23 @@ config_lines = { DNS_MODE == "socks" and string.format("proxy-server socks5://%s -name %s", REMOTE_PROXY_SERVER, proxy_server_name) or nil } if DNS_MODE == "socks" then + local found_private = false + for dns in string.gmatch(REMOTE_DNS, "([^|]+)") do + -- 判断是否为私有地址 + if dns:match("127%.0%.0%.") or + dns:match("192%.168%.") or + dns:match("10%.") or + dns:match("172%.1[6-9]%.") or + dns:match("172%.2[0-9]%.") or + dns:match("172%.3[0-1]%.") then + found_private = true + break + end + end + if found_private then + REMOTE_DNS = "tcp://1.1.1.1" + log(" * 错误!SmartDNS 远程 DNS 不允许使用私有地址,将默认使用:tcp://1.1.1.1") + end string.gsub(REMOTE_DNS, '[^' .. "|" .. ']+', function(w) local server_dns = w local server_param = string.format("server %s -group %s -proxy %s", "%s", REMOTE_GROUP, proxy_server_name) diff --git a/luci-app-wxedge/Makefile b/luci-app-wxedge/Makefile index 4f36b7aec..8dc0f5538 100644 --- a/luci-app-wxedge/Makefile +++ b/luci-app-wxedge/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.1.6-20250321 +PKG_VERSION:=1.1.7-20250516 PKG_RELEASE:= LUCI_TITLE:=LuCI support for wxedge diff --git a/luci-app-wxedge/luasrc/model/cbi/wxedge.lua b/luci-app-wxedge/luasrc/model/cbi/wxedge.lua index d87e03a01..e9837ed0a 100644 --- a/luci-app-wxedge/luasrc/model/cbi/wxedge.lua +++ b/luci-app-wxedge/luasrc/model/cbi/wxedge.lua @@ -21,8 +21,8 @@ o = s:option(Value, "image_name", translate("Image").."*") o.rmempty = false o.datatype = "string" o:value("onething1/wxedge", "onething1/wxedge") -o:value("registry.hub.docker.com/onething1/wxedge", "registry.hub.docker.com/onething1/wxedge") -o.default = "onething1/wxedge" +o:value("images-cluster.xycloud.com/wxedge/wxedge:latest", "images-cluster.xycloud.com/wxedge/wxedge:latest") +o.default = "images-cluster.xycloud.com/wxedge/wxedge:latest" local blks = wxedge_model.blocks() local dir diff --git a/nikki/Makefile b/nikki/Makefile index e22113f8c..f0f688f6e 100644 --- a/nikki/Makefile +++ b/nikki/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git -PKG_SOURCE_DATE:=2025-05-13 -PKG_SOURCE_VERSION:=266fb03838365bb5df14d7531476514427eba2e4 -PKG_MIRROR_HASH:=e449c3f931945fbe601a119cc7ef2630a7e8360bd51bd7cc98f9edc686c79c64 +PKG_SOURCE_DATE:=2025-05-15 +PKG_SOURCE_VERSION:=bb8c47d83df74d9873933067c689495944dea314 +PKG_MIRROR_HASH:=6fb158a108d96fb3e6a95311812c5ec4a489505bd28b6722baaabc1f794fa99c PKG_LICENSE:=GPL3.0+ PKG_MAINTAINER:=Joseph Mory @@ -16,7 +16,7 @@ PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 PKG_BUILD_FLAGS:=no-mips16 -PKG_BUILD_VERSION:=alpha-266fb03 +PKG_BUILD_VERSION:=alpha-bb8c47d PKG_BUILD_TIME:=$(shell date -u -Iseconds) GO_PKG:=github.com/metacubex/mihomo diff --git a/xray-core/Makefile b/xray-core/Makefile index 9cef3cd92..d08fab0b0 100644 --- a/xray-core/Makefile +++ b/xray-core/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xray-core -PKG_VERSION:=25.4.30 +PKG_VERSION:=25.5.16 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=4caff81848262684934022dca91cd00b3f28287c29c8229654e226a2ff7990c3 +PKG_HASH:=c856cd9abed7d28d3c7b856c0661cec5c85ba0669affa740c979cf40c2f73ee4 PKG_MAINTAINER:=Tianling Shen PKG_LICENSE:=MPL-2.0