<% local api = require "luci.passwall2.api" local uci = api.uci local default_node_type = "" local shunt_rule_list = {} local node = api.uci_get_type("global", "node") if node then local node_type = api.uci_get_type_id(node, "type") local node_protocol = api.uci_get_type_id(node, "protocol") if node_type == "Xray" and node_protocol == "_shunt" then default_node_type = node_protocol uci:foreach("passwall2", "shunt_rules", function(e) if e[".name"] and e.remarks then shunt_rule_list[#shunt_rule_list + 1] = e end end) end end -%>
<%:You choose node is:%>
<%- if default_node_type == "_shunt" then for i, v in ipairs(shunt_rule_list) do -%> ')" value="<%=v.remarks%>" /> <%- end -%> <% else %> <% end %>