diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 7c5aba415..c45a059b1 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall -PKG_VERSION:=4.74-3 +PKG_VERSION:=4.74-4 PKG_RELEASE:= PKG_CONFIG_DEPENDS:= \ 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 4edaffa56..65c67da40 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 @@ -624,4 +624,11 @@ o:value("v2ray-plugin") o = s:option(Value, option_name("plugin_opts"), translate("opts")) o:depends({ [option_name("plugin_enabled")] = true }) +o = s:option(ListValue, option_name("domain_strategy"), "Domain Strategy", translate("If is domain name, The requested domain name will be resolved to IP before connect.")) +o.default = "prefer_ipv6" +o:value("prefer_ipv4") +o:value("prefer_ipv6") +o:value("ipv4_only") +o:value("ipv6_only") + api.luci_types(arg[1], m, s, type_name, option_prefix) diff --git a/luci-app-passwall/luasrc/passwall/util_sing-box.lua b/luci-app-passwall/luasrc/passwall/util_sing-box.lua index 1f822ad9c..e7b57c018 100644 --- a/luci-app-passwall/luasrc/passwall/util_sing-box.lua +++ b/luci-app-passwall/luasrc/passwall/util_sing-box.lua @@ -73,6 +73,7 @@ function gen_outbound(flag, node, tag, proxy_table) type = node.protocol, server = node.address, server_port = tonumber(node.port), + domain_strategy = node.domain_strategy, detour = node.detour, } diff --git a/luci-app-passwall/po/zh-cn/passwall.po b/luci-app-passwall/po/zh-cn/passwall.po index 09588b5d9..5286a2da1 100644 --- a/luci-app-passwall/po/zh-cn/passwall.po +++ b/luci-app-passwall/po/zh-cn/passwall.po @@ -1566,3 +1566,6 @@ msgstr "分片间隔" msgid "Fragmentation interval (ms)" msgstr "分片间隔(ms)" + +msgid "If is domain name, The requested domain name will be resolved to IP before connect." +msgstr "如果是域名,域名将在请求发出之前解析为 IP。"