parent
fab733c71c
commit
895cb86141
@ -174,33 +174,20 @@ if has_xray then
|
|||||||
o.default = "10-20"
|
o.default = "10-20"
|
||||||
o:depends("fragment", true)
|
o:depends("fragment", true)
|
||||||
|
|
||||||
o = s_xray:option(Flag, "sniffing", translate("Sniffing"), translate("When using the shunt, this option will be forced to be enabled."))
|
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.default = 1
|
|
||||||
o.rmempty = false
|
|
||||||
|
|
||||||
if has_xray then
|
|
||||||
o = s_xray:option(Flag, "route_only", translate("Sniffing Route Only"))
|
|
||||||
o.default = 0
|
o.default = 0
|
||||||
o:depends("sniffing", true)
|
|
||||||
|
|
||||||
local domains_excluded = string.format("/usr/share/%s/rules/domains_excluded", appname)
|
local domains_excluded = string.format("/usr/share/%s/rules/domains_excluded", appname)
|
||||||
o = s_xray:option(TextValue, "no_sniffing_hosts", translate("No Sniffing Lists"), translate("Hosts added into No Sniffing Lists will not resolve again on server."))
|
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."))
|
||||||
o.rows = 15
|
o.rows = 15
|
||||||
o.wrap = "off"
|
o.wrap = "off"
|
||||||
o.cfgvalue = function(self, section) return fs.readfile(domains_excluded) or "" end
|
o.cfgvalue = function(self, section) return fs.readfile(domains_excluded) or "" end
|
||||||
o.write = function(self, section, value) fs.writefile(domains_excluded, value:gsub("\r\n", "\n")) end
|
o.write = function(self, section, value) fs.writefile(domains_excluded, value:gsub("\r\n", "\n")) end
|
||||||
o.remove = function(self, section)
|
o:depends({sniffing_override_dest = true})
|
||||||
local route_only_value = s_xray.fields["route_only"] and s_xray.fields["route_only"]:formvalue(section) or nil
|
|
||||||
if not route_only_value or route_only_value == "0" then
|
|
||||||
fs.writefile(domains_excluded, "")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
o:depends({sniffing = true, route_only = false})
|
|
||||||
|
|
||||||
o = s_xray:option(Value, "buffer_size", translate("Buffer Size"), translate("Buffer size for every connection (kB)"))
|
o = s_xray:option(Value, "buffer_size", translate("Buffer Size"), translate("Buffer size for every connection (kB)"))
|
||||||
o.datatype = "uinteger"
|
o.datatype = "uinteger"
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if has_singbox then
|
if has_singbox then
|
||||||
s = m:section(TypedSection, "global_singbox", "Sing-Box " .. translate("Settings"))
|
s = m:section(TypedSection, "global_singbox", "Sing-Box " .. translate("Settings"))
|
||||||
|
@ -616,11 +616,11 @@ function gen_config(var)
|
|||||||
settings = {network = "tcp,udp", followRedirect = true},
|
settings = {network = "tcp,udp", followRedirect = true},
|
||||||
streamSettings = {sockopt = {tproxy = "tproxy"}},
|
streamSettings = {sockopt = {tproxy = "tproxy"}},
|
||||||
sniffing = {
|
sniffing = {
|
||||||
enabled = xray_settings.sniffing == "1" or node.protocol == "_shunt",
|
enabled = xray_settings.sniffing_override_dest == "1" or node.protocol == "_shunt",
|
||||||
destOverride = {"http", "tls", "quic"},
|
destOverride = {"http", "tls", "quic"},
|
||||||
metadataOnly = false,
|
metadataOnly = false,
|
||||||
routeOnly = (xray_settings.sniffing == "1" and xray_settings.route_only == "1") or (xray_settings.sniffing == "0" and node.protocol == "_shunt"),
|
routeOnly = node.protocol == "_shunt" and xray_settings.sniffing_override_dest ~= "1" or nil,
|
||||||
domainsExcluded = (xray_settings.sniffing == "1" and xray_settings.route_only == "0") and get_domain_excluded() or nil
|
domainsExcluded = xray_settings.sniffing_override_dest == "1" and get_domain_excluded() or nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -691,12 +691,6 @@ msgstr "劫持ICMPv6 (IPv6 PING)"
|
|||||||
msgid "Sniffing"
|
msgid "Sniffing"
|
||||||
msgstr "流量嗅探"
|
msgstr "流量嗅探"
|
||||||
|
|
||||||
msgid "When using the shunt, this option will be forced to be enabled."
|
|
||||||
msgstr "使用分流时,将强制启用此选项。"
|
|
||||||
|
|
||||||
msgid "Sniffing Route Only"
|
|
||||||
msgstr "流量嗅探仅供路由使用"
|
|
||||||
|
|
||||||
msgid "TCP Proxy Way"
|
msgid "TCP Proxy Way"
|
||||||
msgstr "TCP 代理方式"
|
msgstr "TCP 代理方式"
|
||||||
|
|
||||||
@ -1501,11 +1495,11 @@ msgstr "无子连接时的健康检查"
|
|||||||
msgid "Initial Windows Size"
|
msgid "Initial Windows Size"
|
||||||
msgstr "初始窗口大小"
|
msgstr "初始窗口大小"
|
||||||
|
|
||||||
msgid "No Sniffing Lists"
|
msgid "Excluded Domains"
|
||||||
msgstr "不进行流量嗅探的域名列表"
|
msgstr "排除域名"
|
||||||
|
|
||||||
msgid "Hosts added into No Sniffing Lists will not resolve again on server."
|
msgid "If the traffic sniffing result is in this list, the destination address will not be overridden."
|
||||||
msgstr "加入的域名不会再次在服务器解析。"
|
msgstr "如果流量嗅探结果在此列表中,则不会覆盖目标地址。"
|
||||||
|
|
||||||
msgid "Buffer Size"
|
msgid "Buffer Size"
|
||||||
msgstr "缓冲区大小"
|
msgstr "缓冲区大小"
|
||||||
|
@ -145,7 +145,7 @@ index 55bb691..e13625a 100644
|
|||||||
s = m:section(NamedSection, arg[1])
|
s = m:section(NamedSection, arg[1])
|
||||||
s.addremove = false
|
s.addremove = false
|
||||||
diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua
|
diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua
|
||||||
index 4dd6967..2068b06 100644
|
index 72997c3..04b70f3 100644
|
||||||
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua
|
--- a/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua
|
||||||
+++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua
|
+++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/other.lua
|
||||||
@@ -11,7 +11,6 @@ local port_validate = function(self, value, t)
|
@@ -11,7 +11,6 @@ local port_validate = function(self, value, t)
|
||||||
|
Loading…
Reference in New Issue
Block a user