diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index 053028914..300b7eee9 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -144,12 +144,7 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then type:value("Xray", translate("Xray")) end type.cfgvalue = get_cfgvalue(v.id, "type") - type.write = function(self, section, value) - m:set(v.id, "type", value) - if value == "V2ray" then - m:del(v.id, "dialerProxy") - end - end + type.write = get_write(v.id, "type") -- pre-proxy o = s:taboption("Main", Flag, vid .. "-preproxy_enabled", translate("Preproxy")) o:depends("tcp_node", v.id) @@ -166,20 +161,10 @@ if (has_v2ray or has_xray) and #nodes_table > 0 then end o.cfgvalue = get_cfgvalue(v.id, "main_node") o.write = get_write(v.id, "main_node") - -- Xray dialerProxy - local dialerProxy = s:taboption("Main", Flag, vid .. "-dialerProxy", translate("dialerProxy")) - dialerProxy.cfgvalue = get_cfgvalue(v.id, "dialerProxy") - dialerProxy.write = get_write(v.id, "dialerProxy") - dialerProxy.rmempty = false - dialerProxy.default = "0" - dialerProxy:depends({ [vid .. "-type"] = "Xray", [vid .. "-preproxy_enabled"] = "1" }) if (has_v2ray and has_xray) or (v.type == "V2ray" and not has_v2ray) or (v.type == "Xray" and not has_xray) then type:depends("tcp_node", v.id) else type:depends("tcp_node", "hide") --不存在的依赖,即始终隐藏 - if v.type == "Xray" then - dialerProxy:depends({ tcp_node = v.id, [vid .. "-preproxy_enabled"] = "1" }) - end end uci:foreach(appname, "shunt_rules", function(e) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua index dd9f951c4..2fa98d0b9 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/node_config.lua @@ -177,8 +177,6 @@ if #nodes_table > 0 then o:depends("protocol", "_shunt") o = s:option(ListValue, "main_node", string.format('%s', translate("Preproxy Node")), translate("Set the node to be used as a pre-proxy. Each rule (including Default) has a separate switch that controls whether this rule uses the pre-proxy or not.")) o:depends("preproxy_enabled", "1") - local dialerProxy = s:option(Flag, "dialerProxy", translate("dialerProxy")) - dialerProxy:depends({ type = "Xray", protocol = "_shunt", preproxy_enabled = "1" }) for k, v in pairs(balancers_table) do o:value(v.id, v.remarks) end diff --git a/luci-app-passwall/luasrc/passwall/util_xray.lua b/luci-app-passwall/luasrc/passwall/util_xray.lua index d3df63bc4..01107b25b 100644 --- a/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -42,11 +42,9 @@ function gen_outbound(flag, node, tag, proxy_table) local proxy = 0 local proxy_tag = "nil" - local dialerProxy = nil if proxy_table ~= nil and type(proxy_table) == "table" then proxy = proxy_table.proxy or 0 proxy_tag = proxy_table.tag or "nil" - dialerProxy = proxy_table.dialerProxy end if node.type == "V2ray" or node.type == "Xray" then @@ -54,18 +52,10 @@ function gen_outbound(flag, node, tag, proxy_table) else proxy = 0 if proxy_tag ~= "nil" then - if dialerProxy and dialerProxy == "1" then - node.streamSettings = { - sockopt = { - dialerProxy = proxy_tag - } - } - else - node.proxySettings = { - tag = proxy_tag, - transportLayer = true - } - end + node.proxySettings = { + tag = proxy_tag, + transportLayer = true + } end end end @@ -124,8 +114,7 @@ function gen_outbound(flag, node, tag, proxy_table) -- 底层传输配置 streamSettings = (node.streamSettings or node.protocol == "vmess" or node.protocol == "vless" or node.protocol == "socks" or node.protocol == "shadowsocks" or node.protocol == "trojan") and { sockopt = { - mark = 255, - dialerProxy = (node.streamSettings and dialerProxy and dialerProxy == "1") and node.streamSettings.sockopt.dialerProxy or nil + mark = 255 }, network = node.transport, security = node.stream_security, @@ -754,7 +743,7 @@ function gen_config(var) }) end end - local _outbound = gen_outbound(flag, _node, rule_name, { proxy = proxy and 1 or 0, tag = proxy and preproxy_tag or nil, dialerProxy = node.dialerProxy }) + local _outbound = gen_outbound(flag, _node, rule_name, { proxy = proxy and 1 or 0, tag = proxy and preproxy_tag or nil }) if _outbound then table.insert(outbounds, _outbound) if proxy then preproxy_used = true end diff --git a/luci-app-passwall/po/zh-cn/passwall.po b/luci-app-passwall/po/zh-cn/passwall.po index 88b1f55e8..c41a71d0e 100644 --- a/luci-app-passwall/po/zh-cn/passwall.po +++ b/luci-app-passwall/po/zh-cn/passwall.po @@ -406,9 +406,6 @@ msgstr "没有分流规则?点我前往去添加。" msgid "When using, localhost will connect this node first and then use this node to connect the default node." msgstr "当使用时,本机将首先连接到此节点,然后再使用此节点连接到默认节点落地。" -msgid "dialerProxy" -msgstr "底层传输方式的链式转发" - msgid "Domain Strategy" msgstr "域名解析策略"