From e94def516843a66e12d79136810b2b71a23684e1 Mon Sep 17 00:00:00 2001
From: SakuraFallingMad <31793080+SakuraFallingMad@users.noreply.github.com>
Date: Tue, 3 Dec 2024 08:14:44 +0800
Subject: [PATCH] luci-app-passwall: add sniff override function prompt
---
.../luasrc/model/cbi/passwall/client/other.lua | 6 ++++--
applications/luci-app-passwall/po/zh_Hans/passwall.po | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/applications/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua b/applications/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua
index 4cce5a672f..11a052dd55 100644
--- a/applications/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua
+++ b/applications/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua
@@ -178,8 +178,9 @@ if has_xray then
o = s_xray:option(Flag, "noise", translate("Noise"), translate("UDP noise, Under some circumstances it can bypass some UDP based protocol restrictions."))
o.default = 0
- o = s_xray:option(Flag, "sniffing_override_dest", translate("Override the connection destination address"), translate("Override the connection destination address with the sniffed domain."))
+ o = s_xray:option(Flag, "sniffing_override_dest", translate("Override the connection destination address"))
o.default = 0
+ o.description = translate("Override the connection destination address with the sniffed domain.
When enabled, traffic will match only by domain, ignoring IP rules.
If using shunt nodes, configure the domain shunt rules correctly.")
local domains_excluded = string.format("/usr/share/%s/rules/domains_excluded", appname)
o = s_xray:option(TextValue, "excluded_domains", translate("Excluded Domains"), translate("If the traffic sniffing result is in this list, the destination address will not be overridden."))
@@ -233,9 +234,10 @@ if has_singbox then
s.anonymous = true
s.addremove = false
- o = s:option(Flag, "sniff_override_destination", translate("Override the connection destination address"), translate("Override the connection destination address with the sniffed domain."))
+ o = s:option(Flag, "sniff_override_destination", translate("Override the connection destination address"))
o.default = 0
o.rmempty = false
+ o.description = translate("Override the connection destination address with the sniffed domain.
When enabled, traffic will match only by domain, ignoring IP rules.
If using shunt nodes, configure the domain shunt rules correctly.")
o = s:option(Value, "geoip_path", translate("Custom geoip Path"))
o.default = "/usr/share/singbox/geoip.db"
diff --git a/applications/luci-app-passwall/po/zh_Hans/passwall.po b/applications/luci-app-passwall/po/zh_Hans/passwall.po
index d91152c2f5..d15e8206a8 100644
--- a/applications/luci-app-passwall/po/zh_Hans/passwall.po
+++ b/applications/luci-app-passwall/po/zh_Hans/passwall.po
@@ -1639,8 +1639,8 @@ msgstr "握手服务器"
msgid "Handshake Server Port"
msgstr "握手服务器端口"
-msgid "Override the connection destination address with the sniffed domain."
-msgstr "用探测出的域名覆盖连接目标地址。"
+msgid "Override the connection destination address with the sniffed domain.
When enabled, traffic will match only by domain, ignoring IP rules.
If using shunt nodes, configure the domain shunt rules correctly."
+msgstr "用探测出的域名覆盖连接目标地址。
启用后仅使用域名进行流量匹配,将忽略IP规则。
如使用分流节点,请正确设置域名分流规则。"
msgid "Protocol parameter. Will waste traffic randomly if enabled."
msgstr "协议参数。如果启用会随机浪费流量。"