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"]