From 1ceaac0408c9356f17dd22584b4722c4aac16a40 Mon Sep 17 00:00:00 2001 From: action Date: Tue, 2 Jun 2026 01:28:34 +0800 Subject: [PATCH] update 2026-06-02 01:28:34 --- .../model/cbi/passwall/client/type/ray.lua | 15 +++++++++++++++ .../cbi/passwall/client/type/sing-box.lua | 18 ++++++++++++++++++ .../luasrc/passwall/util_sing-box.lua | 1 + .../luasrc/passwall/util_xray.lua | 6 +++++- luci-app-passwall/po/zh-cn/passwall.po | 6 ++++++ .../root/usr/share/passwall/iptables.sh | 2 +- .../root/usr/share/passwall/nftables.sh | 2 +- tuic-client/Makefile | 4 ++-- v2ray-geodata/Makefile | 4 ++-- 9 files changed, 51 insertions(+), 7 deletions(-) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua index 931f5955..0be45708 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua @@ -452,6 +452,21 @@ if api.compare_versions(xray_version, ">=", "26.1.31") then o:depends({ [_n("protocol")] = "hysteria2" }) end +o = s:option(Flag, _n("tls_certificate"), translate("TLS Certificate (PEM)")) +o.default = "0" +o:depends({ [_n("tls")] = true, [_n("reality")] = false }) +o:depends({ [_n("protocol")] = "hysteria2" }) + +o = s:option(TextValue, _n("tls_certificate_pem"), " ", translate("Full certificate (chain), PEM format.")) +o.default = "" +o.rows = 5 +o.wrap = "off" +o:depends({ [_n("tls_certificate")] = true }) +o.validate = function(self, value) + value = api.trim(value):gsub("\r\n", "\n"):gsub("[ \t]*\n[ \t]*", "\n"):gsub("\n+", "\n") + return value +end + o = s:option(Flag, _n("ech"), translate("ECH")) o.default = "0" o:depends({ [_n("tls")] = true, [_n("reality")] = false }) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua index 19c6ad05..545011ff 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua @@ -496,6 +496,24 @@ o:depends({ [_n("protocol")] = "hysteria"}) o:depends({ [_n("protocol")] = "tuic" }) o:depends({ [_n("protocol")] = "hysteria2" }) +o = s:option(Flag, _n("tls_certificate"), translate("TLS Certificate (PEM)")) +o.default = "0" +o:depends({ [_n("tls")] = true, [_n("reality")] = false }) +o:depends({ [_n("protocol")] = "hysteria"}) +o:depends({ [_n("protocol")] = "tuic" }) +o:depends({ [_n("protocol")] = "hysteria2" }) +o:depends({ [_n("protocol")] = "naive" }) + +o = s:option(TextValue, _n("tls_certificate_pem"), " ", translate("Full certificate (chain), PEM format.")) +o.default = "" +o.rows = 5 +o.wrap = "off" +o:depends({ [_n("tls_certificate")] = true }) +o.validate = function(self, value) + value = api.trim(value):gsub("\r\n", "\n"):gsub("[ \t]*\n[ \t]*", "\n"):gsub("\n+", "\n") + return value +end + o = s:option(Flag, _n("ech"), translate("ECH")) o.default = "0" o:depends({ [_n("tls")] = true, [_n("flow")] = "", [_n("reality")] = false }) diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index 3d428e05..325f80b8 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -232,6 +232,7 @@ function gen_outbound(flag, node, tag, proxy_table) --max_version = "1.3", fragment = fragment, record_fragment = record_fragment, + certificate = (node.tls_certificate == "1" and node.tls_certificate_pem ~= "") and split(node.tls_certificate_pem, "\n") or nil, ech = (node.ech == "1") and (function() local function get_ech_domain(s) --兼容xray "域名+DNS" 格式ech local domain, dns = s:match("^([^+]+)%+(.+)$") diff --git a/luci-app-passwall/luasrc/passwall/util_xray.lua b/luci-app-passwall/luasrc/passwall/util_xray.lua index 2e1ccf60..671985b1 100644 --- a/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -165,7 +165,11 @@ function gen_outbound(flag, node, tag, proxy_table) if not node.tls_CertByName then return "" end return node.tls_CertByName end)(), - echConfigList = (node.ech == "1") and node.ech_config or nil + echConfigList = (node.ech == "1") and node.ech_config or nil, + certificates = (node.tls_certificate == "1" and node.tls_certificate_pem ~= "") and { + certificate = api.split(node.tls_certificate_pem, "\n"), + usage = "verify" + } or nil } or nil, realitySettings = (node.stream_security == "reality") and { serverName = node.tls_serverName, diff --git a/luci-app-passwall/po/zh-cn/passwall.po b/luci-app-passwall/po/zh-cn/passwall.po index 237fdeae..f54082fb 100644 --- a/luci-app-passwall/po/zh-cn/passwall.po +++ b/luci-app-passwall/po/zh-cn/passwall.po @@ -1831,6 +1831,12 @@ msgstr "手动获取" msgid "Fetch Failed" msgstr "获取失败" +msgid "TLS Certificate (PEM)" +msgstr "TLS 证书(PEM)" + +msgid "Full certificate (chain), PEM format." +msgstr "完整证书(链),PEM 格式。" + msgid "ECH Config" msgstr "ECH 配置" diff --git a/luci-app-passwall/root/usr/share/passwall/iptables.sh b/luci-app-passwall/root/usr/share/passwall/iptables.sh index fe449ed1..1eb3b769 100755 --- a/luci-app-passwall/root/usr/share/passwall/iptables.sh +++ b/luci-app-passwall/root/usr/share/passwall/iptables.sh @@ -734,7 +734,7 @@ filter_haproxy() { } filter_vpsip() { - local EXCLUDE_VPSIP="^(127\.0\.0\.1|1\.1\.1\.1|1\.1\.1\.2|8\.8\.8\.8|8\.8\.4\.4|9\.9\.9\.9)$" + local EXCLUDE_VPSIP="^(0\.0\.0\.0|127\.0\.0\.1|1\.1\.1\.1|1\.1\.1\.2|8\.8\.8\.8|8\.8\.4\.4|9\.9\.9\.9)$" uci show $CONFIG | grep -E "(\.address=|\.download_address=)" | cut -d "'" -f 2 | grep -E "^([0-9]{1,3}\.){3}[0-9]{1,3}$" | grep -Ev "$EXCLUDE_VPSIP" | sed "s/^/add $IPSET_VPS /" | awk '1; END{print "COMMIT"}' | ipset -! -R echolog " - [$?]加入所有IPv4节点到ipset[$IPSET_VPS]直连完成" uci show $CONFIG | grep -E "(\.address=|\.download_address=)" | cut -d "'" -f 2 | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | sed "s/^/add $IPSET_VPS6 /" | awk '1; END{print "COMMIT"}' | ipset -! -R diff --git a/luci-app-passwall/root/usr/share/passwall/nftables.sh b/luci-app-passwall/root/usr/share/passwall/nftables.sh index 114e0240..51359f43 100755 --- a/luci-app-passwall/root/usr/share/passwall/nftables.sh +++ b/luci-app-passwall/root/usr/share/passwall/nftables.sh @@ -785,7 +785,7 @@ filter_vps_addr() { } filter_vpsip() { - local EXCLUDE_VPSIP="^(127\.0\.0\.1|1\.1\.1\.1|1\.1\.1\.2|8\.8\.8\.8|8\.8\.4\.4|9\.9\.9\.9)$" + local EXCLUDE_VPSIP="^(0\.0\.0\.0|127\.0\.0\.1|1\.1\.1\.1|1\.1\.1\.2|8\.8\.8\.8|8\.8\.4\.4|9\.9\.9\.9)$" uci show $CONFIG | grep -E "(\.address=|\.download_address=)" | cut -d "'" -f 2 | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | grep -Ev "$EXCLUDE_VPSIP" | insert_nftset $NFTSET_VPS "-1" echolog " - [$?]加入所有IPv4节点到nftset[$NFTSET_VPS]直连完成" uci show $CONFIG | grep -E "(\.address=|\.download_address=)" | cut -d "'" -f 2 | grep -E "([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}" | insert_nftset $NFTSET_VPS6 "-1" diff --git a/tuic-client/Makefile b/tuic-client/Makefile index b3192c44..5a4503a2 100644 --- a/tuic-client/Makefile +++ b/tuic-client/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tuic-client -PKG_VERSION:=1.8.4 +PKG_VERSION:=1.8.5 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/Itsusinn/tuic/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=1d0a9a538bc1b4fec42d499f417c2ef1c3f4092be00ad3731cd9d0963e111df2 +PKG_HASH:=c67700a4d70cfdd6f5f7991147b716efa4141c2ecfd9f14187560a70fbf50020 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_MAINTAINER:=Tianling Shen diff --git a/v2ray-geodata/Makefile b/v2ray-geodata/Makefile index 94dfb270..437db9ce 100644 --- a/v2ray-geodata/Makefile +++ b/v2ray-geodata/Makefile @@ -21,13 +21,13 @@ define Download/geoip HASH:=e9002979e0df72bce1c8751ff70725386594c551db684b7a232935b8b2bb8aa2 endef -GEOSITE_VER:=20260531105624 +GEOSITE_VER:=20260601085329 GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) define Download/geosite URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL_FILE:=dlc.dat FILE:=$(GEOSITE_FILE) - HASH:=a13504c3aa71220411d77db4f819eadf37e408505fa1f846d176317d94e5afad + HASH:=297cb4536b20dfa94755c90a3208c1e11a8daa425c268b0ee046d7617b3faddb endef GEOSITE_IRAN_VER:=202606010205