diff --git a/doc/lucky1.png b/doc/lucky1.png deleted file mode 100644 index a5b41b6e..00000000 Binary files a/doc/lucky1.png and /dev/null differ diff --git a/doc/lucky2.png b/doc/lucky2.png deleted file mode 100644 index ba4c026f..00000000 Binary files a/doc/lucky2.png and /dev/null differ diff --git a/doc/lucky3.png b/doc/lucky3.png deleted file mode 100644 index 6fa7982f..00000000 Binary files a/doc/lucky3.png and /dev/null differ diff --git a/doc/taskplan1.png b/doc/taskplan1.png new file mode 100644 index 00000000..1f8db7be Binary files /dev/null and b/doc/taskplan1.png differ diff --git a/doc/taskplan2.png b/doc/taskplan2.png new file mode 100644 index 00000000..edb45d6d Binary files /dev/null and b/doc/taskplan2.png differ diff --git a/doc/taskplan3.png b/doc/taskplan3.png new file mode 100644 index 00000000..d4794702 Binary files /dev/null and b/doc/taskplan3.png differ diff --git a/doc/view.png b/doc/view.png new file mode 100644 index 00000000..169e112f Binary files /dev/null and b/doc/view.png differ diff --git a/doc/view2.png b/doc/view2.png new file mode 100644 index 00000000..9058c632 Binary files /dev/null and b/doc/view2.png differ diff --git a/luci-app-passwall/root/usr/share/passwall/helper_chinadns_add.lua b/luci-app-passwall/root/usr/share/passwall/helper_chinadns_add.lua index 8a4c2769..6ad220ee 100644 --- a/luci-app-passwall/root/usr/share/passwall/helper_chinadns_add.lua +++ b/luci-app-passwall/root/usr/share/passwall/helper_chinadns_add.lua @@ -34,6 +34,10 @@ local tmp_lines = {} local USE_GEOVIEW = uci:get(appname, "@global_rules[0]", "enable_geoview") local IS_SHUNT_NODE = uci:get(appname, TCP_NODE, "protocol") == "_shunt" +if not api.is_finded("geoview") then + USE_GEOVIEW = "0" +end + local function log(...) if NO_LOGIC_LOG == "1" then return @@ -128,16 +132,20 @@ local file_block_host = TMP_ACL_PATH .. "/block_host" if USE_BLOCK_LIST == "1" and not fs.access(file_block_host) then local block_domain, lookup_block_domain = {}, {} local geosite_arg = "" - for line in io.lines(RULES_PATH .. "/block_host") do - if not line:find("#") and line:find("geosite:") then - line = string.match(line, ":([^:]+)$") - geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line - else - line = api.get_std_domain(line) - if line ~= "" and not line:find("#") then - insert_unique(block_domain, line, lookup_block_domain) + local f = io.open(RULES_PATH .. "/block_host") + if f then + for line in f:lines() do + if not line:find("#") and line:find("geosite:") then + line = string.match(line, ":([^:]+)$") + geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line + else + line = api.get_std_domain(line) + if line ~= "" and not line:find("#") then + insert_unique(block_domain, line, lookup_block_domain) + end end end + f:close() end if #block_domain > 0 then local f_out = io.open(file_block_host, "w") @@ -146,11 +154,11 @@ if USE_BLOCK_LIST == "1" and not fs.access(file_block_host) then end f_out:close() end - if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then + if USE_GEOVIEW == "1" and geosite_arg ~= "" then if get_geosite(geosite_arg, file_block_host) == 0 then - log(" * 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)完成") + log(" - 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)完成") else - log(" * 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)失败!") + log(" - 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)失败!") end end end @@ -211,16 +219,20 @@ local file_direct_host = TMP_ACL_PATH .. "/direct_host" if USE_DIRECT_LIST == "1" and not fs.access(file_direct_host) then local direct_domain, lookup_direct_domain = {}, {} local geosite_arg = "" - for line in io.lines(RULES_PATH .. "/direct_host") do - if not line:find("#") and line:find("geosite:") then - line = string.match(line, ":([^:]+)$") - geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line - else - line = api.get_std_domain(line) - if line ~= "" and not line:find("#") then - insert_unique(direct_domain, line, lookup_direct_domain) + local f = io.open(RULES_PATH .. "/direct_host") + if f then + for line in f:lines() do + if not line:find("#") and line:find("geosite:") then + line = string.match(line, ":([^:]+)$") + geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line + else + line = api.get_std_domain(line) + if line ~= "" and not line:find("#") then + insert_unique(direct_domain, line, lookup_direct_domain) + end end end + f:close() end if #direct_domain > 0 then local f_out = io.open(file_direct_host, "w") @@ -229,11 +241,11 @@ if USE_DIRECT_LIST == "1" and not fs.access(file_direct_host) then end f_out:close() end - if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then + if USE_GEOVIEW == "1" and geosite_arg ~= "" then if get_geosite(geosite_arg, file_direct_host) == 0 then - log(" * 解析[直连列表] Geosite 到域名白名单(whitelist)完成") + log(" - 解析[直连列表] Geosite 到域名白名单(whitelist)完成") else - log(" * 解析[直连列表] Geosite 到域名白名单(whitelist)失败!") + log(" - 解析[直连列表] Geosite 到域名白名单(whitelist)失败!") end end end @@ -257,16 +269,20 @@ local file_proxy_host = TMP_ACL_PATH .. "/proxy_host" if USE_PROXY_LIST == "1" and not fs.access(file_proxy_host) then local proxy_domain, lookup_proxy_domain = {}, {} local geosite_arg = "" - for line in io.lines(RULES_PATH .. "/proxy_host") do - if not line:find("#") and line:find("geosite:") then - line = string.match(line, ":([^:]+)$") - geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line - else - line = api.get_std_domain(line) - if line ~= "" and not line:find("#") then - insert_unique(proxy_domain, line, lookup_proxy_domain) + local f = io.open(RULES_PATH .. "/proxy_host") + if f then + for line in f:lines() do + if not line:find("#") and line:find("geosite:") then + line = string.match(line, ":([^:]+)$") + geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line + else + line = api.get_std_domain(line) + if line ~= "" and not line:find("#") then + insert_unique(proxy_domain, line, lookup_proxy_domain) + end end end + f:close() end if #proxy_domain > 0 then local f_out = io.open(file_proxy_host, "w") @@ -275,11 +291,11 @@ if USE_PROXY_LIST == "1" and not fs.access(file_proxy_host) then end f_out:close() end - if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then + if USE_GEOVIEW == "1" and geosite_arg ~= "" then if get_geosite(geosite_arg, file_proxy_host) == 0 then - log(" * 解析[代理列表] Geosite 到代理域名表(blacklist)完成") + log(" - 解析[代理列表] Geosite 到代理域名表(blacklist)完成") else - log(" * 解析[代理列表] Geosite 到代理域名表(blacklist)失败!") + log(" - 解析[代理列表] Geosite 到代理域名表(blacklist)失败!") end end end @@ -432,7 +448,7 @@ if IS_SHUNT_NODE then end end - if GFWLIST == "1" and CHNLIST == "0" and USE_GEOVIEW == "1" and api.is_finded("geoview") then --仅GFW模式解析geosite + if GFWLIST == "1" and CHNLIST == "0" and USE_GEOVIEW == "1" then --仅GFW模式解析geosite local return_white, return_shunt if geosite_white_arg ~= "" then return_white = get_geosite(geosite_white_arg, file_white_host) @@ -441,9 +457,9 @@ if IS_SHUNT_NODE then return_shunt = get_geosite(geosite_shunt_arg, file_shunt_host) end if (return_white == nil or return_white == 0) and (return_shunt == nil or return_shunt == 0) then - log(" * 解析[分流节点] Geosite 完成") + log(" - 解析[分流节点] Geosite 完成") else - log(" * 解析[分流节点] Geosite 失败!") + log(" - 解析[分流节点] Geosite 失败!") end end diff --git a/luci-app-passwall/root/usr/share/passwall/helper_dnsmasq.lua b/luci-app-passwall/root/usr/share/passwall/helper_dnsmasq.lua index 0571b832..b96d27fe 100644 --- a/luci-app-passwall/root/usr/share/passwall/helper_dnsmasq.lua +++ b/luci-app-passwall/root/usr/share/passwall/helper_dnsmasq.lua @@ -346,14 +346,16 @@ function add_rule(var) fs.mkdir(CACHE_DNS_PATH) --屏蔽列表 - if USE_CHINADNS_NG == "0" then - if USE_BLOCK_LIST == "1" then - for line in io.lines("/usr/share/passwall/rules/block_host") do + if USE_CHINADNS_NG == "0" and USE_BLOCK_LIST == "1" then + local f = io.open("/usr/share/passwall/rules/block_host") + if f then + for line in f:lines() do line = api.get_std_domain(line) if line ~= "" and not line:find("#") and not line:find(":") then set_domain_address(line, "") end end + f:close() end end diff --git a/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua b/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua index e3a0ef20..4011fc09 100644 --- a/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua +++ b/luci-app-passwall/root/usr/share/passwall/helper_smartdns_add.lua @@ -40,6 +40,10 @@ local tmp_lines = {} local USE_GEOVIEW = uci:get(appname, "@global_rules[0]", "enable_geoview") local IS_SHUNT_NODE = uci:get(appname, TCP_NODE, "protocol") == "_shunt" +if not api.is_finded("geoview") then + USE_GEOVIEW = "0" +end + local function log(...) if NO_LOGIC_LOG == "1" then return @@ -286,16 +290,20 @@ local file_block_host = TMP_ACL_PATH .. "/block_host" if USE_BLOCK_LIST == "1" and not fs.access(file_block_host) then local block_domain, lookup_block_domain = {}, {} local geosite_arg = "" - for line in io.lines(RULES_PATH .. "/block_host") do - if not line:find("#") and line:find("geosite:") then - line = string.match(line, ":([^:]+)$") - geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line - else - line = api.get_std_domain(line) - if line ~= "" and not line:find("#") then - insert_unique(block_domain, line, lookup_block_domain) + local f = io.open(RULES_PATH .. "/block_host") + if f then + for line in f:lines() do + if not line:find("#") and line:find("geosite:") then + line = string.match(line, ":([^:]+)$") + geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line + else + line = api.get_std_domain(line) + if line ~= "" and not line:find("#") then + insert_unique(block_domain, line, lookup_block_domain) + end end end + f:close() end if #block_domain > 0 then local f_out = io.open(file_block_host, "w") @@ -304,11 +312,11 @@ if USE_BLOCK_LIST == "1" and not fs.access(file_block_host) then end f_out:close() end - if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then + if USE_GEOVIEW == "1" and geosite_arg ~= "" then if get_geosite(geosite_arg, file_block_host) == 0 then - log(" * 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)完成") + log(" - 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)完成") else - log(" * 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)失败!") + log(" - 解析[屏蔽列表] Geosite 到屏蔽域名表(blocklist)失败!") end end end @@ -372,16 +380,20 @@ local file_direct_host = TMP_ACL_PATH .. "/direct_host" if USE_DIRECT_LIST == "1" and not fs.access(file_direct_host) then local direct_domain, lookup_direct_domain = {}, {} local geosite_arg = "" - for line in io.lines(RULES_PATH .. "/direct_host") do - if not line:find("#") and line:find("geosite:") then - line = string.match(line, ":([^:]+)$") - geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line - else - line = api.get_std_domain(line) - if line ~= "" and not line:find("#") then - insert_unique(direct_domain, line, lookup_direct_domain) + local f = io.open(RULES_PATH .. "/direct_host") + if f then + for line in f:lines() do + if not line:find("#") and line:find("geosite:") then + line = string.match(line, ":([^:]+)$") + geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line + else + line = api.get_std_domain(line) + if line ~= "" and not line:find("#") then + insert_unique(direct_domain, line, lookup_direct_domain) + end end end + f:close() end if #direct_domain > 0 then local f_out = io.open(file_direct_host, "w") @@ -390,11 +402,11 @@ if USE_DIRECT_LIST == "1" and not fs.access(file_direct_host) then end f_out:close() end - if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then + if USE_GEOVIEW == "1" and geosite_arg ~= "" then if get_geosite(geosite_arg, file_direct_host) == 0 then - log(" * 解析[直连列表] Geosite 到域名白名单(whitelist)完成") + log(" - 解析[直连列表] Geosite 到域名白名单(whitelist)完成") else - log(" * 解析[直连列表] Geosite 到域名白名单(whitelist)失败!") + log(" - 解析[直连列表] Geosite 到域名白名单(whitelist)失败!") end end end @@ -420,16 +432,20 @@ local file_proxy_host = TMP_ACL_PATH .. "/proxy_host" if USE_PROXY_LIST == "1" and not fs.access(file_proxy_host) then local proxy_domain, lookup_proxy_domain = {}, {} local geosite_arg = "" - for line in io.lines(RULES_PATH .. "/proxy_host") do - if not line:find("#") and line:find("geosite:") then - line = string.match(line, ":([^:]+)$") - geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line - else - line = api.get_std_domain(line) - if line ~= "" and not line:find("#") then - insert_unique(proxy_domain, line, lookup_proxy_domain) + local f = io.open(RULES_PATH .. "/proxy_host") + if f then + for line in f:lines() do + if not line:find("#") and line:find("geosite:") then + line = string.match(line, ":([^:]+)$") + geosite_arg = geosite_arg .. (geosite_arg ~= "" and "," or "") .. line + else + line = api.get_std_domain(line) + if line ~= "" and not line:find("#") then + insert_unique(proxy_domain, line, lookup_proxy_domain) + end end end + f:close() end if #proxy_domain > 0 then local f_out = io.open(file_proxy_host, "w") @@ -438,11 +454,11 @@ if USE_PROXY_LIST == "1" and not fs.access(file_proxy_host) then end f_out:close() end - if USE_GEOVIEW == "1" and geosite_arg ~= "" and api.is_finded("geoview") then + if USE_GEOVIEW == "1" and geosite_arg ~= "" then if get_geosite(geosite_arg, file_proxy_host) == 0 then - log(" * 解析[代理列表] Geosite 到代理域名表(blacklist)完成") + log(" - 解析[代理列表] Geosite 到代理域名表(blacklist)完成") else - log(" * 解析[代理列表] Geosite 到代理域名表(blacklist)失败!") + log(" - 解析[代理列表] Geosite 到代理域名表(blacklist)失败!") end end end @@ -600,7 +616,7 @@ if IS_SHUNT_NODE then end end - if USE_GFW_LIST == "1" and CHN_LIST == "0" and USE_GEOVIEW == "1" and api.is_finded("geoview") then --仅GFW模式解析geosite + if USE_GFW_LIST == "1" and CHN_LIST == "0" and USE_GEOVIEW == "1" then --仅GFW模式解析geosite local return_white, return_shunt if geosite_white_arg ~= "" then return_white = get_geosite(geosite_white_arg, file_white_host) @@ -609,9 +625,9 @@ if IS_SHUNT_NODE then return_shunt = get_geosite(geosite_shunt_arg, file_shunt_host) end if (return_white == nil or return_white == 0) and (return_shunt == nil or return_shunt == 0) then - log(" * 解析[分流节点] Geosite 完成") + log(" - 解析[分流节点] Geosite 完成") else - log(" * 解析[分流节点] Geosite 失败!") + log(" - 解析[分流节点] Geosite 失败!") end end diff --git a/luci-app-syncthing/Makefile b/luci-app-syncthing/Makefile deleted file mode 100644 index 2219fcb2..00000000 --- a/luci-app-syncthing/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2020 Gyj1109 -# 适配 OpenWrt 25.12 修改版 - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-app-syncthing -PKG_VERSION:=1.0 -PKG_RELEASE:=3 - -LUCI_TITLE:=LuCI support for Syncthing -LUCI_PKGARCH:=all -# 适配 25.12:确保安装了 syncthing 后,LuCI 界面能正确拉起 -LUCI_DEPENDS:=+syncthing - -include $(TOPDIR)/feeds/luci/luci.mk - -# 明确定义配置文件的归属,这对 25.12 的 apk 管理器非常重要 -define Package/$(PKG_NAME)/conffiles -/etc/config/syncthing -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/luci-app-syncthing/README.md b/luci-app-syncthing/README.md deleted file mode 100644 index b07298c1..00000000 --- a/luci-app-syncthing/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# luci-app-syncthing -在Potat0000源码基础上进行了汉化优化,官方openwrt23.05.3编译后可使用 diff --git a/luci-app-syncthing/luasrc/controller/syncthing.lua b/luci-app-syncthing/luasrc/controller/syncthing.lua deleted file mode 100644 index ee2ca7ef..00000000 --- a/luci-app-syncthing/luasrc/controller/syncthing.lua +++ /dev/null @@ -1,17 +0,0 @@ -module("luci.controller.syncthing", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/syncthing") then - return - end - - entry({"admin", "services", "syncthing"}, cbi("syncthing"), _("文件同步"), 10).dependent = true - entry({"admin", "services", "syncthing", "status"}, call("act_status")).leaf = true -end - -function act_status() - local e = {} - e.running = luci.sys.call("pgrep syncthing >/dev/null") == 0 - luci.http.prepare_content("application/json") - luci.http.write_json(e) -end diff --git a/luci-app-syncthing/luasrc/model/cbi/syncthing.lua b/luci-app-syncthing/luasrc/model/cbi/syncthing.lua deleted file mode 100644 index 324ea054..00000000 --- a/luci-app-syncthing/luasrc/model/cbi/syncthing.lua +++ /dev/null @@ -1,48 +0,0 @@ -require("nixio.fs") - -m = Map("syncthing", translate("Syncthing同步工具")) - -m:section(SimpleSection).template = "syncthing/syncthing_status" - -s = m:section(TypedSection, "syncthing") - -s.anonymous = true - -o = s:option(Flag, "enabled", translate("启用")) -o.default = 0 -o.rmempty = false - -gui_address = s:option(Value, "gui_address", translate("GUI访问地址")) -gui_address.description = translate("使用0.0.0.0以监控所有访问。") -gui_address.default = "http://0.0.0.0:8384" -gui_address.placeholder = "http://0.0.0.0:8384" -gui_address.rmempty = false - -home = s:option(Value, "home", translate("配置文件目录")) -home.description = translate("只有保存在/etc/syncthing中的配置会自动备份!") -home.default = "/etc/syncthing" -home.placeholder = "/etc/syncthing" -home.rmempty = false - -user = s:option(ListValue, "user", translate("用户")) -user.description = translate("默认是syncthing,但这可能会导致权限被拒绝。Syncthing官方不建议以root身份运行。") -user:value("", translate("syncthing")) -for u in luci.util.execi("cat /etc/passwd | cut -d ':' -f1") do - user:value(u) -end - -macprocs = s:option(Value, "macprocs", translate("线程限制")) -macprocs.description = translate("0表示匹配CPU数量(默认),>0表示显式指定并发数。") -macprocs.default = "0" -macprocs.placeholder = "0" -macprocs.datatype = "range(0,32)" -macprocs.rmempty = false - -nice = s:option(Value, "nice", translate("优先级")) -nice.description = translate("显式指定优先级值。0是最高,19是最低。(暂时不允许设置负值)") -nice.default = "19" -nice.placeholder = "19" -nice.datatype = "range(0,19)" -nice.rmempty = false - -return m diff --git a/luci-app-syncthing/luasrc/view/syncthing/syncthing_status.htm b/luci-app-syncthing/luasrc/view/syncthing/syncthing_status.htm deleted file mode 100644 index 566cc020..00000000 --- a/luci-app-syncthing/luasrc/view/syncthing/syncthing_status.htm +++ /dev/null @@ -1,27 +0,0 @@ - - -
-

