From 767ede6a168b0b8f9c2b68c574bb88fce3e354d4 Mon Sep 17 00:00:00 2001 From: actions Date: Fri, 10 May 2024 11:30:05 +0800 Subject: [PATCH] luci-app-passwall: sync upstream last commit: https://github.com/xiaorouji/openwrt-passwall/commit/d978d14d63dd23f662af6d8150bfa56bed34ad08 --- luci-app-passwall/luasrc/passwall/util_xray.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/luci-app-passwall/luasrc/passwall/util_xray.lua b/luci-app-passwall/luasrc/passwall/util_xray.lua index b579b40b4..860f90926 100644 --- a/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -767,8 +767,8 @@ function gen_config(var) end if node.protocol == "_shunt" then - local proxy_node_id = node["main_node"] - local proxy_tag = "main" + local proxy_tag = node.preproxy_enabled == "1" and "main" or nil + local proxy_node_id = proxy_tag and node["main_node"] or nil local proxy_balancer_tag local proxy_nodes @@ -862,7 +862,6 @@ function gen_config(var) end return outbound_tag, nil elseif _node.protocol == "_balancing" then - return nil, gen_balancer(_node, rule_name) elseif _node.protocol == "_iface" then if _node.iface then @@ -884,7 +883,7 @@ function gen_config(var) end --proxy_node - if node.preproxy_enabled == "1" and proxy_node_id then + if proxy_tag and proxy_node_id then local proxy_outbound_tag proxy_outbound_tag, proxy_balancer_tag = gen_shunt_node(proxy_tag, proxy_node_id) if proxy_balancer_tag then