From 8eb65c73551218f6e37739f2c1de4b5c79aef994 Mon Sep 17 00:00:00 2001 From: actions Date: Thu, 18 Jul 2024 21:00:08 +0800 Subject: [PATCH] luci-app-passwall2: sync upstream last commit: https://github.com/xiaorouji/openwrt-passwall2/commit/da49da8f53a75dbc01b902a2eadf590adb168919 --- luci-app-passwall2/Makefile | 2 +- luci-app-passwall2/luasrc/passwall2/util_xray.lua | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index d81382b4a..2f24ea6aa 100644 --- a/luci-app-passwall2/Makefile +++ b/luci-app-passwall2/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall2 -PKG_VERSION:=1.30-2 +PKG_VERSION:=1.30-3 PKG_RELEASE:= PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall2/luasrc/passwall2/util_xray.lua b/luci-app-passwall2/luasrc/passwall2/util_xray.lua index c7ceb105a..20349b44d 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_xray.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_xray.lua @@ -577,13 +577,7 @@ function gen_config(var) local xray_settings = uci:get_all(appname, "@global_xray[0]") or {} - local nodes = {} - if node_id then - local node = uci:get_all(appname, node_id) - if node then - nodes[node_id] = node - end - end + local node = node_id and uci:get_all(appname, node_id) or nil local balancers = {} local rules = {} @@ -774,12 +768,11 @@ function gen_config(var) return default_outTag end - for k, v in pairs(nodes) do + if node then if server_host and server_port then - v.address = server_host - v.port = server_port + node.address = server_host + node.port = server_port end - local node = v if node.protocol == "_shunt" then local proxy_tag = "main" local proxy_node_id = node["main_node"]