- <%:正在收集数据...%> -

-
diff --git a/luci-app-syncthing/root/etc/uci-defaults/luci-syncthing b/luci-app-syncthing/root/etc/uci-defaults/luci-syncthing deleted file mode 100644 index 3adb7997..00000000 --- a/luci-app-syncthing/root/etc/uci-defaults/luci-syncthing +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -touch /etc/config/syncthing - -uci -q batch <<-EOF >/dev/null - delete ucitrack.@syncthing[-1] - add ucitrack syncthing - set ucitrack.@syncthing[-1].exec='/etc/init.d/syncthing stop && /etc/init.d/syncthing start' - commit ucitrack -EOF -# remove LuCI cache -rm -f /tmp/luci* -exit 0 diff --git a/luci-app-syncthing/root/usr/share/rpcd/acl.d/luci-app-syncthing.json b/luci-app-syncthing/root/usr/share/rpcd/acl.d/luci-app-syncthing.json deleted file mode 100644 index 9fc9cc54..00000000 --- a/luci-app-syncthing/root/usr/share/rpcd/acl.d/luci-app-syncthing.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "luci-app-syncthing": { - "description": "Grant UCI access for luci-app-syncthing", - "read": { - "uci": [ "syncthing" ] - }, - "write": { - "uci": [ "syncthing" ] - } - } -} diff --git a/v2ray-geodata/Makefile b/v2ray-geodata/Makefile index 55a5f827..7dd6c820 100644 --- a/v2ray-geodata/Makefile +++ b/v2ray-geodata/Makefile @@ -21,13 +21,13 @@ define Download/geoip HASH:=c67bd077eb102cec74fab759b73d17f99275f56af10a87c14d9fd983508f5ce1 endef -GEOSITE_VER:=20260805184445 +GEOSITE_VER:=20260807044359 GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) define Download/geosite URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL_FILE:=dlc.dat FILE:=$(GEOSITE_FILE) - HASH:=1f0069aa6cfc44e435ad7da0e64f8c51c08ec7b620bdcb9e318b2b13bd2d1462 + HASH:=28078510003448c84303ea2cf8d4a208f44df581fc6d9a8bd975adcdc850ba5b endef GEOSITE_IRAN_VER:=202608030119