From 1b36e0e22c3b4b50c06049f63b803a78ab1c0d07 Mon Sep 17 00:00:00 2001 From: gitea-action Date: Mon, 28 Apr 2025 16:30:30 +0800 Subject: [PATCH] luci-app-passwall: sync upstream last commit: https://github.com/xiaorouji/openwrt-passwall/commit/fe45c9c6fb23ef17e74c8160c3de8a3cd0163ca0 --- luci-app-passwall/luasrc/passwall/util_sing-box.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index 38cb7bc9a..5372fbea6 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -1759,14 +1759,18 @@ function gen_config(var) strategy = "prefer_ipv6" } direct_outbound.domain_resolver = domain_resolver + -- 当没有 direct dns 服务器时添加 local + local hasDirect = false if config.dns and config.dns.servers then for _, server in ipairs(config.dns.servers) do if server.tag == "direct" then + hasDirect = true break end end - else + end + if not hasDirect then config.dns = { servers = { {