From 444419df96019e1975f7596e88af945683eb3484 Mon Sep 17 00:00:00 2001 From: kenzok8 Date: Mon, 31 Mar 2025 16:29:40 +0800 Subject: [PATCH] update 2025-03-31 16:29:40 --- .../model/cbi/passwall/client/rule_list.lua | 6 ++- .../view/passwall/rule_list/geoview.htm | 47 ++++++++++--------- quickstart/Makefile | 4 +- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua index 15f04bd8a..48ce08bd0 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/rule_list.lua @@ -2,6 +2,7 @@ local api = require "luci.passwall.api" local appname = "passwall" local fs = api.fs local sys = api.sys +local uci = api.uci local datatypes = api.datatypes local path = string.format("/usr/share/%s/rules/", appname) local gfwlist_path = "/usr/share/passwall/rules/gfwlist" @@ -313,7 +314,10 @@ end m:append(Template(appname .. "/rule_list/js")) -if api.is_finded("geoview") then +local geo_dir = (uci:get(appname, "@global_rules[0]", "v2ray_location_asset") or "/usr/share/v2ray/"):match("^(.*)/") +local geosite_path = geo_dir .. "/geosite.dat" +local geoip_path = geo_dir .. "/geoip.dat" +if api.is_finded("geoview") and fs.access(geosite_path) and fs.access(geoip_path) then s:tab("geoview", translate("Geo View")) o = s:taboption("geoview", DummyValue, "_geoview_fieldset") o.rawhtml = true diff --git a/luci-app-passwall/luasrc/view/passwall/rule_list/geoview.htm b/luci-app-passwall/luasrc/view/passwall/rule_list/geoview.htm index f5fc86901..7b95b42c1 100644 --- a/luci-app-passwall/luasrc/view/passwall/rule_list/geoview.htm +++ b/luci-app-passwall/luasrc/view/passwall/rule_list/geoview.htm @@ -3,16 +3,16 @@ local api = require "luci.passwall.api" -%>
@@ -25,25 +25,25 @@ local api = require "luci.passwall.api"
- - + +
- <%:Enter a domain or IP to query the Geo rule list they belong to.%> + <%:Enter a domain or IP to query the Geo rule list they belong to.%>
- - + +
- <%:Enter a GeoIP or Geosite to extract the domains/IPs they contain. Format: geoip:cn or geosite:gfw%> + <%:Enter a GeoIP or Geosite to extract the domains/IPs they contain. Format: geoip:cn or geosite:gfw%>
@@ -59,9 +59,10 @@ local api = require "luci.passwall.api" var QueryingText = '<%:Querying%>'; function do_geoview(btn,action,value) { + value = value.trim(); if (!value) { - alert("<%:Please enter query content!%>"); - return; + alert("<%:Please enter query content!%>"); + return; } lookup_btn.disabled = true; extract_btn.disabled = true; @@ -78,4 +79,4 @@ local api = require "luci.passwall.api" }) } //]]> - \ No newline at end of file + diff --git a/quickstart/Makefile b/quickstart/Makefile index e40fae984..07c101589 100644 --- a/quickstart/Makefile +++ b/quickstart/Makefile @@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk PKG_ARCH_quickstart:=$(ARCH) PKG_NAME:=quickstart -PKG_VERSION:=0.9.7 +PKG_VERSION:=0.9.8 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-binary-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/linkease/istore-packages/releases/download/prebuilt/ -PKG_HASH:=6c1d0b0fb13ad75ce2dad2d86b4a51ce925aa4c14551e95eecc4c65a08d57dbf +PKG_HASH:=2550903f42f9b939cc2307f096fe16048a714e368496301ea68e9bb0623c8aa4 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-binary-$(PKG_VERSION)