From cde341f14027d84ba2cd363f57a45c4b223efb16 Mon Sep 17 00:00:00 2001 From: action Date: Tue, 11 Aug 2026 00:49:36 +0800 Subject: [PATCH] update 2026-08-11 00:49:36 --- dae/Makefile | 2 +- luci-app-passwall/Makefile | 2 +- .../luasrc/passwall/util_sing-box.lua | 61 +++++++++++++++---- .../luasrc/passwall/util_xray.lua | 4 +- luci-app-passwall2/Makefile | 2 +- rblibtorrent/Makefile | 4 +- 6 files changed, 57 insertions(+), 18 deletions(-) diff --git a/dae/Makefile b/dae/Makefile index b043e86b..46415481 100644 --- a/dae/Makefile +++ b/dae/Makefile @@ -10,7 +10,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=cc7c0194292ce3db2af727c0d1eaf69dc85c590c +PKG_SOURCE_VERSION:=7bcca2efe9b7229b4f625e68a81c0522a05d7890 PKG_SOURCE_URL:=https://github.com/olicesx/dae.git PKG_MIRROR_HASH:=skip diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 4cf010aa..45b4bf9b 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall -PKG_VERSION:=26.8.1 +PKG_VERSION:=26.8.10 PKG_RELEASE:=1 PKG_PO_VERSION:=$(PKG_VERSION) diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index dc871255..dbad6348 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -1992,6 +1992,7 @@ function gen_config(var) end end dns.final = default_dns_flag + dns.strategy = default_dns_flag == "remote" and remote_strategy or direct_strategy --按分流顺序DNS if dns_domain_rules and #dns_domain_rules > 0 then @@ -2015,12 +2016,43 @@ function gen_config(var) dns_rule.disable_cache = nil end if value.outboundTag == "direct" then - dns_rule.strategy = direct_strategy + local block_rule + if direct_strategy == "ipv4_only" then + block_rule = api.clone(dns_rule) + block_rule.query_type = { "AAAA" } + elseif direct_strategy == "ipv6_only" then + block_rule = api.clone(dns_rule) + block_rule.query_type = { "A" } + end + if block_rule then + block_rule.action = "predefined" + block_rule.rcode = "NOERROR" + block_rule.disable_cache = nil + block_rule.server = nil + table.insert(dns.rules, block_rule) + end end if value.outboundTag ~= "block" and value.outboundTag ~= "direct" then dns_rule.server = "remote" dns_rule.rewrite_ttl = 30 - dns_rule.strategy = remote_strategy + if true then + local block_rule + if remote_strategy == "ipv4_only" then + block_rule = api.clone(dns_rule) + block_rule.query_type = { "AAAA" } + elseif remote_strategy == "ipv6_only" then + block_rule = api.clone(dns_rule) + block_rule.query_type = { "A" } + end + if block_rule then + block_rule.action = "predefined" + block_rule.rcode = "NOERROR" + block_rule.disable_cache = nil + block_rule.server = nil + block_rule.rewrite_ttl = nil + table.insert(dns.rules, block_rule) + end + end dns_rule.client_subnet = remote_dns_client_ip if value.outboundTag ~= COMMON.default_outbound_tag and (remote_server.address or remote_server.server) then local remote_dns_server = api.clone(remote_server) @@ -2033,9 +2065,13 @@ function gen_config(var) end if value.fakedns then local fakedns_dns_rule = api.clone(dns_rule) - fakedns_dns_rule.query_type = { - "A", "AAAA" - } + if remote_strategy == "ipv4_only" then + fakedns_dns_rule.query_type = { "A" } + elseif remote_strategy == "ipv6_only" then + fakedns_dns_rule.query_type = { "AAAA" } + else + fakedns_dns_rule.query_type = { "A", "AAAA" } + end fakedns_dns_rule.server = fakedns_tag fakedns_dns_rule.disable_cache = true table.insert(dns.rules, fakedns_dns_rule) @@ -2046,23 +2082,26 @@ function gen_config(var) end end if default_dns_flag == "remote" then + local dns_rule_query_type = { "A", "AAAA" } + if remote_strategy == "ipv4_only" then + dns_rule_query_type = { "A" } + elseif remote_strategy == "ipv6_only" then + dns_rule_query_type = { "AAAA" } + end if remote_dns_fake then -- When default is not direct and enable fakedns, default DNS use FakeDNS. local fakedns_dns_rule = { - query_type = { - "A", "AAAA" - }, + query_type = dns_rule_query_type, server = fakedns_tag, disable_cache = true, - rewrite_ttl = 30, - strategy = remote_strategy, + rewrite_ttl = 30 } table.insert(dns.rules, fakedns_dns_rule) else local remote_dns_rule = { + query_type = dns_rule_query_type, server = "remote", disable_cache = true, - strategy = remote_strategy, } table.insert(dns.rules, remote_dns_rule) end diff --git a/luci-app-passwall/luasrc/passwall/util_xray.lua b/luci-app-passwall/luasrc/passwall/util_xray.lua index 35287bda..862e56ca 100644 --- a/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -355,11 +355,11 @@ function gen_outbound(flag, node, tag, proxy_table) end if fragment and fragment_table and ({raw=1, ws=1, httpupgrade=1, grpc=1, xhttp=1})[TP] then finalmask.tcp = finalmask.tcp or {} - finalmask.tcp[#finalmask.tcp+1] = api.clone(fragment_table) + table.insert(finalmask.tcp, 1, api.clone(fragment_table)) end if noise and noise_table and (TP == "mkcp" or (TP == "xhttp" and node.alpn == "h3")) then finalmask.udp = finalmask.udp or {} - finalmask.udp[#finalmask.udp+1] = api.clone(noise_table) + table.insert(finalmask.udp, 1, api.clone(noise_table)) end if node.finalmask and node.finalmask ~= "" then local ok, fm = pcall(jsonc.parse, api.base64Decode(node.finalmask)) diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index 25e88ebb..8ff63f32 100644 --- a/luci-app-passwall2/Makefile +++ b/luci-app-passwall2/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall2 -PKG_VERSION:=26.8.7 +PKG_VERSION:=26.8.10 PKG_RELEASE:=1 PKG_PO_VERSION:=$(PKG_VERSION) diff --git a/rblibtorrent/Makefile b/rblibtorrent/Makefile index f576172a..8723488f 100644 --- a/rblibtorrent/Makefile +++ b/rblibtorrent/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rblibtorrent -PKG_VERSION:=2.0.13 +PKG_VERSION:=2.0.14 PKG_RELEASE:=1 PKG_SOURCE:=libtorrent-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/arvidn/libtorrent/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=86207fbe502153568bb4b11d11bb881d6c1388962e852ee0caacf1c07adeb161 +PKG_HASH:=d79fcbc98ed800259ddfc3ef7451a0317d950abdcabf17481fa4236b0cf0f4f0 PKG_BUILD_DIR:=$(BUILD_DIR)/libtorrent-$(PKG_VERSION) PKG_LICENSE:=BSD