From 062730bfde2a8c69cbe3f65c4ad98cd6b5727dd3 Mon Sep 17 00:00:00 2001 From: actions Date: Thu, 18 Jan 2024 01:30:10 +0800 Subject: [PATCH] luci-app-passwall2: sync upstream --- luci-app-passwall2/Makefile | 2 +- luci-app-passwall2/luasrc/passwall2/util_sing-box.lua | 2 +- luci-app-passwall2/luasrc/passwall2/util_xray.lua | 2 +- .../luasrc/view/passwall2/global/status.htm | 4 ++-- .../luasrc/view/passwall2/node_list/link_add_node.htm | 10 +++++----- luci-app-passwall2/po/zh-cn/passwall2.po | 7 +++++-- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index a697e7f1d..3d19ccbca 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.23-3 +PKG_VERSION:=1.24-1 PKG_RELEASE:= PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua index 7d504daef..9f4ff8325 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_sing-box.lua @@ -1412,7 +1412,7 @@ function gen_config(var) outbound = "dns-out" }) - local content = flag .. node_id .. jsonc.stringify(dns) + local content = flag .. node_id .. jsonc.stringify(route.rules) if api.cacheFileCompareToLogic(CACHE_TEXT_FILE, content) == false then --clear ipset/nftset if direct_ipset then diff --git a/luci-app-passwall2/luasrc/passwall2/util_xray.lua b/luci-app-passwall2/luasrc/passwall2/util_xray.lua index d09a418fb..6188c7531 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_xray.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_xray.lua @@ -1271,7 +1271,7 @@ function gen_config(var) dns.hosts = nil end - local content = flag .. node_id .. jsonc.stringify(dns) + local content = flag .. node_id .. jsonc.stringify(routing.rules) if api.cacheFileCompareToLogic(CACHE_TEXT_FILE, content) == false then --clear ipset/nftset if direct_ipset then diff --git a/luci-app-passwall2/luasrc/view/passwall2/global/status.htm b/luci-app-passwall2/luasrc/view/passwall2/global/status.htm index 008809926..58e2821e0 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/global/status.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/global/status.htm @@ -91,7 +91,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
-

Xray
<%:NOT RUNNING%>

+

Core
<%:NOT RUNNING%>

@@ -145,7 +145,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md if (true) { var status_node = document.getElementById('status_node'); if (status_node) { - var text = 'Xray
'; + var text = 'Core
'; if (data["global_status"]) text += '<%:RUNNING%>'; else diff --git a/luci-app-passwall2/luasrc/view/passwall2/node_list/link_add_node.htm b/luci-app-passwall2/luasrc/view/passwall2/node_list/link_add_node.htm index 7d1ec1d5f..c981748bd 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/node_list/link_add_node.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/node_list/link_add_node.htm @@ -48,9 +48,8 @@ local api = require "luci.passwall2.api" function add_node() { var nodes_link = document.getElementById("nodes_link").value; if (nodes_link.trim() != "") { - var supports = "ss ssr vmess vless trojan hysteria"; - var itype = nodes_link.split('://')[0]; - if (itype.trim() != "" && supports.indexOf(itype) >= 0) { + var s = nodes_link.split('://'); + if (s.length > 1) { ajax_add_node(nodes_link); } else { @@ -81,9 +80,10 @@ local api = require "luci.passwall2.api"